2.7.13Statistics & Probability — Intermediate

Binomial distribution — PMF, mean, variance

1,753 words8 min readdifficulty · medium6 backlinks

The four conditions (BINS)


Deriving the PMF from scratch

HOW — build one specific outcome first. Suppose the first kk trials succeed and the rest fail:

SSSk FFFnk\underbrace{S\,S\cdots S}_{k}\ \underbrace{F\,F\cdots F}_{n-k}

Because trials are independent, multiply probabilities:

P(this exact sequence)=pppk(1p)(1p)nk=pk(1p)nk.P(\text{this exact sequence}) = \underbrace{p\cdot p\cdots p}_{k}\cdot\underbrace{(1-p)\cdots(1-p)}_{n-k} = p^k(1-p)^{n-k}.

Why this step? Independence lets probabilities of a joint event factor into a product.

Now count the arrangements. Any sequence with kk successes (in any positions) has the same probability pk(1p)nkp^k(1-p)^{n-k}. The number of such sequences = number of ways to choose which kk of the nn slots are successes:

(nk)=n!k!(nk)!.\binom{n}{k} = \frac{n!}{k!\,(n-k)!}.

Why this step? We only care about the count kk, not the order, so we sum over all equally-likely orderings.

Figure — Binomial distribution — PMF, mean, variance

Mean: the slick way (indicator trick)

HOW. Write X=X1+X2++XnX = X_1 + X_2 + \cdots + X_n, where Xi=1X_i = 1 if trial ii succeeds, else 00. These are indicator (Bernoulli) variables.

For one indicator:

E[Xi]=1p+0(1p)=p.E[X_i] = 1\cdot p + 0\cdot(1-p) = p.

Why this step? Expectation is (value)×(prob)\sum (\text{value})\times(\text{prob}); only the "1·p" term survives.

By linearity of expectation (works even without independence):

E[X]=i=1nE[Xi]=np.E[X] = \sum_{i=1}^n E[X_i] = np.

Variance: needs independence

HOW. For one indicator, Xi2=XiX_i^2 = X_i (since 02=0, 12=10^2=0,\ 1^2=1), so E[Xi2]=pE[X_i^2]=p. Then:

Var(Xi)=E[Xi2](E[Xi])2=pp2=p(1p).\text{Var}(X_i) = E[X_i^2] - (E[X_i])^2 = p - p^2 = p(1-p).

Why this step? Definition Var=E[X2](E[X])2\text{Var}=E[X^2]-(E[X])^2; the identity Xi2=XiX_i^2=X_i is the key shortcut.

Independence ⇒ variances add:

Var(X)=i=1nVar(Xi)=np(1p).\text{Var}(X) = \sum_{i=1}^n \text{Var}(X_i) = np(1-p).

Worked examples


Common mistakes


Active recall

Recall Answer before revealing

Q: Why does the mean have no (1p)(1-p) but variance does? Mean comes from linearity: each trial adds pp on average → npnp. Variance of one Bernoulli is pp2=p(1p)p-p^2=p(1-p); independence lets these add → np(1p)np(1-p). The extra qq measures how spread out outcomes are, maximal at p=0.5p=0.5.

Recall Feynman: explain to a 12-year-old

Imagine tossing 10 thumbtacks. Each lands point-up with the same chance. "How many point-up?" is a binomial question. On average you get (chance × number of tacks) point-ups — that's npnp. Whether a single tack is up doesn't change the others, so we can just add up each tack's little "wiggle" of uncertainty to get the total wiggle — that's the variance np(1p)np(1-p). The (nk)\binom{n}{k} is just "how many different tacks could be the up-ones."


Flashcards

What four conditions make a variable binomial?
BINS — Binary trials, Independent, fixed Number n, Same probability p.
State the binomial PMF.
P(X=k)=(nk)pk(1p)nkP(X=k)=\binom{n}{k}p^k(1-p)^{n-k} for k=0,,nk=0,\dots,n.
Where does (nk)\binom{n}{k} come from in the PMF?
It counts the number of orderings of kk successes among nn trials, all equally likely.
What is E[X]E[X] for Bin(n,p)\text{Bin}(n,p) and how is it derived?
npnp; via X=XiX=\sum X_i of Bernoulli indicators with E[Xi]=pE[X_i]=p and linearity of expectation.
What is Var(X)\text{Var}(X) for Bin(n,p)\text{Bin}(n,p)?
np(1p)np(1-p); each Bernoulli has variance p(1p)p(1-p), added by independence.
Why does variance need independence but mean doesn't?
Mean uses linearity (always holds); variance of a sum adds only when covariances vanish, i.e. independent trials.
For which pp is binomial variance maximised?
p=0.5p=0.5, giving np0.25np\cdot0.25; zero at p=0p=0 or 11.
Prove the PMF sums to 1.
k(nk)pk(1p)nk=(p+(1p))n=1\sum_k\binom{n}{k}p^k(1-p)^{n-k}=(p+(1-p))^n=1 by the Binomial Theorem.
When is a success/fail experiment NOT binomial?
When p changes or trials are dependent (e.g. sampling without replacement → hypergeometric).
Best way to compute "at least one" success?
Use complement: 1P(zero successes)=1(1p)n1-P(\text{zero successes})=1-(1-p)^n.

Connections

  • Bernoulli distribution — the n=1n=1 building block of the binomial.
  • Binomial Theorem — supplies (nk)\binom{n}{k} and proves total probability =1=1.
  • Linearity of expectation — gives mean without messy sums.
  • Variance and covariance — why independence lets variances add.
  • Poisson distribution — limit of binomial when n, p0, np=λn\to\infty,\ p\to0,\ np=\lambda fixed.
  • Normal approximation to binomial — for large nn, Bin(n,p)N(np,np(1p))\text{Bin}(n,p)\approx N(np,\,np(1-p)).
  • Hypergeometric distribution — the "without replacement" cousin.

Concept Map

defines

X counts

factors probability

counts arrangements

multiply by count

sums to 1 via

split into

E of each is p

linearity of expectation

needs independence

derived from

BINS conditions

X ~ Bin n,p

Number of successes k

Independence

One sequence prob p^k times 1-p ^n-k

Choose k of n slots

Binomial PMF

Binomial Theorem

Indicator variables X_i

Mean np

Variance np 1-p

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Socho tumhare paas ek coin hai jise tum nn baar fenk rahe ho, aur har baar "success" aane ka same chance pp hai. Total kitni baar success aaya — us count ko Binomial random variable kehte hain. Yaad rakho BINS: Binary outcome, Independent trials, Number nn fixed, aur Same probability pp. Agar in mein se koi bhi condition tootti hai (jaise cards without replacement, jahan pp change hota hai), to woh binomial nahi rehta.

PMF ka formula (nk)pk(1p)nk\binom{n}{k}p^k(1-p)^{n-k} hai. Isko ratna mat — samjho. Ek specific sequence (jaise pehle kk success phir baaki fail) ki probability independence se multiply karke pk(1p)nkp^k(1-p)^{n-k} banti hai. Phir (nk)\binom{n}{k} isliye lagta hai kyunki kk successes kitni alag positions mein aa sakte hain — usko count karna hota hai. Yehi coefficient bhoolna sabse common galti hai.

Mean npnp hai — bahut seedha logic: har trial average pp successes deta hai, nn trials ko jodo to npnp. Ye linearity of expectation se aata hai, independence ki zaroorat bhi nahi. Variance np(1p)np(1-p) hai — yahan ek Bernoulli ka variance p(1p)p(1-p) hota hai (kyunki Xi2=XiX_i^2 = X_i), aur independence ki wajah se sab add ho jaate hain. Dhyaan do: mean mein (1p)(1-p) nahi hai par variance mein hai — isko mat mix karna. Yaad karne ka tareeka: "mean is money earned per try (np), variance ek extra tax qq leta hai (npq)."

Practical me: "at least one" type questions me hamesha complement use karo — 1(1p)n1-(1-p)^n — warna saare terms add karne padenge. Ye 80/20 shortcut exams me time bachata hai.

Go deeper — visual, from zero

Test yourself — Statistics & Probability — Intermediate

Connections