binomial distribution: number of successes k in n independent trials, each succeeding with the same probability p
needs independent trials, exactly two outcomes each, constant p
P(X=k)=(kn)pk(1−p)n−k,k=0,1,…,n
- $\binom{n}{k}$ counts the ways to place the $k$ successes among the $n$ trials
- mean $\mu = np$ ( a sum of $n$ indicators, by [[Linearity of Expectation]] ), variance $\sigma^2 = np(1 - p)$
- CDF: $P(X \le k) = \sum_{i=0}^{k} \binom{n}{i} p^i (1 - p)^{n - i}$
example: flip a fair coin 10 times, chance of exactly 6 heads
P(X=6)=(610)(0.5)10=1024210≈0.205
negative binomial: flip it around and count the failures k before the r-th success
P(X=k)=(kk+r−1)pr(1−p)k
expected total trials to get r successes: E(T)=pr
when it stops fitting or gets expensive
trials not independent ( sampling without replacement ): use the hypergeometric