[Math] $n$ letters in $n$ envelopes

probabilityrandom variables

A secretary introduces randomly 9 letters in 9 envelopes. Let $X$ be the random variable representing the number of letters that have matched the correct envelopes. Find $E(X)$ and $var(X)$

I know the solution for "the probability that none is in the correct envelope" and "the probability that at least one is in the correct envelope", but I don't know how to solve this.

Best Answer

For $i=1,2,\dots,9$ let $X_i$ take value $1$ if letter $i$ lands in the correct envelop and let it take value $0$ otherwise.

Then:$$X=\sum_{i=1}^9X_i$$

With linearity of expectation and symmetry we find:$$\mathsf EX=\sum_{i=1}^9\mathsf EX_i=9\mathsf EX_1$$

Can you find $\mathsf EX_1$ yourself?

Further on base of bilinearity of covariance and symmetry we find:$$\mathsf{Var}(X)=\mathsf{Cov}(X,X)=\sum_{i=1}^9\sum_{j=1}^9\mathsf{Cov}(X_i,X_j)=9\mathsf{Cov}(X_1,X_1)+72\mathsf{Cov}(X_1,X_2)$$

Can you find $\mathsf{Cov}(X_1,X_1)=\mathsf{Var}(X_1)$ and $\mathsf{Cov}(X_1,X_2)$ yourself?

Related Question