A fair die is rolled 14 times. Let X be the number of faces that appear exactly 2 times. Find Var(X).

1.1k Views Asked by At

To start, we know $\mathsf{Var}(X) = \mathsf{E}(X^2) - \mathsf{E}(X)^2$.

I calculated that the $\mathsf{E}(X)$ is $6\times C(14, 2)(1/6)^2(5/6)^{12}$

How do I find $\mathsf{E}(X^2)$?

I'd really appreciate the answer since I have an exam tomorrow and this type of question might come up.

I found $\mathsf{E}(X)$ using the method of indicators.

Thank you for any help!

3

There are 3 best solutions below

2
On

This looks like self-study so I will give some hints. Define first 6 indicator random variables $Y_1, i=1,,2,3,4,5,6$ counting the number of times $i$ eyes show. $Y$ have a symmetric multinomial distribution, $Y \sim \text{multinom}(\frac16, \dotsc, \frac16, n=14)$. Then define $I_i$ the indicator on the event $Y_i=2$. Calculate the covariance matrix of the vector random variable $Y$ and use the well known formula $\DeclareMathOperator{\V}{\mathbb{V}}$ $\V a^tY = a^T \V(Y) a$.

2
On

Your efforts will probably go along with what I write here.

For $i=1,\dots,6$ let $X_i$ take value $1$ if face $i$ appears exactly twice, and takes value $0$ otherwise.

Then: $$X=\sum_{i=1}^{6}X_{i}$$ so that:$$\begin{aligned}\mathsf{Var}X & =\mathsf{Covar}\left(\sum_{i=1}^{6}X_{i},\sum_{i=1}^{6}X_{i}\right)\\ & =\sum_{i=1}^{6}\sum_{j=1}^{6}\mathsf{Covar}\left(X_{i},X_{j}\right)\\ & =6\mathsf{Var}X_{1}+30\mathsf{Covar}\left(X_{1},X_{2}\right) \end{aligned}$$where the second equality rests on the bilinearity of $\mathsf{Cov}$ and the third equality on symmetry.

Here $X_1$ has Bernoulli distribution with parameter $p=\binom{14}2\left(\frac16\right)^2\left(\frac56\right)^{12}$.

(this agrees with what you found yourself)

Also $X_1X_2$ has Bernoulli distribution with parameter $p'=\frac{14!}{2!2!10!}\left(\frac16\right)^4\left(\frac46\right)^{10}$.

(do you have troubles to understand this?)

This allows you to find $\mathsf{Var}X_1$ and $\mathsf{Covar}\left(X_{1},X_{2}\right)$.

0
On

For future reference here is the answer using a variation of Stirling numbers (second kind). Suppose that a die with $q$ faces is rolled $n$ times and we ask about the expected number of faces that appear two times. This yields the marked mixed generating function

$$G(z, u) = \left(\exp(z)-\frac{1}{2} z^2+\frac{1}{2} uz^2\right)^q.$$

Here we simply have a partition of the $n$ slots into $q$ sets, one for each value of the die that may appear. We ask if it is a probability distribution and get

$$q^{-n} \times n! [z^n] \left. \left(\exp(z)-\frac{1}{2}z^2+\frac{1}{2}uz^2\right)^q \right|_{u=1} = q^{-n} \times n! [z^n] \exp(qz) = 1$$

and indeed it is. We continue with the expectation and obtain

$$\mathrm{E}[X] = q^{-n} \times n! [z^n] \left. \frac{\partial}{\partial u} \left(\exp(z)-\frac{1}{2}z^2+\frac{1}{2}uz^2\right)^q \right|_{u=1} \\ = q^{-n} \times n! [z^n] \left. q \times \left(\exp(z)-\frac{1}{2}z^2+\frac{1}{2}uz^2\right)^{q-1} \frac{1}{2} z^2 \right|_{u=1} \\ = \frac{1}{2} q^{-n} \times n! [z^{n-2}] q \times \exp((q-1)z) = \frac{1}{2} q^{-n} n (n-1) q (q-1)^{n-2} \\ = \frac{1}{2q} n (n-1) \left(1-\frac{1}{q}\right)^{n-2} = \frac{1}{q} {n\choose 2} \left(1-\frac{1}{q}\right)^{n-2}.$$

Moving on to the next factorial moment we differentiate twice to obtain

$$\mathrm{E}[X(X-1)] = q^{-n} \times n! [z^n] \left. q(q-1) \times \left(\exp(z)-\frac{1}{2}z^2+\frac{1}{2}uz^2\right)^{q-2} \frac{1}{4} z^4 \right|_{u=1} \\ = \frac{1}{4} q^{-n} \times n! [z^{n-4}] q(q-1) \times \exp((q-2)z) \\ = \frac{1}{4} q^{-n} n (n-1) (n-2) (n-3) q (q-1) (q-2)^{n-4} \\ = \frac{6(q-1)}{q^3} {n\choose 4} \left(1-\frac{2}{q}\right)^{n-4}.$$

The desired answer is then obtained from

$$\mathrm{Var}[X] = \mathrm{E}[X(X-1)] + \mathrm{E}[X] - \mathrm{E}[X]^2.$$

Substituting $n=14$ and $q=6$ we find

$$\bbox[5px,border:2px solid #00A000]{ \mathrm{Var}[X] = {\frac {1281280}{531441}} + {\frac {22216796875}{13060694016}} - \left({\frac {22216796875}{13060694016}}\right)^2.}$$

This is

$${\frac {207845485179282350855}{170581728179578208256}} \approx 1.218451046.$$

Note also that the expectation is approximately $1.701042598$ so there are about two values that appear two times, on average.

Addendum. We can compute all factorial moments this way, getting

$$\mathrm{E}[X(X-1) \cdots (X-(r-1))] = q^{-n} \times n! [z^n] \left. r! {q\choose r} \\ \times \left(\exp(z)-\frac{1}{2}z^2+\frac{1}{2}uz^2\right)^{q-r} \frac{1}{2^r} z^{2r} \right|_{u=1} \\ = \frac{1}{2^r} q^{-n} \times n! [z^{n-2r}] r! {q\choose r} \times \exp((q-r)z) \\ = \frac{1}{2^r} q^{-n} \times {n\choose 2r} \times (2r)! \times r! {q\choose r} \times (q-r)^{n-2r} \\ = \frac{(2r)!\times r!}{2^r} \frac{1}{q^{2r}} {q\choose r} {n\choose 2r} \left(1-\frac{r}{q}\right)^{n-2r}.$$

We may then use

$$\mathrm{E}[X^r] = \sum_{k=1}^r \mathrm{E}[X^{\underline{k}}] {r\brace k}.$$