I have a question regarding finding the following joint distribution.
Let $p \sim U[0,1]$, standard uniform distribution.
The random variable $X$ is defined as $X = 2$ with probability $p$ and $X = 0$ with probability $(1-p)$.
The random variable $Y$ is defined as $Y = 4p$.
The question is to find the $cov(X,Y)$ and the joint distribution of $X$ and $Y$
This is what I have done so far:
Since $p \sim U[0,1]$, then $Y \sim U[0,4]$ since $Y = 4p$. Then I used the formula $$Cov(X,Y) = E(XY) - E(X)E(Y) $$ In this case, $E(X)=2p$ and $E(Y)=2$. However, I get stuck when attempting to find $E(XY)$ along with the the joint distribution. Any suggestion or help would be extremely appreciated!!