Find the variance $Var(X|Y=3)$ when $X \sim U(0,1)$ and $Y|X=x \sim Bin(10,x)$

155 Views Asked by At

I'm having a bit of a hard time forming an answer to a problem.

Let: $$X \sim U(0,1),\ \ Y|X=x \sim Bin(10,x)$$

When I was asked to find the conditional expectation of $Y$ that was a piece of cake, using the Law of total expectation:

$$\mathbb{E}[Y|X=x] = 10x \to \mathbb{E}[Y] = \mathbb{E}_x\Big[\mathbb{E}_Y[Y|X=x]\Big]=\mathbb{E}_X[10x]=5$$

But now I'm asked to calculate $$Var(X|Y=3)$$

I tried something like: $$\mathbb{E}[X^2|Y=3]-(\mathbb{E}[X|Y=3])^2$$

I'm still having some difficulty to convert it to something with Bayes' theoreme...

My problem is to express $\mathbb{P}(X=x|Y=3)$ or $\mathbb{P}(X=x\cap Y=3)$ since one is discrete and one is continuous.

Any direction of how to preceed would be appreciated.

2

There are 2 best solutions below

2
On BEST ANSWER

Hint:

$$f_{X|Y}(x|y)=\frac{P(Y=y|X=x)f_X(x)}{P(Y=y)}$$

for $y=0,1,\ldots,10$

and:

$$P(Y=y)=\int P(Y=y|X=x)f_X(x)\,dx$$

0
On

The general calculation (replacing $10$ with $n$ and $3$ with $k$) can be done via the following integral $$ \mathbb E[f(X);Y=k]=\int_0^1 f(x)\binom{n}{k}x^k(1-x)^{n-k}\ dx, $$ so the moments can be expressed in terms of the Beta integral, $$ \mathbb E[X^m;Y=k]=\binom{n}{k}\textrm{Beta}(m+k+1,n-k+1)=\binom{n}{k}\frac{m+n+2}{(m+k+1)(n-k+1)}\binom{m+n+2}{m+k+1}. $$ To get the conditional expectation from this, divide by $\mathbb P(Y=k)$ (which is the case $m=0$) $$ \mathbb E[X^m|Y=k]=\frac{\mathbb E[X^m;Y=k]}{\mathbb P(Y=k)}=\frac{(m+n+2)(k+1)}{(m+k+1)(n+2)}\binom{m+n+2}{m+k+1}\bigl/\bigr. \binom{n+2}{k+1}, $$ and combining the cases $m=1$ and $m=2$ yields the conditional variance as you have already observed.