Binomial distribution

From Maths
Jump to: navigation, search
Binomial distribution
XBin(n,p)
p[0,1]R, nN0
Definition
p.m.f P[X=k]:=nCk pk(1p)nk

Definition

Derivation

Let there be n items, X1,,Xn which can take the values "yes" or "no", we denote by yi the ith Xj taking the value y and similarly for nj.


We are interested in getting exactly k ys. (specifically how many combinations there are of various Xi for getting ys, we consider for example y1y2 the same as y2y1, these are distinct permutations but the same combinations)

  • We can choose the first y to come from any of the n Xjs so there are n ways to choose this
  • The next y can only come from n1 Xs (as 1 of them is already taken)
  • The next y can only come from n2 Xs

and so on, the result is n(n1)(n2)(n(k1))[Note 1], we may write this as n!(nk)!


Next consider the case where k=3, then one of the ways to choose k may be (1,2,4) (meaning y1y2y4 the rest ns), and another way is (2,1,4), meaning y2y1y4), notice that these are "the same" (as combinations, but are different permutations), they both have X1, X2 and X4 being "yes".

Notice that choosing from {1,2,4} there are 3 ways to choose the first element, 2 ways for the second and only one way (the remaining item) for the third.


Thus, in general, of the k chosen Xs to represent "yes"s, there are:

  • k ways to choose the first element
  • k1 ways to choose the second element
  • ....
  • 2 ways to choose the k1th element,
  • 1 way to choose the final element.

So there are k(k1)21 ways to choose these k chosen elements.

This is just k!

Thus the n!(nk)! ways to choose count the same collection of k elements k! times (as in the example, the elements 1, 2 and 4 were counted 6 times, 2 were explicitly given)

So we divide n!(nk)! by k! to yield

Motivating example

Suppose we flip a coin 3 times and count the number of heads, we want to find the probability that there is exactly 1 head. Notice that there are 3 distinct outcomes which have exactly one head, htt, tht and tth, assuming each instance of one head and two tails has the same probability (p(1p)(1p) for independent flips, and p the probability of a head on a single flip) we can just multiply that probability by 3.

In general for n coin flips, the probability of exactly k heads depends nCk distinct outcomes, each with k heads.

As above, assuming each flip is independent and the probability of any individual flip yielding heads being p, then the probability of exactly k heads from the n flips is:

  • nCk pk(1p)nk

Notes

  1. Jump up We stop at (n(k1)) as for k=1 it's just n or n0, for k=2 it's (n0)(n1) and so forth, we always stop at (n(k1)).