Random variables $X$ and $Y$ have the joint probability distribution: $$f(x,y) = \frac{1}{58} (x^2 + y^2),$$ when $x= 1,2,3$ and $y= 1,3$ and $f(x,y)=0$, otherwise.
a) Find $E(X)$ and $E(Y).$
b) Find $\text{Var}(X)$ and $\text{Var}(Y).$
For the expectations, do I take the integral with respect to just $x$ for $E(X)$ and multiply it by $x$? Or is that wrong? I don't have any clue how to find the variances. Any ideas?
You need to use double sums. (The supports for $X, Y$ are discrete values). EG: $$\begin{align}\mathsf E(X) ~=~& \sum\limits_{x\in\{1,2,3\}}\sum\limits_{y\in\{1,3\}} x\cdot\dfrac{x^2+y^2}{58} \\[1ex] =~& \dfrac 1{58} \sum\limits_{x\in\{1,2,3\}}(2x^3+x\sum\limits_{y\in\{1,3\}}y^2) \\[1ex]=~& \dfrac 1{58}(2(1+8+27)+(1+2+3)(1+9)) \\[1ex]=~& \dfrac {66}{29} \end{align}$$
Reality Check: $$\begin{align}\mathsf E(1) ~=~& \sum\limits_{x\in\{1,2,3\}}\sum\limits_{y\in\{1,3\}} 1\cdot\dfrac{x^2+y^2}{58} \\[1ex] =~& \dfrac 1{58} (2\sum\limits_{x\in\{1,2,3\}}x^2~+~3\sum\limits_{y\in\{1,3\}}y^2) \\[1ex]=~& \dfrac 1{58}(2(1+4+9)+3(1+9)) \\[1ex]=~& 1 \end{align}$$
Variances are found by $\mathsf {Var}(X) = \mathsf {E}(X^2) - \mathsf E(X)^2\\\mathsf {Var}(Y) = \mathsf {E}(Y^2) - \mathsf E(Y)^2$.
And of course, $$\begin{align}\mathsf E(X^2) ~=~& \sum\limits_{x\in\{1,2,3\}}\sum\limits_{y\in\{1,3\}} x^2\cdot\dfrac{x^2+y^2}{58}\end{align}$$
and so on