Ratio of sums vs sum of ratio Is anyone aware of any general (or perhaps not so general) relationship (inequality for instance) relating

$A(x,y)= \frac{\sum_z f(x,y,z)}{\sum_z g(y,z)}$

and

$B(x,y)= \sum_z\left(\frac{f(x,y,z)}{g(y,z)}\right)$

?

Specific context (for what I'm dealing with, but not necessarily the question) is that $\sum_{x,y,x}f(x,y,z)=1$ and $\sum_{y,x}g(y,z)=1$ and $f(x,y,z)\geq 0$ and $g(y,z)\geq 0\quad \forall x,y,z$. I.e. probabilities (or more generally, I guess, measures).

It seems like it could 'vaguely' be related to log sum inequalities (when transformed) or Jensen's inequality perhaps?
If you assume that both $f$ and $g$ are nonnegative, you have $A(x, y) \leq B(x, y)$.

Proof:

$ \frac{f(x, y, z)}{\sum_{z}g(y, z)} \leq \frac{f(x,y,z)}{g(y,z)} $, since $g(y, z) \leq \sum_{z}g(y, z)$.

So
$A(x,y) = \frac{\sum_z f(x,y,z)}{\sum_z g(y,z)} = \sum_z \frac{f(x, y, z)}{\sum_z g(y, z)} \leq \sum_z \frac{f(x, y, z)}{g(y, z)} = B(x,y)$.
One example would be
Jensen's inequality:

https://en.wikipedia.org/wiki/Jensen%27s_inequality