Uniform (continuous) shows full integral work. Binomial, Geometric, Negative Binomial, and Poisson show full summation/series steps. Use the toggles to expand each derivation.
Geometric(p) — Detailed Derivations (failures before 1st success)
Definition used here: \(X\in\{0,1,2,\dots\}\) counts failures before the first success in i.i.d. Bernoulli(p) trials.
PMF: \(\displaystyle P(X=k)=(1-p)^k\,p,\; k=0,1,2,\dots\). Let \(q=1-p\).
Standard deviation: \(\displaystyle \sigma = \sqrt{\dfrac{1-p}{p^{2}}} = \dfrac{\sqrt{1-p}}{p}.\)
Step 5 — Alternative Parameterization (trials to first success)
Some books define \(T\in\{1,2,\dots\}\) as the trial number of the first success: \(P(T=t)=q^{t-1}p\). Then \(T=X+1\).
\(E[T]=E[X]+1=\dfrac{1}{p}\)
\(Var(T)=Var(X)=\dfrac{1-p}{p^{2}}\)
Same variance, mean differs by 1 because supports differ by a shift.
Intuition: When \(p\) is small, the expected number of failures before a success grows like \(1/p\) and variability is large (order \(1/p^{2}\)).
Negative Binomial(r,p) — Detailed Derivations
PMF (failures before r-th success): \( \displaystyle P(X=k)=\binom{k+r-1}{k}(1-p)^k p^r,\; k=0,1,2,\dots\).
Counts the total number of failures until the \(r\)-th success occurs in i.i.d. Bernoulli(p) trials.
Approach A — Sum of r Geometric(p)
Let \(G_i\stackrel{iid}{\sim}\text{Geometric}(p)\) (failures before first success), so \(E[G_i]=\frac{1-p}{p}\), \(Var(G_i)=\frac{1-p}{p^2}\).
The total failures before the \(r\)-th success is \(X=\sum_{i=1}^r G_i\) (independent sum).
Use factorial moments: \(E[X]=\sum k\,P(X=k)\), \(E[X(X-1)]=\sum k(k-1)P(X=k)\).
Identities (can be shown by differentiating the series for \(G_X(s)\)):
MGF: \(M_X(t)=E[e^{tX}]=\exp(\lambda(e^t-1))\). Then \(M'_X(0)=\lambda,\; M''_X(0)=\lambda + \lambda^2\Rightarrow Var=\lambda.\)
Approach C — Direct Summation Check (optional)
Using \(\sum_{k=0}^{\infty}\frac{\lambda^k}{k!}=e^{\lambda}\) and its derivatives with respect to \(\lambda\),
you can re-derive \(E[X]=\lambda\) and \(E[X^2]=\lambda+\lambda^2\), hence \(Var=\lambda\).
Summary: All methods yield \(E[X]=\lambda\) and \(Var(X)=\lambda\).
Tip for students: After reading the derivations here, go back to your Excel N=10 simulations and check how your sample mean/variance compare to these results.