# How to figure out the expectation and variance of this situation

Suppose we randomly draw $n$ balls from an urn with $m$ red balls and $N-m$ white balls. Let $X$ be the number of red balls in our sample. Then $X$ has a hypergeometric distribution with pmf $p(x)=P(X=x)= {_mC_x} \times _{N-m}C_{n-x}/_NC_n$. What is the $E(X)$ and $\operatorname{Var}(X)$ ?

-

Hint: $X=\sum\limits_{k=1}^nX_k$ where $X_k$ is the indicator function of the event that the $k$th ball is red.
Steps: Show that $x=\mathrm E(X_k)$ does not depend on $k$ and compute $x$. Write $\mu=\mathrm E(X)$ as a function of $x$ and the other parameters of the model. Deduce the value of $\mu$. Show that $\mathrm E(X_k^2)=x$ for every $k$. Show that $y=\mathrm E(X_kX_\ell)$ does not depend on $(k,\ell)$ if $k\ne\ell$ and compute $y$. Write $\sigma^2=\mathrm{Var}(X)$ as a function of $x$, $y$ and the other parameters of the model. Deduce the value of $\sigma^2$.