So,
$\mathbb{E}[X]=0*\frac{3}{4}+1*\frac{1}{4}=\frac{1}{4}$
$\mathbb{E}[Y]=0*\frac{1}{4}+1*\frac{3}{4}=\frac{3}{4}$
$\mathbb{E}[XY]=1*1*\frac{1}{4}=\frac{1}{4}$
$Cov[X,Y]=\mathbb{E}[XY]-\mathbb{E}[X]E[Y]=\frac{1}{16}$
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
If we have a real-valued function $g(X_1,X_2)$ such that $g: R^2 \rightarrow R$ then in case of discrete distribution:
$E[g(X_1,X_2)]=\Sigma_{x_1} \Sigma_{x_2}g(X_1,X_2)\; p_{X_1,X_2} (x_1,x_2)$
Where $p_{X_1,X_2} (x_1,x_2)$ represents the joint probability distribution and $x_1$ and $x_2$ are instances of $X_1$ and $X_2.$
So, here, we need to find $E[XY],$ It means $g(X_1,X_2)=XY$
Hence,
$E[XY]=\Sigma_{x} \Sigma_{y}XY\; p_{X,Y} (x,y)$
Where x and y are instances of $X$ and $Y.$
and Joint Distribution is given in the above table as:
1. When $x=0,y=0$ then $p_{X,Y} (x,y) =\frac{1}{4}$
2. When $x=0,y=1$ then $p_{X,Y} (x,y) =\frac{1}{2}$
3. When $x=1,y=0$ then $p_{X,Y} (x,y) =0$
4. When $x=1,y=1$ then $p_{X,Y} (x,y) =\frac{1}{4}$
Therefore,
$E[XY]=0*0*\frac{1}{4}+0*1*\frac{1}{2}+1*0*0+1*1*\frac{1}{4}=\frac{1}{4}$