Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Say an event has $30%$ chances of happening $30/100$. If we run 100 experiments, what are the odds that the event will happen exactly $30$ times? What are the odds it will happen $50$ times or $10$ times? I am interested in learning the formula behind the calculations so I can run it with different numbers. Thanks.

share|improve this question
    
Do you want the odds or the probability? The odds against the event occurring are $7$ to $3$; the _probability is $0.3$. –  Dilip Sarwate Nov 18 '11 at 16:46
add comment

2 Answers

up vote 4 down vote accepted

The number of events in the $n$ trials is $Y_n = X_1 + X_2 + \ldots + X_n$, where $X_i$ is the indicator variable, equal to 1 if the event took place and zero otherwise. Each $X_i$ is independent and has Bernoulli distribution with parameter $p=\frac{3}{10}$.

The sum of $n$ independent Bernoulli random variable is equal in distribution to the Binomial random varaiable. Hence $Y_n \sim \mathrm{Binom}(n,p)$.

Then $$ \mathbb{P}(Y_{n} = k) = \binom{n}{k} p^k (1-p)^{n-k} $$ With some computations we find $\mathbb{P}(Y_{100} = 30) = 0.0867839$, and $ \mathbb{P}(Y_{100} = 50 \lor Y_{100} = 10) = \mathbb{P}(Y_{100} = 50) + \mathbb{P}(Y_{100} = 10) = 0.0000141966$.

enter image description here

share|improve this answer
    
Exactly what I was looking for. Thank you. –  Cristian Nov 18 '11 at 16:57
1  
A mistake often made in the real world is assuming that the trials are independent. –  Ben Hocking Nov 18 '11 at 18:38
add comment

Say an event has probability $p$ of happening. If we run $n$ experiments, the most likely number of times for the event to happen is $np$ (assuming $np$ is an integer.) what are the odds that the event happens $np$ times? In particular, can we come up with an approximate formula for this that doesn't include binomial coefficients?

As Sasha points out, this is $$ P(Y_n = np) = {n \choose np} p^{np} (1-p)^{n-np}. $$ Let $q = 1-p$ for ease of notation; then $$ P(Y_n = np) = {n! \over (np)! (nq)!} (p^p q^q)^n. $$ Now by Stirling's approximation, we have $$n! \sim \sqrt{2\pi n} \left( {n \over e} \right)^n. $$ Therefore $$ P(Y_n = np) \sim {\sqrt{2\pi n} (n/e)^n \over \sqrt{2\pi pn} (pn/e)^{pn} \sqrt{2\pi qn} (qn/e)^{qn}} (p^p q^q)^n $$ and after a lot of things cancel out you get $$ P(Y_n = np) \sim {1 \over \sqrt{2\pi npq}}. $$ So the probability of getting the most likely number of successes goes down like $\sqrt{n}$. For example consider $p = 1/2$; then we get $$ P(Y_n = n/2) \sim {1 \over \sqrt{n \pi/2}} \approx {0.8 \over \sqrt{n}}. $$ So if I flip 100 coins the probability of getting 50 heads is about $0.8/\sqrt{100} = 0.08$; if I flip 400 coins (four times as many) the probability of getting 200 heads is about $0.8/\sqrt{400} = 0.04$, half what it was.

share|improve this answer
    
I can only chose one answer and I chose Sasha's already. If I could I would chose you both. You're a very helpful bunch. Thanks. –  Cristian Nov 18 '11 at 17:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.