[Math] Mixed Binomial and Uniform Distribution

binomial distributionprobabilityprobability distributionsstatistical-inferencevariance

Problem Consider the mixed binomial distribution $Bin(n, U)$, where U has a standard uniform(0,1) distribution.

(i) Compute E[X | U]

(ii) Compute Var [X | U]

(iii) Find the mean and variance of X

Following is my thought process, I'm not sure if they are even remotely close to be on the right track.

(i) E[X|U] = E[$\frac{f(X,U)}{f_U(u)}$] = $\frac{\sum_{n = 0}^{\infty} x\space{n \choose x} \; p^x (1-p)^{n-x} U(0,1)}{E[U(0,1)]}$ = $\frac{np}{\frac{1}{2}}$ , since p is uniform distribution probability will converge to 1 and np = n. Therefore E[X|U] = 2n?

I assume that p= probability of standard Uniform distribution, which is 1?

(ii) Var [X | U]=E[$X^2 | U] – (E[X | U])^2$ = $np(1-p) – (2n)^2$

(iii) $$E[X] = E(E[X|U]) = E[np] = np \quad (since \space X|U \sim Binomial(n,U)) $$

$$Var[X]=Var(E[X|U]) + E(Var[X|U]) $$
$$Since \space Var(E[X|U])=Var(nP) = n^2U(0,1)= n^2(1)$$
$$E(Var[X|U]) = nE[p(1-p)] = 0?$$
$$Therefore \space Var[X]=n^2?$$

Best Answer

No, they are not remotely close.   There is no $p$ involved anywhere.

You have been told that $X\mid U\sim\mathcal{Bin}(n, U)$ and $U\sim\mathcal{U}(0;1)$.

(i) $\mathsf E(X\mid U)$ will be a function of $U$, and further ...

... it is clearly going to be the mean of the binomial distribution, $\mathcal {Bin}(n, U)$. $$\mathsf E(X\mid U) = nU$$

(ii) Similarly for $\mathsf{Var}(X\mid U)$

(iii) This relies on the tower properties.$$\mathsf E(X)=\mathsf E(\mathsf E(X\mid U))\\ \mathsf{Var}(X) = \mathsf E(\mathsf {Var}(X\mid U))+\mathsf {Var}(\mathsf E(X\mid U))$$

Well, you should be able to complete that now.

Related Question