# Expected value (Mean) of a joint distribution

I saw in a textbook that if we have a joint distribution $$f(X,Y)$$ that is a Gaussian distribution, then we have the mode equal to the mean. The mode is just the values of $$X$$ and $$Y$$ such that $$f(X,Y)$$ is maximum. I can see how the mode is the same as the mean with a graph. However, I have a lot of trouble understanding how to formulate the mean mathematically in this case. How do I calculate the expected value using an integral? What is $$E(X,Y)$$? I have never seen it before.

I suppose in a discrete case, it would just be $$p_1[X_1, Y_1]' + p_2[X_2,Y_2]'$$ (assuming there are only two possible values for $$X,Y$$) but I don't know how to transform this into continuous case.

If $$(X,Y)$$ is a random vector, then the mean of the random vector is defined as $$(E[X], E[Y])$$, so you just need to take the mean of each component separately. If $$(X,Y)$$ has a joint density $$f$$, then for instance $$E[X] = \int_{-\infty}^\infty\int_{-\infty}^\infty x f(x,y) \, dx \, dy.$$ Note that in cases where $$X$$ and $$Y$$ are independent, the joint density decomposes as $$f(x,y) = g(x) h(y)$$ into the marginal densities, so the above integral would just be the usual formula $$E[X] = \int_{-\infty}^\infty x g(x) \, dx$$.