# Calculating the mean of a discrete R.V in a question

I have the following HW question:

There are $N$ balls in a box, $m$ balls with an $S$ for success and $N-m$ balls with an $F$ for failure. Choose $n$ balls at random ($n\leq N$) and let $X$ = the number of successes.

a. Calculate the probability function $p(\cdot)=P(X=\cdot)$

b. Calculate $EX$

I have managed to solve the first part of the question: $$P(X=k)=\frac{\binom{m}{k}\cdot\binom{N-m}{n-k}}{\binom{N}{n}}$$

But I am having difficulty with the second part, I need to evaluate $$EX=\sum_{k=0}^{\min\{n,m\}}\frac{\binom{m}{k}\cdot\binom{N-m}{n-k}}{\binom{N}{n}}\cdot k$$

I have opened the binomials by definitions and I am stuck there.

How can I calculate $EX$ ? any help is appreciated!

-

Let $$X_i = \begin{cases} 1 & \text{if success occurs on the ith trial,} \\ 0 & \text{if not.} \end{cases}$$ Then $\mathbb E(X) = \mathbb E(X_1+\cdots+X_n) = \mathbb E(X_1)+\cdots+\mathbb E(X_n)$, and all the terms in that last sum are equal.