Search

Binomial Distributions,

A Bernoulli trial is any expert with a success rate of p, and only 2 outcomes.
Probability of k successes in n repeated trials, is given by the binomial distribution.  
If we have the r.v. X to measure the #of successes in n trials, then:
Pr(X=k)= (nCk) p^k (1-p)^{n-k}
 
We can see the formula above comes from the fact that the prob of each success is p, so p^k is prob for the k of the n trials that result in success...the (1-p)^{n-k} is the collective prob for each of the n-k failures...then we need to determine how many orderings those n trails (k successes and n-k failures) could of come up in...
 
This is like ordering the LETTERS....SSSS...FFFFFF, where we have k many S's and n-k many F's...remember the problems with colored flags on the flagpole?  If I have k many white flags to put up into n many slots...and all my other flags are black, how many orderings are there??  nCk...the coefficient in the formula above!
 
The questions about more or less than a certain number of one type of result, are meant to be done with the above distribution, where we sum up all the appropriate values to create a CDF from the probability formulas above.
 
For example...if Rosencrantz flips his unfair (where the prob of heads, p=.95) coin 1000 times, what are the odds he gets NO tails?  What are the odds he gets no more than 1, 2, or 3 tails?
 
Pr(X=1000) = 1000choose1000 (.95)^1000 (.05)^0
Pr(X=999) = 1000choose999 (.95)^999 (.05)^1
Pr(X=998) = 1000choose998 (.95)^998 (.05)^2
Pr(X=997) = 1000choose997 (.95)^997 (.05)^3
 
So the prob of no more than 1 is Pr(X=1000)+Pr(X=999)
Prob of no more than 2 is (Prob no more than 1)+Pr(X=998) = Pr(X=1000)+Pr(X=999)+Pr(X=998)
and so on...
 
Note we could alternatively have declared Tails to be the success with prob=.05 and then heads still has prob=1-.05=.95...this would create a different distribution, Y but lead to the same results...as then Pr(Y=2tails)=1000choose2(.05)^2(.95)^998...which is the same as Pr(X=998) above because the choose function is symmetric...nCk=nC(n-k)...think coefficients in pascals triangle!
 
There are lots of neat facts about these coefficients and how they can be found algebraically...for instance the coefficient of x^k in the expansion of (x+1)^n...and if we look at
(x+y)^n = SUM_{k=1...n} nCk x^{n-k} y^k...note that this is similar to above where we have x=p and y=1-p...note that p and 1-p sum to 1...meaning the Pr(any number of heads by R-crantz)=1, as expected! 
 
 
I may add some more about an example to tie p-values, z-tests, and t-tests into this, if I can think of a good one...until then here is a good reference on those other related statistical topics:
 
 
Remember:
"The p-value is the probability of observing an effect given that the null hypothesis is true whereas the significance or alpha (α) level is the probability of rejecting the null hypothesis given that it is true." -wiki
If we find the p-value to be smaller than alpha, we reject the null hypothesis.
if (isMyPost) { }