# Expectations of the functions of expectations

I have two random variables $$X$$ and $$Y$$ whose probability distributions are given by $$P_X(x)$$ and $$P_X(x)$$ respectively. I know that we can get the mean some function $$f(x,y)$$ by integrating across the joint probabilty distribution: $$E[f(x,y)] = \int \int f(x,y) P_{XY}(x,y) \ dx \ dy$$

my question is what happens when we instead have a function of the expected value of one of these parameters, $$g(E[X],y)$$. would we be able to simply integrate across the remaining random parameter given that $$E[X]$$ is no longer a random variable?

$$E[g(E[X],y)] = \int g(E[X],y) P_{Y}(y) \ dy$$

First some remarks:

Actually you should write $$\mathbb E[f(X,Y)]$$ and $$\mathbb E[g(\mathbb E[X],Y)]$$ using capitals for the random variables, as you also introduced them.

Secondly what you call "probability distributions" are in fact "probability density functions".

Thirdly your write $$P_{XY}(x,y)$$ for the PDF (=probability density function) of random vector $$(X,Y)$$.

You better write it as $$P_{X,Y}(x,y)$$ to avoid confusion with $$XY$$ which is also a random variable and has a PDF.

In the situation you sketch $$\mathbb EX$$ is a constant.

Denoting it by $$\mu$$ for a suitable function $$g:\mathbb R^2\to\mathbb R$$ we get a "new" random variable $$Z:=g(\mu,Y)$$ and for its expectation we indeed have the equality: $$\mathbb EZ=\mathbb Eg(\mu,Y)=\int g(\mu,y)P_Y(y)dy$$

Yes you can, but whether it is meaningful or not actually depends upon what you want to obtain. In most cases $$\mathbb E_{X,Y}g(X,Y) \ne g(\mu_X,Y) \ne g(\mu_X,\mu_Y)$$ unless $$g$$ is linear in $$X$$ and $$Y$$ (think about Jensen's inequality).