# 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!

-

## 1 Answer

By symmetry, the probability of success on each trial is the same as on each other trial.

(Here's a point where people get confused: They say "Doesn't the probability of success on the second trial depend on whether there's a success on the first trial?". The answer is that the conditional probability of success on the second trial, given the outcome of the first trial, does depend on the outcome of the first trial. But marginal (or "unconditional") probability of success on the second trial is nonetheless the same as the probability of success on the first trial.)

Let $$X_i = \begin{cases} 1 & \text{if success occurs on the $i$th 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.

-

Thank you for the answer, I didn't even think to use linearity and I got really stuck working with the definition. – Belgi Dec 9 '12 at 23:25
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 12, "mathjax_display_tex": 3, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9446888566017151, "perplexity_flag": "head"}