Distribution, expected value, variance, covariance and correlation

  • MHB
  • Thread starter mathmari
  • Start date
  • #1
mathmari
Gold Member
MHB
5,053
7
Hey! :giggle:

Let $X$, $Y$ and $Z$ be independent random variables. Let $X$ be Bernoulli distributed on $\{0,1\}$ with success parameter $p_0$ and let $Y$ be Poisson distributed with parameter $\lambda$ and let $Z$ be Poisson distributed with parameter $\mu$.

(a) Calculate the distribution, the expected value and the variance of $XY$.

(b) Determine the Covariance and the correlation between $XY$ and $XZ$.



For question (a) :

We have that $$P(X=0)=1-p_0 \ \text{ and} \ P(X=1)=p_0$$ and $$P(Y=k)=\frac{\lambda^k}{k!}\cdot e^{-\lambda}$$

Sodo we get that $$P(XY=k)=P(XY=k|X=0)P(X=0)+P(XY=k|X=1)P(X=1)$$ If $k=0$ then \begin{align*}P(XY=0)&=P(XY=0|X=0)P(X=0)+P(XY=0|X=1)P(X=1)\\ & =1-p_0+e^{-\lambda}\end{align*} If $k\neq 0$ then \begin{align*}P(XY=k)&=P(XY=k|X=0)P(X=0)+P(XY=k|X=1)P(X=1)\\ & =0+\frac{\lambda^k}{k!}\cdot e^{-\lambda}\cdot p_0\\ & = \frac{\lambda^k}{k!}\cdot e^{-\lambda}\cdot p_0\end{align*}

Is that correct? :unsure:
 

Answers and Replies

  • #2
I like Serena
Homework Helper
MHB
16,350
256
If $k=0$ then \begin{align*}P(XY=0)&=P(XY=0|X=0)P(X=0)+P(XY=0|X=1)P(X=1)\\ & =1-p_0+e^{-\lambda}\end{align*}
Hey mathmari!

Don't we have $P(XY=0|X=1)P(X=1) \,=\, P(Y=0)P(X=1) \,=\, e^{-\lambda}\cdot p_0$? :unsure:
 
  • #3
mathmari
Gold Member
MHB
5,053
7
Don't we have $P(XY=0|X=1)P(X=1) \,=\, P(Y=0)P(X=1) \,=\, e^{-\lambda}\cdot p_0$? :unsure:

Ahh yes! (Malthe)

Then the expected value is $E[XY]=E[X]\cdot E[Y]$ because they are independent, right?

About the variance we have $V(XY)=E((XY)^2)-(E[XY])^2$, but how do we calculate $E((XY)^2)$ ?

:unsure:
 
  • #4
I like Serena
Homework Helper
MHB
16,350
256
About the variance we have $V(XY)=E((XY)^2)-(E[XY])^2$, but how do we calculate $E((XY)^2)$ ?
We have $E\big((XY)^2\big) = E\big(X^2\cdot Y^2\big)$ and since $X$ and $Y$ are independent, $X^2$ and $Y^2$ will also be independent. 🤔
 
  • #5
mathmari
Gold Member
MHB
5,053
7
We have $E\big((XY)^2\big) = E\big(X^2\cdot Y^2\big)$ and since $X$ and $Y$ are independent, $X^2$ and $Y^2$ will also be independent. 🤔

Ahh ok! So it is $E[X^2]\cdot E[Y^2]$. But how are these factors defined? I got stuk right now.. Do we use the variance? :unsure:
 
  • #6
I like Serena
Homework Helper
MHB
16,350
256
Ahh ok! So it is $E[X^2]\cdot E[Y^2]$. But how are these factors defined? I got stuk right now.
Easiest is to look up the variances of the Bernoulli and Poison distributions and use those. 🤔
 
Last edited:
  • #7
mathmari
Gold Member
MHB
5,053
7
Easiest is to look up the variances of the Bernouli and Poison distributions and use those. 🤔

We have the following :
\begin{equation*}V(XY)=E((XY)^2)-(E[XY])^2= E\big(X^2\cdot Y^2\big)-\left (p\cdot \lambda\right )^2= E\big(X^2\big)\cdot E\big( Y^2\big)-p^2\cdot \lambda^2\end{equation*}
The variance of $X$ is $\text{Var}(X)=p(1-p)$ and \begin{align*}E(X^2)-(E(X))^2=p(1-p) &\Rightarrow E(X^2)=p(1-p)+(E(X))^2 \Rightarrow E(X^2)=p(1-p)+p^2 \\ & \Rightarrow E(X^2)=p-p^2+p^2\Rightarrow E(X^2)=p\end{align*}
The variance $Y$ is $\text{Var}(Y)=\lambda$ and \begin{equation*}E(Y^2)-(E(Y))^2=\lambda \Rightarrow E(Y^2)=\lambda+(E(Y))^2 \Rightarrow E(Y^2)=\lambda+\lambda^2 \end{equation*}
So we get \begin{equation*}V(XY)= E\big(X^2\big)\cdot E\big( Y^2\big)-p^2\cdot \lambda^2= p\cdot \left (\lambda+\lambda^2\right )-p^2\cdot \lambda^2= p\cdot \lambda+p\cdot\lambda^2-p^2\cdot \lambda^2= p\cdot \lambda+(p-p^2)\cdot \lambda^2\end{equation*}

:unsure:
 
  • #8
I like Serena
Homework Helper
MHB
16,350
256
Looks correct to me. :unsure:
 
  • #9
mathmari
Gold Member
MHB
5,053
7
Looks correct to me. :unsure:

Great!


For question (b) : The covariance is $\text{Cov}(XY, XZ)=E[(XY)(XZ)]-E[XY]E[XZ]$.

How do we calculate $E[(XY)(XZ)]$ ? :unsure:
 
  • #10
I like Serena
Homework Helper
MHB
16,350
256
How do we calculate $E[(XY)(XZ)]$ ?
Isn't it the same as $E[X^2\cdot Y \cdot Z]$? :unsure:
 
  • #11
mathmari
Gold Member
MHB
5,053
7
Isn't it the same as $E[X^2\cdot Y \cdot Z]$? :unsure:

Ah and this is equal to $E[X^2]\cdot E[Y] \cdot [Z]$ because these are independent random variables, right? :unsure:
 
  • #12
I like Serena
Homework Helper
MHB
16,350
256
Ah and this is equal to $E[X^2]\cdot E[Y] \cdot [Z]$ because these are independent random variables, right?
Yep. (Nod)
 
  • #13
mathmari
Gold Member
MHB
5,053
7
Yep. (Nod)

So we have the following:

The covariance of $XY$ and $XZ$ is \begin{align*}\text{Cov}(XY, XZ)&=E[(XY)(XZ)]-E[XY]E[XZ]=E[X^2\cdot Y \cdot Z]-p\cdot \lambda\cdot p\cdot \mu=E[X^2]\cdot E[Y] \cdot E[Z]-p\cdot \lambda\cdot p\cdot \mu\\ & =p\cdot \lambda \cdot \mu-p^2\cdot \lambda\cdot \mu=(p-p^2)\cdot \lambda \cdot \mu\end{align*}
The correlation of $XY$ and $XZ$ is \begin{align*}\rho _{XY,XZ}={\frac {\operatorname {Cov} (XY,XZ)}{{\sqrt {\operatorname {Var} (XY)}}{\sqrt {\operatorname {Var} (XZ)}}}}={\frac {(p-p^2)\cdot \lambda \cdot \mu}{{\sqrt {p\cdot \lambda+(p-p^2)\cdot \lambda^2}}{\sqrt {p\cdot \mu+(p-p^2)\cdot \mu^2}}}}\end{align*}

Is everything correct? :unsure:
 
  • #14
I like Serena
Homework Helper
MHB
16,350
256
It looks correct to me. :unsure:
 
  • #15
mathmari
Gold Member
MHB
5,053
7

Suggested for: Distribution, expected value, variance, covariance and correlation

Replies
2
Views
521
Replies
0
Views
478
Replies
2
Views
625
Replies
1
Views
560
Replies
19
Views
1K
Replies
3
Views
820
Replies
14
Views
779
Top