How to calculate an expected result?

41 Views Asked by At

I'm not a mathematician, but a programmer who loves solving math puzzles, so please forgive me if I don't use the correct terms.

Imagine there are 100 lotteries with 100 tickets each. The lotteries have no connection at each other and all lotteries have exactly 1 price. I buy 1 ticket from each lottery so in the end I have 100 tickets from 100 lotteries.

I know how to calculate the probability P(x) for getting x prices, with x in range from 0..100. In total all probabilities added gives 1.0

My question is: What is the expected number of prices I'll win? How do I calculate this correctly?

2

There are 2 best solutions below

0
On

You can define a random variable $X$ - the number of successes (success = winning the price) in 100 draws. Each draw has a chance to win of $1/100 = 0.01$. Because the draws are independent (Bernoulli trials), $X$ is binomially distributed with $n=100$ and $p=0.01$, i.e. $X \sim Bin(n, p)$, or $ X \sim Bin(100, 0.01)$. The expected value of a binomially distributed variable is $E(X) = n \cdot p$, that's why $E(X) = 100 \cdot 0.01 = 1$. (The expected value for the binomial distribution is very intuitive).

0
On

This is a more direct answer that avoids binomial distribution.

Number the lotteries with $1,2,\dots,100$.

For $i=1,2,\dots,100$ let random variable $X_i$ take value $1$ if you win at lottery $i$ and let $X_i$ take value $0$ otherwise.

Then the total number of prizes you win is:$$X:=\sum_{i=1}^{100}X_i$$With linearity of expectation (I hope you are familiar with that and if not then see this as a stimulus to get familiar with it) and symmetry we find:$$\mathbb EX=\sum_{i=1}^{100}\mathbb EX_i=100\mathbb EX_1$$

Here: $$\mathbb EX_1=1\times P(X_1=1)+0\times P(X_1=0)=P(X_1=1)=0.01$$So we end up with: $$\mathbb EX=100\times0.01=1$$