A probability space is a triple ( Ω , F , P ) (\Omega, \mathcal{F}, P) ( Ω , F , P ) where:
Ω \Omega Ω is the sample space (set of all possible outcomes).F \mathcal{F} F is a sigma-algebra (collection of events) on Ω \Omega Ω .P : F → [ 0 , 1 ] P : \mathcal{F} \to [0,1] P : F → [ 0 , 1 ] is a probability measure .Definition. A sigma-algebra (or σ \sigma σ -algebra) F \mathcal{F} F on a set Ω \Omega Ω is a collection of subsets Of Ω \Omega Ω satisfying:
Ω ∈ F \Omega \in \mathcal{F} Ω ∈ F .If A ∈ F A \in \mathcal{F} A ∈ F Then A c ∈ F A^c \in \mathcal{F} A c ∈ F (closed under complementation). If A 1 , A 2 , A 3 , … ∈ F A_1, A_2, A_3, \ldots \in \mathcal{F} A 1 , A 2 , A 3 , … ∈ F Then ⋃ i = 1 ∞ A i ∈ F \bigcup_{i=1}^{\infty} A_i \in \mathcal{F} ⋃ i = 1 ∞ A i ∈ F (closed under countable unions). Remark. From (2) and (3), F \mathcal{F} F is also closed under countable intersections (by De Morgan”s laws). The pair ( Ω , F ) (\Omega, \mathcal{F}) ( Ω , F ) is called a measurable space .
Example 1.1. For any set Ω \Omega Ω The trivial sigma-algebra is \\{\\emptyset, \\Omega\\} and the power Set P ( Ω ) \mathcal{P}(\Omega) P ( Ω ) is also a sigma-algebra.
Example 1.2. If Ω = { 1 , 2 , 3 , 4 , 5 , 6 } \Omega = \{1, 2, 3, 4, 5, 6\} Ω = { 1 , 2 , 3 , 4 , 5 , 6 } (a fair die), then F = P ( Ω ) \mathcal{F} = \mathcal{P}(\Omega) F = P ( Ω ) contains all 2 6 = 64 2^6 = 64 2 6 = 64 subsets. This is the sigma-algebra used for finite Sample spaces.
Example 1.3. For Ω = R \Omega = \mathbb{R} Ω = R The Borel sigma-algebra B \mathcal{B} B is the smallest sigma-algebra Containing all open intervals. It is generated by taking countable unions, intersections, and complements of open Sets. We write ( R , B ) (\mathbb{R}, \mathcal{B}) ( R , B ) .
Proposition 1.0. The intersection of any collection of sigma-algebras on Ω \Omega Ω is a sigma-algebra.
Proof. Let \\{\\mathcal{{'}F{}'}_\\alpha\\} be a collection of sigma-algebras. Then: (1) Ω ∈ F α \Omega \in \mathcal{F}_\alpha Ω ∈ F α for all α \alpha α So Ω ∈ ⋂ α F α \Omega \in \bigcap_\alpha \mathcal{F}_\alpha Ω ∈ ⋂ α F α . (2) If A ∈ ⋂ α F α A \in \bigcap_\alpha \mathcal{F}_\alpha A ∈ ⋂ α F α Then A ∈ F α A \in \mathcal{F}_\alpha A ∈ F α for all α \alpha α So A c ∈ F α A^c \in \mathcal{F}_\alpha A c ∈ F α for all α \alpha α Hence A c ∈ ⋂ α F α A^c \in \bigcap_\alpha \mathcal{F}_\alpha A c ∈ ⋂ α F α . (3) Countable unions follow similarly. ■ \blacksquare ■
Intuition. This proposition guarantees that for any collection of subsets E \mathcal{E} E There exists a smallest Sigma-algebra containing E \mathcal{E} E Called the sigma-algebra generated by E \mathcal{E} E Denoted σ ( E ) \sigma(\mathcal{E}) σ ( E ) .
Non-negativity : P ( A ) ≥ 0 P(A) \geq 0 P ( A ) ≥ 0 for all A ∈ F A \in \mathcal{F} A ∈ F .Normalisation : P ( Ω ) = 1 P(\Omega) = 1 P ( Ω ) = 1 .Countable additivity : If A 1 , A 2 , … A_1, A_2, \ldots A 1 , A 2 , … are pairwise disjoint events, thenP ( ⋃ i = 1 ∞ A i ) = ∑ i = 1 ∞ P ( A i ) P\left(\bigcup_{i=1}^{\infty} A_i\right) = \sum_{i=1}^{\infty} P(A_i) P ( ⋃ i = 1 ∞ A i ) = ∑ i = 1 ∞ P ( A i )
Proposition 1.1. P ( ∅ ) = 0 P(\emptyset) = 0 P ( ∅ ) = 0 .
Proof. Ω = Ω ∪ ∅ \Omega = \Omega \cup \emptyset Ω = Ω ∪ ∅ (disjoint union), so P ( Ω ) = P ( Ω ) + P ( ∅ ) P(\Omega) = P(\Omega) + P(\emptyset) P ( Ω ) = P ( Ω ) + P ( ∅ ) Hence P ( ∅ ) = 0 P(\emptyset) = 0 P ( ∅ ) = 0 . ■ \blacksquare ■
Proposition 1.2 (Complement). P ( A c ) = 1 − P ( A ) P(A^c) = 1 - P(A) P ( A c ) = 1 − P ( A ) .
Proposition 1.3 (Monotonicity). If A ⊆ B A \subseteq B A ⊆ B Then P ( A ) ≤ P ( B ) P(A) \leq P(B) P ( A ) ≤ P ( B ) .
Proof. Write B = A ∪ ( B ∖ A ) B = A \cup (B \setminus A) B = A ∪ ( B ∖ A ) A disjoint union. By countable additivity, P ( B ) = P ( A ) + P ( B ∖ A ) ≥ P ( A ) P(B) = P(A) + P(B \setminus A) \geq P(A) P ( B ) = P ( A ) + P ( B ∖ A ) ≥ P ( A ) since P ( B ∖ A ) ≥ 0 P(B \setminus A) \geq 0 P ( B ∖ A ) ≥ 0 . ■ \blacksquare ■
Proposition 1.4 (Inclusion-Exclusion). For any two events A , B A, B A , B :
P ( A ∪ B ) = P ( A ) + P ( B ) − P ( A ∩ B ) P(A \cup B) = P(A) + P(B) - P(A \cap B) P ( A ∪ B ) = P ( A ) + P ( B ) − P ( A ∩ B )
Proof. Write A ∪ B = A ∪ ( B ∖ A ) A \cup B = A \cup (B \setminus A) A ∪ B = A ∪ ( B ∖ A ) as a disjoint union. Then P ( A ∪ B ) = P ( A ) + P ( B ∖ A ) P(A \cup B) = P(A) + P(B \setminus A) P ( A ∪ B ) = P ( A ) + P ( B ∖ A ) . Since B = ( B ∖ A ) ∪ ( A ∩ B ) B = (B \setminus A) \cup (A \cap B) B = ( B ∖ A ) ∪ ( A ∩ B ) is also disjoint, P ( B ) = P ( B ∖ A ) + P ( A ∩ B ) P(B) = P(B \setminus A) + P(A \cap B) P ( B ) = P ( B ∖ A ) + P ( A ∩ B ) So P ( B ∖ A ) = P ( B ) − P ( A ∩ B ) P(B \setminus A) = P(B) - P(A \cap B) P ( B ∖ A ) = P ( B ) − P ( A ∩ B ) . Substituting gives the Result. ■ \blacksquare ■
Proposition 1.5 (General Inclusion-Exclusion). For events A 1 , … , A n A_1, \ldots, A_n A 1 , … , A n :
P ( ⋃ i = 1 n A i ) = ∑ i P ( A i ) − ∑ i < j P ( A i ∩ A j ) + ∑ i < j < k P ( A i ∩ A j ∩ A k ) − ⋯ + ( − 1 ) n + 1 P ( A 1 ∩ ⋯ ∩ A n ) P\left(\bigcup_{i=1}^n A_i\right) = \sum_{i} P(A_i) - \sum_{i \lt j} P(A_i \cap A_j) + \sum_{i \lt j \lt k} P(A_i \cap A_j \cap A_k) - \cdots + (-1)^{n+1} P(A_1 \cap \cdots \cap A_n) P ( ⋃ i = 1 n A i ) = ∑ i P ( A i ) − ∑ i < j P ( A i ∩ A j ) + ∑ i < j < k P ( A i ∩ A j ∩ A k ) − ⋯ + ( − 1 ) n + 1 P ( A 1 ∩ ⋯ ∩ A n )
Proposition 1.6 (Boole’s Inequality). P ( A ∪ B ) ≤ P ( A ) + P ( B ) P(A \cup B) \leq P(A) + P(B) P ( A ∪ B ) ≤ P ( A ) + P ( B ) . More generally,
P ( ⋃ i = 1 n A i ) ≤ ∑ i = 1 n P ( A i ) P\left(\bigcup_{i=1}^n A_i\right) \leq \sum_{i=1}^n P(A_i) P ( ⋃ i = 1 n A i ) ≤ ∑ i = 1 n P ( A i )
Definition. The conditional probability of A A A given B B B (where P ( B ) > 0 P(B) \gt 0 P ( B ) > 0 ) is
P ( A ∣ B ) = P ( A ∩ B ) P ( B ) P(A \mid B) = \frac{P(A \cap B)}{P(B)} P ( A ∣ B ) = P ( B ) P ( A ∩ B )
Intuition. Conditioning on B B B restricts the sample space to B B B and rescales so that P ( B ∣ B ) = 1 P(B \mid B) = 1 P ( B ∣ B ) = 1 .
Theorem 1.1 (Law of Total Probability). If B 1 , … , B n B_1, \ldots, B_n B 1 , … , B n partition Ω \Omega Ω with P ( B i ) > 0 P(B_i) \gt 0 P ( B i ) > 0 :
P ( A ) = ∑ i = 1 n P ( A ∣ B i ) P ( B i ) P(A) = \sum_{i=1}^n P(A \mid B_i) P(B_i) P ( A ) = ∑ i = 1 n P ( A ∣ B i ) P ( B i )
Proof. Since B 1 , … , B n B_1, \ldots, B_n B 1 , … , B n partition Ω \Omega Ω We have A = ⋃ i = 1 n ( A ∩ B i ) A = \bigcup_{i=1}^n (A \cap B_i) A = ⋃ i = 1 n ( A ∩ B i ) (disjoint union). By countable additivity:
P ( A ) = ∑ i = 1 n P ( A ∩ B i ) = ∑ i = 1 n P ( A ∣ B i ) P ( B i ) P(A) = \sum_{i=1}^n P(A \cap B_i) = \sum_{i=1}^n P(A \mid B_i)\, P(B_i) P ( A ) = ∑ i = 1 n P ( A ∩ B i ) = ∑ i = 1 n P ( A ∣ B i ) P ( B i )
■ \blacksquare ■
Theorem 1.2 (Bayes’ Theorem). For events A A A and B B B with P ( B ) > 0 P(B) \gt 0 P ( B ) > 0 :
P ( A ∣ B ) = P ( B ∣ A ) P ( A ) P ( B ) P(A \mid B) = \frac{P(B \mid A) P(A)}{P(B)} P ( A ∣ B ) = P ( B ) P ( B ∣ A ) P ( A )
In the partition form:
P ( B j ∣ A ) = P ( A ∣ B j ) P ( B j ) ∑ i = 1 n P ( A ∣ B i ) P ( B i ) P(B_j \mid A) = \frac{P(A \mid B_j) P(B_j)}{\sum_{i=1}^n P(A \mid B_i) P(B_i)} P ( B j ∣ A ) = ∑ i = 1 n P ( A ∣ B i ) P ( B i ) P ( A ∣ B j ) P ( B j )
Proof. By definition, P ( A ∣ B ) = P ( A ∩ B ) / P ( B ) P(A \mid B) = P(A \cap B)/P(B) P ( A ∣ B ) = P ( A ∩ B ) / P ( B ) and P ( B ∣ A ) = P ( A ∩ B ) / P ( A ) P(B \mid A) = P(A \cap B)/P(A) P ( B ∣ A ) = P ( A ∩ B ) / P ( A ) . Solving the Second for P ( A ∩ B ) = P ( B ∣ A ) P ( A ) P(A \cap B) = P(B \mid A) P(A) P ( A ∩ B ) = P ( B ∣ A ) P ( A ) and substituting into the first gives Bayes’ theorem. The partition Form follows by applying the law of total probability to the denominator P ( B ) P(B) P ( B ) . ■ \blacksquare ■
Problem 1.1. A bag contains 4 red and 6 blue marbles. Two marbles are drawn without replacement. What is the Probability that both are red?
Solution Let R 1 R_1 R 1 be the event “first marble is red” and R 2 R_2 R 2 be “second marble is red.” Then:
P ( R 1 ∩ R 2 ) = P ( R 1 ) P ( R 2 ∣ R 1 ) = 4 10 ⋅ 3 9 = 12 90 = 2 15 P(R_1 \cap R_2) = P(R_1)\, P(R_2 \mid R_1) = \frac{4}{10} \cdot \frac{3}{9} = \frac{12}{90} = \frac{2}{15} P ( R 1 ∩ R 2 ) = P ( R 1 ) P ( R 2 ∣ R 1 ) = 10 4 ⋅ 9 3 = 90 12 = 15 2
Problem 1.2. A disease affects 1% of a population. A test has sensitivity 95% (P ( p o s i t i v e ∣ d i s e a s e ) = 0.95 P(\mathrm{positive} \mid \mathrm{disease}) = 0.95 P ( positive ∣ disease ) = 0.95 ) And specificity 90% (P ( n e g a t i v e ∣ h e a l t h y ) = 0.90 P(\mathrm{negative} \mid \mathrm{healthy}) = 0.90 P ( negative ∣ healthy ) = 0.90 ). If a person tests positive, what is the Probability they have the disease?
Solution Let D D D = “has disease” and + + + = “tests positive.” We want P ( D ∣ + ) P(D \mid +) P ( D ∣ + ) .
By Bayes’ theorem:
P ( D ∣ + ) = P ( + ∣ D ) P ( D ) P ( + ∣ D ) P ( D ) + P ( + ∣ D c ) P ( D c ) P(D \mid +) = \frac{P(+ \mid D)\, P(D)}{P(+ \mid D)\, P(D) + P(+ \mid D^c)\, P(D^c)} P ( D ∣ + ) = P ( + ∣ D ) P ( D ) + P ( + ∣ D c ) P ( D c ) P ( + ∣ D ) P ( D )
= 0.95 × 0.01 0.95 × 0.01 + 0.10 × 0.99 = 0.0095 0.0095 + 0.099 = 0.0095 0.1085 ≈ 0.0876 = \frac{0.95 \times 0.01}{0.95 \times 0.01 + 0.10 \times 0.99} = \frac{0.0095}{0.0095 + 0.099} = \frac{0.0095}{0.1085} \approx 0.0876 = 0.95 × 0.01 + 0.10 × 0.99 0.95 × 0.01 = 0.0095 + 0.099 0.0095 = 0.1085 0.0095 ≈ 0.0876
So even with a positive test, there is only about an 8.8% chance of having the disease, due to the low prior Probability (base rate fallacy). ■ \blacksquare ■
Proposition 1.7 (General Inclusion-Exclusion). For events A 1 , … , A n A_1, \ldots, A_n A 1 , … , A n :
P ( ⋃ i = 1 n A i ) = ∑ k = 1 n ( − 1 ) k + 1 ∑ 1 ≤ i 1 < ⋯ < i k ≤ n P ( A i 1 ∩ ⋯ ∩ A i k ) P\left(\bigcup_{i=1}^n A_i\right) = \sum_{k=1}^n (-1)^{k+1} \sum_{1 \leq i_1 \lt \cdots \lt i_k \leq n} P(A_{i_1} \cap \cdots \cap A_{i_k}) P ( ⋃ i = 1 n A i ) = ∑ k = 1 n ( − 1 ) k + 1 ∑ 1 ≤ i 1 < ⋯ < i k ≤ n P ( A i 1 ∩ ⋯ ∩ A i k )
Proof. By induction on n n n . The base case n = 1 n = 1 n = 1 is trivial. Assume the result holds for n n n events. For n + 1 n + 1 n + 1 Events:
P ( ⋃ i = 1 n + 1 A i ) = P ( ⋃ i = 1 n A i ) + P ( A n + 1 ) − P ( ⋃ i = 1 n A i ∩ A n + 1 ) P\left(\bigcup_{i=1}^{n+1} A_i\right) = P\left(\bigcup_{i=1}^n A_i\right) + P(A_{n+1}) - P\left(\bigcup_{i=1}^n A_i \cap A_{n+1}\right) P ( ⋃ i = 1 n + 1 A i ) = P ( ⋃ i = 1 n A i ) + P ( A n + 1 ) − P ( ⋃ i = 1 n A i ∩ A n + 1 )
Applying the induction hypothesis to both union terms and rearranging yields the formula for n + 1 n + 1 n + 1 . ■ \blacksquare ■
Problem 1.3. Three machines A, B, C produce items. Machine A produces 50% of items with 2% defective, B produces 30% with 1% defective, and C produces 20% with 3% defective. An item is found to be defective. What is the Probability it was produced by machine A?
Solution Let D D D = “defective” and A A A , B B B , C C C denote production by each machine.
P ( A ) = 0.5 P(A) = 0.5 P ( A ) = 0.5 , P ( B ) = 0.3 P(B) = 0.3 P ( B ) = 0.3 , P ( C ) = 0.2 P(C) = 0.2 P ( C ) = 0.2 . P ( D ∣ A ) = 0.02 P(D \mid A) = 0.02 P ( D ∣ A ) = 0.02 , P ( D ∣ B ) = 0.01 P(D \mid B) = 0.01 P ( D ∣ B ) = 0.01 , P ( D ∣ C ) = 0.03 P(D \mid C) = 0.03 P ( D ∣ C ) = 0.03 .
P ( A ∣ D ) = P ( D ∣ A ) P ( A ) P ( D ∣ A ) P ( A ) + P ( D ∣ B ) P ( B ) + P ( D ∣ C ) P ( C ) P(A \mid D) = \frac{P(D \mid A)\, P(A)}{P(D \mid A)\, P(A) + P(D \mid B)\, P(B) + P(D \mid C)\, P(C)} P ( A ∣ D ) = P ( D ∣ A ) P ( A ) + P ( D ∣ B ) P ( B ) + P ( D ∣ C ) P ( C ) P ( D ∣ A ) P ( A )
= 0.02 × 0.5 0.02 × 0.5 + 0.01 × 0.3 + 0.03 × 0.2 = 0.010 0.010 + 0.003 + 0.006 = 0.010 0.019 ≈ 0.526 = \frac{0.02 \times 0.5}{0.02 \times 0.5 + 0.01 \times 0.3 + 0.03 \times 0.2} = \frac{0.010}{0.010 + 0.003 + 0.006} = \frac{0.010}{0.019} \approx 0.526 = 0.02 × 0.5 + 0.01 × 0.3 + 0.03 × 0.2 0.02 × 0.5 = 0.010 + 0.003 + 0.006 0.010 = 0.019 0.010 ≈ 0.526
:::caution Common Pitfall People often confuse P ( A ∣ B ) P(A \mid B) P ( A ∣ B ) with P ( B ∣ A ) P(B \mid A) P ( B ∣ A ) . In medical testing, P ( d i s e a s e ∣ p o s i t i v e ) P(\mathrm{disease} \mid \mathrm{positive}) P ( disease ∣ positive ) Is much lower than P ( p o s i t i v e ∣ d i s e a s e ) P(\mathrm{positive} \mid \mathrm{disease}) P ( positive ∣ disease ) due to low base rates. Always apply Bayes’ Theorem rigorously. :::
A random variable is a measurable function X : Ω → R X : \Omega \to \mathbb{R} X : Ω → R . Measurability means that for every Borel Set B ⊆ R B \subseteq \mathbb{R} B ⊆ R , { X − 1 ( B ) : ω ∈ Ω , X ( ω ) ∈ B } ∈ F \{X^{-1}(B) : \omega \in \Omega, X(\omega) \in B\} \in \mathcal{F} { X − 1 ( B ) : ω ∈ Ω , X ( ω ) ∈ B } ∈ F .
Discrete random variable : takes values in a countable set.Continuous random variable : has a probability density function (PDF).Example 2.1 (Discrete). Roll a fair die. Define X ( ω ) = ω X(\omega) = \omega X ( ω ) = ω . Then X X X takes values in { 1 , 2 , 3 , 4 , 5 , 6 } \{1, 2, 3, 4, 5, 6\} { 1 , 2 , 3 , 4 , 5 , 6 } With P ( X = k ) = 1 / 6 P(X = k) = 1/6 P ( X = k ) = 1/6 for each k k k .
Example 2.2 (Discrete — Indicator). For any event A A A The indicator random variable 1 A \mathbf{1}_A 1 A equals 1 if A A A occurs and 0 otherwise. Then E [ 1 A ] = P ( A ) E[\mathbf{1}_A] = P(A) E [ 1 A ] = P ( A ) and V a r ( 1 A ) = P ( A ) ( 1 − P ( A ) ) \mathrm{Var}(\mathbf{1}_A) = P(A)(1 - P(A)) Var ( 1 A ) = P ( A ) ( 1 − P ( A )) .
Example 2.3 (Continuous). Let X ∼ U n i f o r m ( 0 , 1 ) X \sim \mathrm{Uniform}(0, 1) X ∼ Uniform ( 0 , 1 ) . Then X X X is the identity on ( 0 , 1 ) (0, 1) ( 0 , 1 ) with PDF f ( x ) = 1 f(x) = 1 f ( x ) = 1 for x ∈ ( 0 , 1 ) x \in (0, 1) x ∈ ( 0 , 1 ) and f ( x ) = 0 f(x) = 0 f ( x ) = 0 otherwise.
Example 2.4 (Mixed). A random variable can be neither purely discrete nor purely continuous. For instance, if X = 0 X = 0 X = 0 with probability 1 / 2 1/2 1/2 and X ∼ E x p ( 1 ) X \sim \mathrm{Exp}(1) X ∼ Exp ( 1 ) with probability 1 / 2 1/2 1/2 Then X X X has an atom at 0 And a continuous part on ( 0 , ∞ ) (0, \infty) ( 0 , ∞ ) .
The CDF of a random variable X X X is
F X ( x ) = P ( X ≤ x ) F_X(x) = P(X \leq x) F X ( x ) = P ( X ≤ x )
Theorem 2.1 (Properties of the CDF).
lim x → − ∞ F ( x ) = 0 \lim_{x \to -\infty} F(x) = 0 lim x → − ∞ F ( x ) = 0 , lim x → + ∞ F ( x ) = 1 \lim_{x \to +\infty} F(x) = 1 lim x → + ∞ F ( x ) = 1 .F F F is non-decreasing: if a < b a \lt b a < b Then F ( a ) ≤ F ( b ) F(a) \leq F(b) F ( a ) ≤ F ( b ) .F F F is right-continuous: lim x → a + F ( x ) = F ( a ) \lim_{x \to a^+} F(x) = F(a) lim x → a + F ( x ) = F ( a ) .P ( a < X ≤ b ) = F ( b ) − F ( a ) P(a \lt X \leq b) = F(b) - F(a) P ( a < X ≤ b ) = F ( b ) − F ( a ) .P ( X = a ) = F ( a ) − F ( a − ) P(X = a) = F(a) - F(a^-) P ( X = a ) = F ( a ) − F ( a − ) where F ( a − ) = lim x → a − F ( x ) F(a^-) = \lim_{x \to a^-} F(x) F ( a − ) = lim x → a − F ( x ) .F F F has at most countably many points of discontinuity.Proof. (1) By monotonicity of P P P : F ( x ) = P ( X ≤ x ) ≤ P ( Ω ) = 1 F(x) = P(X \leq x) \leq P(\Omega) = 1 F ( x ) = P ( X ≤ x ) ≤ P ( Ω ) = 1 and as x → ∞ x \to \infty x → ∞ { X ≤ x } ↑ Ω \{X \leq x\} \uparrow \Omega { X ≤ x } ↑ Ω So by continuity from below, F ( x ) → 1 F(x) \to 1 F ( x ) → 1 . Similarly as x → − ∞ x \to -\infty x → − ∞ { X ≤ x } ↓ ∅ \{X \leq x\} \downarrow \emptyset { X ≤ x } ↓ ∅ and F ( x ) → 0 F(x) \to 0 F ( x ) → 0 .
(2) If a < b a \lt b a < b Then { X ≤ a } ⊆ { X ≤ b } \{X \leq a\} \subseteq \{X \leq b\} { X ≤ a } ⊆ { X ≤ b } So by monotonicity of P P P F ( a ) ≤ F ( b ) F(a) \leq F(b) F ( a ) ≤ F ( b ) .
(3) Let x n ↓ a x_n \downarrow a x n ↓ a . Then { X ≤ x n } ↓ { X ≤ a } \{X \leq x_n\} \downarrow \{X \leq a\} { X ≤ x n } ↓ { X ≤ a } (since { X ≤ a } = ⋂ n { X ≤ x n } \{X \leq a\} = \bigcap_n \{X \leq x_n\} { X ≤ a } = ⋂ n { X ≤ x n } ). By continuity from above of P P P , F ( x n ) → F ( a ) F(x_n) \to F(a) F ( x n ) → F ( a ) .
(4) P ( a < X ≤ b ) = P ( X ≤ b ) − P ( X ≤ a ) = F ( b ) − F ( a ) P(a \lt X \leq b) = P(X \leq b) - P(X \leq a) = F(b) - F(a) P ( a < X ≤ b ) = P ( X ≤ b ) − P ( X ≤ a ) = F ( b ) − F ( a ) .
(5) P ( X = a ) = P ( X ≤ a ) − P ( X < a ) = F ( a ) − lim x ↑ a F ( x ) = F ( a ) − F ( a − ) P(X = a) = P(X \leq a) - P(X \lt a) = F(a) - \lim_{x \uparrow a} F(x) = F(a) - F(a^-) P ( X = a ) = P ( X ≤ a ) − P ( X < a ) = F ( a ) − lim x ↑ a F ( x ) = F ( a ) − F ( a − ) .
(6) Since F F F is non-decreasing, it can have at most countably many jump discontinuities (the sum of all jumps must Be bounded by 1). ■ \blacksquare ■
For a discrete random variable X X X with values { x 1 , x 2 , … } \{x_1, x_2, \ldots\} { x 1 , x 2 , … } :
f X ( x ) = P ( X = x ) = { p i i f x = x i 0 o t h e r w i s e f_X(x) = P(X = x) = \begin{cases} p_i & \mathrm{if} x = x_i \\ 0 & \mathrm{otherwise} \end{cases} f X ( x ) = P ( X = x ) = { p i 0 if x = x i otherwise
Where p i ≥ 0 p_i \geq 0 p i ≥ 0 and ∑ i p i = 1 \sum_i p_i = 1 ∑ i p i = 1 .
A random variable X X X is continuous if there exists a function f X ≥ 0 f_X \geq 0 f X ≥ 0 such that
P ( a ≤ X ≤ b ) = ∫ a b f X ( x ) d x P(a \leq X \leq b) = \int_a^b f_X(x)\, dx P ( a ≤ X ≤ b ) = ∫ a b f X ( x ) d x
And ∫ − ∞ ∞ f X ( x ) d x = 1 \int_{-\infty}^{\infty} f_X(x)\, dx = 1 ∫ − ∞ ∞ f X ( x ) d x = 1 .
Note: f X ( x ) f_X(x) f X ( x ) is not a probability; it is a probability density. For continuous X X X , P ( X = x ) = 0 P(X = x) = 0 P ( X = x ) = 0 For any individual x x x .
Proposition 2.1. If X X X is a continuous random variable with PDF f X f_X f X and g g g is a strictly monotone Differentiable function, then Y = g ( X ) Y = g(X) Y = g ( X ) has PDF
f Y ( y ) = f X ( g − 1 ( y ) ) ⋅ ∣ d d y g − 1 ( y ) ∣ f_Y(y) = f_X(g^{-1}(y)) \cdot \left|\frac{d}{dy} g^{-1}(y)\right| f Y ( y ) = f X ( g − 1 ( y )) ⋅ d y d g − 1 ( y )
Proof. Suppose g g g is strictly increasing. Then F Y ( y ) = P ( Y ≤ y ) = P ( X ≤ g − 1 ( y ) ) = F X ( g − 1 ( y ) ) F_Y(y) = P(Y \leq y) = P(X \leq g^{-1}(y)) = F_X(g^{-1}(y)) F Y ( y ) = P ( Y ≤ y ) = P ( X ≤ g − 1 ( y )) = F X ( g − 1 ( y )) . Differentiating: f Y ( y ) = f X ( g − 1 ( y ) ) ⋅ ( g − 1 ) ′ ( y ) f_Y(y) = f_X(g^{-1}(y)) \cdot (g^{-1})'(y) f Y ( y ) = f X ( g − 1 ( y )) ⋅ ( g − 1 ) ′ ( y ) . For decreasing g g g The inequality reverses, Introducing a minus sign. Both cases are captured by the absolute value. ■ \blacksquare ■
Problem 2.1. Let X ∼ U n i f o r m ( 0 , 1 ) X \sim \mathrm{Uniform}(0, 1) X ∼ Uniform ( 0 , 1 ) . Find the distribution of Y = − ln X Y = -\ln X Y = − ln X .
Solution Here g ( x ) = − ln x g(x) = -\ln x g ( x ) = − ln x Which is strictly decreasing on ( 0 , 1 ) (0, 1) ( 0 , 1 ) . The inverse is g − 1 ( y ) = e − y g^{-1}(y) = e^{-y} g − 1 ( y ) = e − y for y > 0 y \gt 0 y > 0 . We have ( g − 1 ) ′ ( y ) = − e − y (g^{-1})'(y) = -e^{-y} ( g − 1 ) ′ ( y ) = − e − y .
f Y ( y ) = f X ( e − y ) ⋅ ∣ − e − y ∣ = 1 ⋅ e − y = e − y , y > 0 f_Y(y) = f_X(e^{-y}) \cdot |-e^{-y}| = 1 \cdot e^{-y} = e^{-y}, \quad y \gt 0 f Y ( y ) = f X ( e − y ) ⋅ ∣ − e − y ∣ = 1 ⋅ e − y = e − y , y > 0
This is the E x p ( 1 ) \mathrm{Exp}(1) Exp ( 1 ) distribution. ■ \blacksquare ■
Problem 2.2. Let X ∼ N ( 0 , 1 ) X \sim N(0, 1) X ∼ N ( 0 , 1 ) . Find the distribution of Y = X 2 Y = X^2 Y = X 2 .
Solution The function g ( x ) = x 2 g(x) = x^2 g ( x ) = x 2 is not monotone, so we must split into cases.
For y > 0 y \gt 0 y > 0 :
F Y ( y ) = P ( X 2 ≤ y ) = P ( − y ≤ X ≤ y ) = Φ ( y ) − Φ ( − y ) = 2 Φ ( y ) − 1 F_Y(y) = P(X^2 \leq y) = P(-\sqrt{y} \leq X \leq \sqrt{y}) = \Phi(\sqrt{y}) - \Phi(-\sqrt{y}) = 2\Phi(\sqrt{y}) - 1 F Y ( y ) = P ( X 2 ≤ y ) = P ( − y ≤ X ≤ y ) = Φ ( y ) − Φ ( − y ) = 2Φ ( y ) − 1
Differentiating:
f Y ( y ) = 2 ⋅ ϕ ( y ) ⋅ 1 2 y = 1 y ⋅ 1 2 π e − y / 2 = 1 2 π y e − y / 2 f_Y(y) = 2 \cdot \phi(\sqrt{y}) \cdot \frac{1}{2\sqrt{y}} = \frac{1}{\sqrt{y}} \cdot \frac{1}{\sqrt{2\pi}} e^{-y/2} = \frac{1}{\sqrt{2\pi y}} e^{-y/2} f Y ( y ) = 2 ⋅ ϕ ( y ) ⋅ 2 y 1 = y 1 ⋅ 2 π 1 e − y /2 = 2 π y 1 e − y /2
This is the PDF of a χ 1 2 \chi^2_1 χ 1 2 (chi-squared with 1 degree of freedom) distribution, which equals G a m m a ( 1 / 2 , 1 / 2 ) \mathrm{Gamma}(1/2, 1/2) Gamma ( 1/2 , 1/2 ) . ■ \blacksquare ■
Definition. The quantile function (or inverse CDF) of a random variable X X X with CDF F F F is
F − 1 ( p ) = inf { x : F ( x ) ≥ p } , 0 < p < 1 F^{-1}(p) = \inf\{x : F(x) \geq p\}, \quad 0 \lt p \lt 1 F − 1 ( p ) = inf { x : F ( x ) ≥ p } , 0 < p < 1
Remark. If F F F is strictly increasing, then F − 1 ( p ) F^{-1}(p) F − 1 ( p ) is the unique x x x such that F ( x ) = p F(x) = p F ( x ) = p . For discrete Distributions, F − 1 F^{-1} F − 1 is the generalised inverse.
Theorem 2.2 (Probability Integral Transform). If X X X has a continuous CDF F F F Then F ( X ) ∼ U n i f o r m ( 0 , 1 ) F(X) \sim \mathrm{Uniform}(0, 1) F ( X ) ∼ Uniform ( 0 , 1 ) .
Proof. For u ∈ ( 0 , 1 ) u \in (0, 1) u ∈ ( 0 , 1 ) : P ( F ( X ) ≤ u ) = P ( X ≤ F − 1 ( u ) ) = F ( F − 1 ( u ) ) = u P(F(X) \leq u) = P(X \leq F^{-1}(u)) = F(F^{-1}(u)) = u P ( F ( X ) ≤ u ) = P ( X ≤ F − 1 ( u )) = F ( F − 1 ( u )) = u . ■ \blacksquare ■
Intuition. This theorem is the foundation of inverse transform sampling : to generate from any distribution With CDF F F F Draw U ∼ U n i f o r m ( 0 , 1 ) U \sim \mathrm{Uniform}(0, 1) U ∼ Uniform ( 0 , 1 ) and compute X = F − 1 ( U ) X = F^{-1}(U) X = F − 1 ( U ) .
Definition. Let X 1 , … , X n X_1, \ldots, X_n X 1 , … , X n be i.i.d. With CDF F F F and PDF f f f . The order statistics X ( 1 ) ≤ X ( 2 ) ≤ ⋯ ≤ X ( n ) X_{(1)} \leq X_{(2)} \leq \cdots \leq X_{(n)} X ( 1 ) ≤ X ( 2 ) ≤ ⋯ ≤ X ( n ) are the sorted values.
Theorem 2.3. The PDF of the k k k -th order statistic X ( k ) X_{(k)} X ( k ) is
f X ( k ) ( x ) = n ! ( k − 1 ) ! ( n − k ) ! [ F ( x ) ] k − 1 [ 1 − F ( x ) ] n − k f ( x ) f_{X_{(k)}}(x) = \frac{n!}{(k-1)!(n-k)!}\, [F(x)]^{k-1}\, [1 - F(x)]^{n-k}\, f(x) f X ( k ) ( x ) = ( k − 1 )! ( n − k )! n ! [ F ( x ) ] k − 1 [ 1 − F ( x ) ] n − k f ( x )
Proof. For X ( k ) ≤ x X_{(k)} \leq x X ( k ) ≤ x to hold, at least k k k of the X i X_i X i must be ≤ x \leq x ≤ x . The event X ( k ) ∈ ( x , x + d x ) X_{(k)} \in (x, x + dx) X ( k ) ∈ ( x , x + d x ) Requires exactly k − 1 k - 1 k − 1 observations below x x x One in ( x , x + d x ) (x, x + dx) ( x , x + d x ) And n − k n - k n − k above x + d x x + dx x + d x :
f X ( k ) ( x ) d x = ( n k − 1 , 1 , n − k ) [ F ( x ) ] k − 1 f ( x ) d x [ 1 − F ( x ) ] n − k f_{X_{(k)}}(x)\, dx = \binom{n}{k-1, 1, n-k}\, [F(x)]^{k-1}\, f(x)\, dx\, [1 - F(x)]^{n-k} f X ( k ) ( x ) d x = ( k − 1 , 1 , n − k n ) [ F ( x ) ] k − 1 f ( x ) d x [ 1 − F ( x ) ] n − k
Which gives the result after cancelling d x dx d x . ■ \blacksquare ■
Problem 2.3. Let X 1 , X 2 , X 3 X_1, X_2, X_3 X 1 , X 2 , X 3 be i.i.d. U n i f o r m ( 0 , 1 ) \mathrm{Uniform}(0, 1) Uniform ( 0 , 1 ) . Find the PDF of the median X ( 2 ) X_{(2)} X ( 2 ) .
Solution Here n = 3 n = 3 n = 3 , k = 2 k = 2 k = 2 , F ( x ) = x F(x) = x F ( x ) = x , f ( x ) = 1 f(x) = 1 f ( x ) = 1 on ( 0 , 1 ) (0, 1) ( 0 , 1 ) .
f X ( 2 ) ( x ) = 3 ! 1 ! ⋅ 1 ! x 1 ( 1 − x ) 1 ⋅ 1 = 6 x ( 1 − x ) , 0 < x < 1 f_{X_{(2)}}(x) = \frac{3!}{1! \cdot 1!}\, x^{1}\, (1 - x)^{1} \cdot 1 = 6x(1 - x), \quad 0 \lt x \lt 1 f X ( 2 ) ( x ) = 1 ! ⋅ 1 ! 3 ! x 1 ( 1 − x ) 1 ⋅ 1 = 6 x ( 1 − x ) , 0 < x < 1
This is a B e t a ( 2 , 2 ) \mathrm{Beta}(2, 2) Beta ( 2 , 2 ) distribution. ■ \blacksquare ■
Bernoulli. X ∼ B e r n o u l l i ( p ) X \sim \mathrm{Bernoulli}(p) X ∼ Bernoulli ( p ) : P ( X = 1 ) = p P(X = 1) = p P ( X = 1 ) = p , P ( X = 0 ) = 1 − p P(X = 0) = 1 - p P ( X = 0 ) = 1 − p .
E [ X ] = p , V a r ( X ) = p ( 1 − p ) E[X] = p, \quad \mathrm{Var}(X) = p(1 - p) E [ X ] = p , Var ( X ) = p ( 1 − p )
M X ( t ) = 1 − p + p e t M_X(t) = 1 - p + pe^t M X ( t ) = 1 − p + p e t
Proof of MGF: M X ( t ) = E [ e t X ] = e t ⋅ 0 ( 1 − p ) + e t ⋅ 1 ⋅ p = 1 − p + p e t M_X(t) = E[e^{tX}] = e^{t \cdot 0}(1 - p) + e^{t \cdot 1} \cdot p = 1 - p + pe^t M X ( t ) = E [ e tX ] = e t ⋅ 0 ( 1 − p ) + e t ⋅ 1 ⋅ p = 1 − p + p e t . ■ \blacksquare ■
Binomial. X ∼ B i n ( n , p ) X \sim \mathrm{Bin}(n, p) X ∼ Bin ( n , p ) : number of successes in n n n independent Bernoulli trials.
P ( X = k ) = ( n k ) p k ( 1 − p ) n − k , k = 0 , 1 , … , n P(X = k) = \binom{n}{k} p^k (1-p)^{n-k}, \quad k = 0, 1, \ldots, n P ( X = k ) = ( k n ) p k ( 1 − p ) n − k , k = 0 , 1 , … , n
E [ X ] = n p , V a r ( X ) = n p ( 1 − p ) E[X] = np, \quad \mathrm{Var}(X) = np(1-p) E [ X ] = n p , Var ( X ) = n p ( 1 − p )
M X ( t ) = ( 1 − p + p e t ) n M_X(t) = (1 - p + pe^t)^n M X ( t ) = ( 1 − p + p e t ) n
Proof of MGF: Since X = ∑ i = 1 n X i X = \sum_{i=1}^n X_i X = ∑ i = 1 n X i where X i ∼ B e r n o u l l i ( p ) X_i \sim \mathrm{Bernoulli}(p) X i ∼ Bernoulli ( p ) are independent:
M X ( t ) = ∏ i = 1 n M X i ( t ) = ( 1 − p + p e t ) n ■ M_X(t) = \prod_{i=1}^n M_{X_i}(t) = (1 - p + pe^t)^n \quad \blacksquare M X ( t ) = ∏ i = 1 n M X i ( t ) = ( 1 − p + p e t ) n ■
Geometric. X ∼ G e o m ( p ) X \sim \mathrm{Geom}(p) X ∼ Geom ( p ) : number of trials until the first success (counting the success).
P ( X = k ) = ( 1 − p ) k − 1 p , k = 1 , 2 , 3 , … P(X = k) = (1 - p)^{k-1} p, \quad k = 1, 2, 3, \ldots P ( X = k ) = ( 1 − p ) k − 1 p , k = 1 , 2 , 3 , …
E [ X ] = 1 p , V a r ( X ) = 1 − p p 2 E[X] = \frac{1}{p}, \quad \mathrm{Var}(X) = \frac{1 - p}{p^2} E [ X ] = p 1 , Var ( X ) = p 2 1 − p
M X ( t ) = p e t 1 − ( 1 − p ) e t , f o r t < − ln ( 1 − p ) M_X(t) = \frac{pe^t}{1 - (1 - p)e^t}, \quad \mathrm{for} t \lt -\ln(1 - p) M X ( t ) = 1 − ( 1 − p ) e t p e t , for t < − ln ( 1 − p )
Proof that E [ X ] = 1 / p E[X] = 1/p E [ X ] = 1/ p :
E [ X ] = ∑ k = 1 ∞ k ( 1 − p ) k − 1 p = p ∑ k = 1 ∞ k ( 1 − p ) k − 1 = p ⋅ 1 ( 1 − ( 1 − p ) ) 2 = p p 2 = 1 p E[X] = \sum_{k=1}^{\infty} k(1-p)^{k-1}p = p \sum_{k=1}^{\infty} k(1-p)^{k-1} = p \cdot \frac{1}{(1 - (1-p))^2} = \frac{p}{p^2} = \frac{1}{p} E [ X ] = ∑ k = 1 ∞ k ( 1 − p ) k − 1 p = p ∑ k = 1 ∞ k ( 1 − p ) k − 1 = p ⋅ ( 1 − ( 1 − p ) ) 2 1 = p 2 p = p 1
Using the identity ∑ k = 1 ∞ k r k − 1 = 1 / ( 1 − r ) 2 \sum_{k=1}^{\infty} kr^{k-1} = 1/(1-r)^2 ∑ k = 1 ∞ k r k − 1 = 1/ ( 1 − r ) 2 for ∣ r ∣ < 1 |r| \lt 1 ∣ r ∣ < 1 . ■ \blacksquare ■
Negative Binomial. X ∼ N e g B i n ( r , p ) X \sim \mathrm{NegBin}(r, p) X ∼ NegBin ( r , p ) : number of trials until the r r r -th success.
P ( X = k ) = ( k − 1 r − 1 ) p r ( 1 − p ) k − r , k = r , r + 1 , … P(X = k) = \binom{k-1}{r-1} p^r (1-p)^{k-r}, \quad k = r, r+1, \ldots P ( X = k ) = ( r − 1 k − 1 ) p r ( 1 − p ) k − r , k = r , r + 1 , …
E [ X ] = r p , V a r ( X ) = r ( 1 − p ) p 2 E[X] = \frac{r}{p}, \quad \mathrm{Var}(X) = \frac{r(1-p)}{p^2} E [ X ] = p r , Var ( X ) = p 2 r ( 1 − p )
Hypergeometric. X ∼ H y p e r g e o m e t r i c ( N , K , n ) X \sim \mathrm{Hypergeometric}(N, K, n) X ∼ Hypergeometric ( N , K , n ) : sampling n n n items without replacement from a population Of N N N containing K K K “successes.”
P ( X = k ) = ( K k ) ( N − K n − k ) ( N n ) , k = max ( 0 , n + K − N ) , … , min ( n , K ) P(X = k) = \frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}, \quad k = \max(0, n + K - N), \ldots, \min(n, K) P ( X = k ) = ( n N ) ( k K ) ( n − k N − K ) , k = max ( 0 , n + K − N ) , … , min ( n , K )
E [ X ] = n ⋅ K N , V a r ( X ) = n ⋅ K N ⋅ N − K N ⋅ N − n N − 1 E[X] = n \cdot \frac{K}{N}, \quad \mathrm{Var}(X) = n \cdot \frac{K}{N} \cdot \frac{N-K}{N} \cdot \frac{N-n}{N-1} E [ X ] = n ⋅ N K , Var ( X ) = n ⋅ N K ⋅ N N − K ⋅ N − 1 N − n
Remark. The factor ( N − n ) / ( N − 1 ) (N - n)/(N - 1) ( N − n ) / ( N − 1 ) is the finite population correction . When n ≪ N n \ll N n ≪ N The Hypergeometric is well-approximated by B i n ( n , K / N ) \mathrm{Bin}(n, K/N) Bin ( n , K / N ) .
Poisson. X ∼ P o i s s o n ( λ ) X \sim \mathrm{Poisson}(\lambda) X ∼ Poisson ( λ ) : models rare events occurring at rate λ \lambda λ .
P ( X = k ) = e − λ λ k k ! , k = 0 , 1 , 2 , … P(X = k) = \frac{e^{-\lambda} \lambda^k}{k!}, \quad k = 0, 1, 2, \ldots P ( X = k ) = k ! e − λ λ k , k = 0 , 1 , 2 , …
E [ X ] = λ , V a r ( X ) = λ E[X] = \lambda, \quad \mathrm{Var}(X) = \lambda E [ X ] = λ , Var ( X ) = λ
M X ( t ) = exp ( λ ( e t − 1 ) ) M_X(t) = \exp\left(\lambda(e^t - 1)\right) M X ( t ) = exp ( λ ( e t − 1 ) )
Proof of MGF:
M X ( t ) = ∑ k = 0 ∞ e t k e − λ λ k k ! = e − λ ∑ k = 0 ∞ ( λ e t ) k k ! = e − λ ⋅ e λ e t = exp ( λ ( e t − 1 ) ) M_X(t) = \sum_{k=0}^{\infty} e^{tk} \frac{e^{-\lambda} \lambda^k}{k!} = e^{-\lambda} \sum_{k=0}^{\infty} \frac{(\lambda e^t)^k}{k!} = e^{-\lambda} \cdot e^{\lambda e^t} = \exp(\lambda(e^t - 1)) M X ( t ) = ∑ k = 0 ∞ e t k k ! e − λ λ k = e − λ ∑ k = 0 ∞ k ! ( λ e t ) k = e − λ ⋅ e λ e t = exp ( λ ( e t − 1 ))
■ \blacksquare ■
Proof that E [ X ] = λ E[X] = \lambda E [ X ] = λ :
E [ X ] = ∑ k = 0 ∞ k e − λ λ k k ! = e − λ ∑ k = 1 ∞ λ k ( k − 1 ) ! = e − λ λ ∑ k = 0 ∞ λ k k ! = λ E[X] = \sum_{k=0}^{\infty} k \frac{e^{-\lambda} \lambda^k}{k!} = e^{-\lambda} \sum_{k=1}^{\infty} \frac{\lambda^k}{(k-1)!} = e^{-\lambda} \lambda \sum_{k=0}^{\infty} \frac{\lambda^k}{k!} = \lambda E [ X ] = ∑ k = 0 ∞ k k ! e − λ λ k = e − λ ∑ k = 1 ∞ ( k − 1 )! λ k = e − λ λ ∑ k = 0 ∞ k ! λ k = λ
■ \blacksquare ■
Uniform. X ∼ U n i f o r m ( a , b ) X \sim \mathrm{Uniform}(a, b) X ∼ Uniform ( a , b ) :
f ( x ) = { 1 b − a i f a ≤ x ≤ b 0 o t h e r w i s e f(x) = \begin{cases} \frac{1}{b - a} & \mathrm{if} a \leq x \leq b \\ 0 & \mathrm{otherwise} \end{cases} f ( x ) = { b − a 1 0 if a ≤ x ≤ b otherwise
E [ X ] = a + b 2 , V a r ( X ) = ( b − a ) 2 12 E[X] = \frac{a + b}{2}, \quad \mathrm{Var}(X) = \frac{(b-a)^2}{12} E [ X ] = 2 a + b , Var ( X ) = 12 ( b − a ) 2
M X ( t ) = { e t b − e t a t ( b − a ) i f t ≠ 0 1 i f t = 0 M_X(t) = \begin{cases} \frac{e^{tb} - e^{ta}}{t(b - a)} & \mathrm{if} t \neq 0 \\ 1 & \mathrm{if} t = 0 \end{cases} M X ( t ) = { t ( b − a ) e t b − e t a 1 if t = 0 if t = 0
Gamma. X ∼ G a m m a ( α , λ ) X \sim \mathrm{Gamma}(\alpha, \lambda) X ∼ Gamma ( α , λ ) (shape α > 0 \alpha \gt 0 α > 0 Rate λ > 0 \lambda \gt 0 λ > 0 ):
f ( x ) = λ α Γ ( α ) x α − 1 e − λ x , x > 0 f(x) = \frac{\lambda^\alpha}{\Gamma(\alpha)} x^{\alpha - 1} e^{-\lambda x}, \quad x \gt 0 f ( x ) = Γ ( α ) λ α x α − 1 e − λ x , x > 0
Where Γ ( α ) = ∫ 0 ∞ t α − 1 e − t d t \Gamma(\alpha) = \int_0^\infty t^{\alpha - 1} e^{-t}\, dt Γ ( α ) = ∫ 0 ∞ t α − 1 e − t d t is the Gamma function.
E [ X ] = α λ , V a r ( X ) = α λ 2 E[X] = \frac{\alpha}{\lambda}, \quad \mathrm{Var}(X) = \frac{\alpha}{\lambda^2} E [ X ] = λ α , Var ( X ) = λ 2 α
M X ( t ) = ( λ λ − t ) α , t < λ M_X(t) = \left(\frac{\lambda}{\lambda - t}\right)^\alpha, \quad t \lt \lambda M X ( t ) = ( λ − t λ ) α , t < λ
Remark. Special cases: G a m m a ( 1 , λ ) = E x p ( λ ) \mathrm{Gamma}(1, \lambda) = \mathrm{Exp}(\lambda) Gamma ( 1 , λ ) = Exp ( λ ) ; G a m m a ( n / 2 , 1 / 2 ) = χ n 2 \mathrm{Gamma}(n/2, 1/2) = \chi^2_n Gamma ( n /2 , 1/2 ) = χ n 2 .
Theorem 3.0 (Sum of Independent Gammas). If X ∼ G a m m a ( α 1 , λ ) X \sim \mathrm{Gamma}(\alpha_1, \lambda) X ∼ Gamma ( α 1 , λ ) and Y ∼ G a m m a ( α 2 , λ ) Y \sim \mathrm{Gamma}(\alpha_2, \lambda) Y ∼ Gamma ( α 2 , λ ) are independent, then X + Y ∼ G a m m a ( α 1 + α 2 , λ ) X + Y \sim \mathrm{Gamma}(\alpha_1 + \alpha_2, \lambda) X + Y ∼ Gamma ( α 1 + α 2 , λ ) .
Proof. M X + Y ( t ) = M X ( t ) M Y ( t ) = ( λ λ − t ) α 1 ( λ λ − t ) α 2 = ( λ λ − t ) α 1 + α 2 M_{X+Y}(t) = M_X(t)\, M_Y(t) = \left(\frac{\lambda}{\lambda - t}\right)^{\alpha_1} \left(\frac{\lambda}{\lambda - t}\right)^{\alpha_2} = \left(\frac{\lambda}{\lambda - t}\right)^{\alpha_1 + \alpha_2} M X + Y ( t ) = M X ( t ) M Y ( t ) = ( λ − t λ ) α 1 ( λ − t λ ) α 2 = ( λ − t λ ) α 1 + α 2 , which is the MGF of G a m m a ( α 1 + α 2 , λ ) \mathrm{Gamma}(\alpha_1 + \alpha_2, \lambda) Gamma ( α 1 + α 2 , λ ) . ■ \blacksquare ■
Chi-Squared. X ∼ χ k 2 X \sim \chi^2_k X ∼ χ k 2 (chi-squared with k k k degrees of freedom):
f ( x ) = 1 2 k / 2 Γ ( k / 2 ) x k / 2 − 1 e − x / 2 , x > 0 f(x) = \frac{1}{2^{k/2}\, \Gamma(k/2)}\, x^{k/2 - 1}\, e^{-x/2}, \quad x \gt 0 f ( x ) = 2 k /2 Γ ( k /2 ) 1 x k /2 − 1 e − x /2 , x > 0
E [ X ] = k , V a r ( X ) = 2 k E[X] = k, \quad \mathrm{Var}(X) = 2k E [ X ] = k , Var ( X ) = 2 k
M X ( t ) = ( 1 − 2 t ) − k / 2 , t < 1 / 2 M_X(t) = (1 - 2t)^{-k/2}, \quad t \lt 1/2 M X ( t ) = ( 1 − 2 t ) − k /2 , t < 1/2
Remark. If Z 1 , … , Z k ∼ N ( 0 , 1 ) Z_1, \ldots, Z_k \sim N(0, 1) Z 1 , … , Z k ∼ N ( 0 , 1 ) are independent, then ∑ i = 1 k Z i 2 ∼ χ k 2 \sum_{i=1}^k Z_i^2 \sim \chi^2_k ∑ i = 1 k Z i 2 ∼ χ k 2 .
Beta. X ∼ B e t a ( α , β ) X \sim \mathrm{Beta}(\alpha, \beta) X ∼ Beta ( α , β ) :
f ( x ) = x α − 1 ( 1 − x ) β − 1 B ( α , β ) , 0 < x < 1 f(x) = \frac{x^{\alpha - 1}(1 - x)^{\beta - 1}}{B(\alpha, \beta)}, \quad 0 \lt x \lt 1 f ( x ) = B ( α , β ) x α − 1 ( 1 − x ) β − 1 , 0 < x < 1
Where B ( α , β ) = Γ ( α ) Γ ( β ) Γ ( α + β ) B(\alpha, \beta) = \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha + \beta)} B ( α , β ) = Γ ( α + β ) Γ ( α ) Γ ( β ) is the Beta function.
E [ X ] = α α + β , V a r ( X ) = α β ( α + β ) 2 ( α + β + 1 ) E[X] = \frac{\alpha}{\alpha + \beta}, \quad \mathrm{Var}(X) = \frac{\alpha \beta}{(\alpha + \beta)^2(\alpha + \beta + 1)} E [ X ] = α + β α , Var ( X ) = ( α + β ) 2 ( α + β + 1 ) α β
Exponential. X ∼ E x p ( λ ) X \sim \mathrm{Exp}(\lambda) X ∼ Exp ( λ ) :
f ( x ) = { λ e − λ x i f x ≥ 0 0 i f x < 0 f(x) = \begin{cases} \lambda e^{-\lambda x} & \mathrm{if} x \geq 0 \\ 0 & \mathrm{if} x \lt 0 \end{cases} f ( x ) = { λ e − λ x 0 if x ≥ 0 if x < 0
E [ X ] = 1 λ , V a r ( X ) = 1 λ 2 E[X] = \frac{1}{\lambda}, \quad \mathrm{Var}(X) = \frac{1}{\lambda^2} E [ X ] = λ 1 , Var ( X ) = λ 2 1
Theorem 3.1 (Memoryless Property). If X ∼ E x p ( λ ) X \sim \mathrm{Exp}(\lambda) X ∼ Exp ( λ ) Then for all s , t > 0 s, t \gt 0 s , t > 0 :
P ( X > s + t ∣ X > s ) = P ( X > t ) P(X \gt s + t \mid X \gt s) = P(X \gt t) P ( X > s + t ∣ X > s ) = P ( X > t )
Proof.
P ( X > s + t ∣ X > s ) = P ( X > s + t ) P ( X > s ) = e − λ ( s + t ) e − λ s = e − λ t = P ( X > t ) P(X \gt s + t \mid X \gt s) = \frac{P(X \gt s + t)}{P(X \gt s)} = \frac{e^{-\lambda(s+t)}}{e^{-\lambda s}} = e^{-\lambda t} = P(X \gt t) P ( X > s + t ∣ X > s ) = P ( X > s ) P ( X > s + t ) = e − λ s e − λ ( s + t ) = e − λ t = P ( X > t )
■ \blacksquare ■
Remark. The exponential distribution is the only continuous distribution with the memoryless property. This Makes it the natural model for waiting times between Poisson events.
Normal (Gaussian). X ∼ N ( μ , σ 2 ) X \sim N(\mu, \sigma^2) X ∼ N ( μ , σ 2 ) :
f ( x ) = 1 σ 2 π exp ( − ( x − μ ) 2 2 σ 2 ) , x ∈ R f(x) = \frac{1}{\sigma\sqrt{2\pi}} \exp\left(-\frac{(x - \mu)^2}{2\sigma^2}\right), \quad x \in \mathbb{R} f ( x ) = σ 2 π 1 exp ( − 2 σ 2 ( x − μ ) 2 ) , x ∈ R
E [ X ] = μ , V a r ( X ) = σ 2 E[X] = \mu, \quad \mathrm{Var}(X) = \sigma^2 E [ X ] = μ , Var ( X ) = σ 2
The standard normal Z ∼ N ( 0 , 1 ) Z \sim N(0,1) Z ∼ N ( 0 , 1 ) has CDF denoted Φ ( z ) \Phi(z) Φ ( z ) . For any X ∼ N ( μ , σ 2 ) X \sim N(\mu, \sigma^2) X ∼ N ( μ , σ 2 ) :
Z = X − μ σ ∼ N ( 0 , 1 ) Z = \frac{X - \mu}{\sigma} \sim N(0, 1) Z = σ X − μ ∼ N ( 0 , 1 )
M X ( t ) = exp ( μ t + σ 2 t 2 2 ) M_X(t) = \exp\left(\mu t + \frac{\sigma^2 t^2}{2}\right) M X ( t ) = exp ( μ t + 2 σ 2 t 2 )
Verification that f f f integrates to 1. Consider I = ∫ − ∞ ∞ e − x 2 / 2 d x I = \int_{-\infty}^{\infty} e^{-x^2/2}\, dx I = ∫ − ∞ ∞ e − x 2 /2 d x . Then I 2 = ∫ − ∞ ∞ ∫ − ∞ ∞ e − ( x 2 + y 2 ) / 2 d x d y I^2 = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} e^{-(x^2+y^2)/2}\, dx\, dy I 2 = ∫ − ∞ ∞ ∫ − ∞ ∞ e − ( x 2 + y 2 ) /2 d x d y . Switching to polar coordinates: x = r cos θ x = r\cos\theta x = r cos θ , y = r sin θ y = r\sin\theta y = r sin θ , d x d y = r d r d θ dx\, dy = r\, dr\, d\theta d x d y = r d r d θ .
I 2 = ∫ 0 2 π ∫ 0 ∞ e − r 2 / 2 r d r d θ = 2 π ∫ 0 ∞ e − r 2 / 2 r d r = 2 π [ − e − r 2 / 2 ] 0 ∞ = 2 π I^2 = \int_0^{2\pi}\int_0^{\infty} e^{-r^2/2}\, r\, dr\, d\theta = 2\pi \int_0^{\infty} e^{-r^2/2}\, r\, dr = 2\pi \left[-e^{-r^2/2}\right]_0^{\infty} = 2\pi I 2 = ∫ 0 2 π ∫ 0 ∞ e − r 2 /2 r d r d θ = 2 π ∫ 0 ∞ e − r 2 /2 r d r = 2 π [ − e − r 2 /2 ] 0 ∞ = 2 π
So I = 2 π I = \sqrt{2\pi} I = 2 π Confirming that 1 2 π ∫ − ∞ ∞ e − x 2 / 2 d x = 1 \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} e^{-x^2/2}\, dx = 1 2 π 1 ∫ − ∞ ∞ e − x 2 /2 d x = 1 . For the general N ( μ , σ 2 ) N(\mu, \sigma^2) N ( μ , σ 2 ) The substitution z = ( x − μ ) / σ z = (x - \mu)/\sigma z = ( x − μ ) / σ reduces to the standard case.
Verification that E [ X ] = μ E[X] = \mu E [ X ] = μ for Z ∼ N ( 0 , 1 ) Z \sim N(0, 1) Z ∼ N ( 0 , 1 ) : The integrand z ⋅ ϕ ( z ) z \cdot \phi(z) z ⋅ ϕ ( z ) is an odd function of z z z So ∫ − ∞ ∞ z ϕ ( z ) d z = 0 \int_{-\infty}^{\infty} z\, \phi(z)\, dz = 0 ∫ − ∞ ∞ z ϕ ( z ) d z = 0 . For X = μ + σ Z X = \mu + \sigma Z X = μ + σ Z : E [ X ] = μ + σ ⋅ 0 = μ E[X] = \mu + \sigma \cdot 0 = \mu E [ X ] = μ + σ ⋅ 0 = μ .
Verification that V a r ( Z ) = 1 \mathrm{Var}(Z) = 1 Var ( Z ) = 1 : Integration by parts with u = z u = z u = z , d v = z ϕ ( z ) d z dv = z\, \phi(z)\, dz d v = z ϕ ( z ) d z :
E [ Z 2 ] = ∫ − ∞ ∞ z 2 ϕ ( z ) d z = [ − z ϕ ( z ) ] − ∞ ∞ + ∫ − ∞ ∞ ϕ ( z ) d z = 0 + 1 = 1 E[Z^2] = \int_{-\infty}^{\infty} z^2 \phi(z)\, dz = \left[-z\phi(z)\right]_{-\infty}^{\infty} + \int_{-\infty}^{\infty} \phi(z)\, dz = 0 + 1 = 1 E [ Z 2 ] = ∫ − ∞ ∞ z 2 ϕ ( z ) d z = [ − z ϕ ( z ) ] − ∞ ∞ + ∫ − ∞ ∞ ϕ ( z ) d z = 0 + 1 = 1
Proof of MGF for Z ∼ N ( 0 , 1 ) Z \sim N(0, 1) Z ∼ N ( 0 , 1 ) :
M Z ( t ) = ∫ − ∞ ∞ e t z 1 2 π e − z 2 / 2 d z = ∫ − ∞ ∞ 1 2 π e − ( z 2 − 2 t z ) / 2 d z M_Z(t) = \int_{-\infty}^{\infty} e^{tz} \frac{1}{\sqrt{2\pi}} e^{-z^2/2}\, dz = \int_{-\infty}^{\infty} \frac{1}{\sqrt{2\pi}} e^{-(z^2 - 2tz)/2}\, dz M Z ( t ) = ∫ − ∞ ∞ e t z 2 π 1 e − z 2 /2 d z = ∫ − ∞ ∞ 2 π 1 e − ( z 2 − 2 t z ) /2 d z
Completing the square: z 2 − 2 t z = ( z − t ) 2 − t 2 z^2 - 2tz = (z - t)^2 - t^2 z 2 − 2 t z = ( z − t ) 2 − t 2 So:
M Z ( t ) = e t 2 / 2 ∫ − ∞ ∞ 1 2 π e − ( z − t ) 2 / 2 d z = e t 2 / 2 ⋅ 1 = e t 2 / 2 M_Z(t) = e^{t^2/2} \int_{-\infty}^{\infty} \frac{1}{\sqrt{2\pi}} e^{-(z-t)^2/2}\, dz = e^{t^2/2} \cdot 1 = e^{t^2/2} M Z ( t ) = e t 2 /2 ∫ − ∞ ∞ 2 π 1 e − ( z − t ) 2 /2 d z = e t 2 /2 ⋅ 1 = e t 2 /2
Since the integrand is the PDF of N ( t , 1 ) N(t, 1) N ( t , 1 ) evaluated over all R \mathbb{R} R . ■ \blacksquare ■
For X = μ + σ Z X = \mu + \sigma Z X = μ + σ Z : M X ( t ) = E [ e t ( μ + σ Z ) ] = e μ t E [ e ( σ t ) Z ] = e μ t e σ 2 t 2 / 2 M_X(t) = E[e^{t(\mu + \sigma Z)}] = e^{\mu t} E[e^{(\sigma t)Z}] = e^{\mu t} e^{\sigma^2 t^2/2} M X ( t ) = E [ e t ( μ + σ Z ) ] = e μ t E [ e ( σ t ) Z ] = e μ t e σ 2 t 2 /2 .
Theorem 3.2. The sum of independent normal random variables is normal: If X i ∼ N ( μ i , σ i 2 ) X_i \sim N(\mu_i, \sigma_i^2) X i ∼ N ( μ i , σ i 2 ) are independent, then ∑ X i ∼ N ( ∑ μ i , ∑ σ i 2 ) \sum X_i \sim N(\sum \mu_i, \sum \sigma_i^2) ∑ X i ∼ N ( ∑ μ i , ∑ σ i 2 ) .
Proof (using MGFs). M ∑ X i ( t ) = ∏ i M X i ( t ) = ∏ i exp ( μ i t + σ i 2 t 2 / 2 ) = exp ( ( ∑ μ i ) t + ( ∑ σ i 2 ) t 2 2 ) M_{\sum X_i}(t) = \prod_i M_{X_i}(t) = \prod_i \exp(\mu_i t + \sigma_i^2 t^2/2) = \exp\left((\sum \mu_i)t + \frac{(\sum \sigma_i^2) t^2}{2}\right) M ∑ X i ( t ) = ∏ i M X i ( t ) = ∏ i exp ( μ i t + σ i 2 t 2 /2 ) = exp ( ( ∑ μ i ) t + 2 ( ∑ σ i 2 ) t 2 ) , which is the MGF of N ( ∑ μ i , ∑ σ i 2 ) N(\sum \mu_i, \sum \sigma_i^2) N ( ∑ μ i , ∑ σ i 2 ) . By the uniqueness theorem for MGFs, the result follows. ■ \blacksquare ■
Theorem 3.3 (Poisson Limit Theorem). If X n ∼ B i n ( n , p n ) X_n \sim \mathrm{Bin}(n, p_n) X n ∼ Bin ( n , p n ) where n p n → λ np_n \to \lambda n p n → λ as n → ∞ n \to \infty n → ∞ Then X n → d P o i s s o n ( λ ) X_n \xrightarrow{d} \mathrm{Poisson}(\lambda) X n d Poisson ( λ ) .
Proof. Let λ n = n p n \lambda_n = np_n λ n = n p n so that p n = λ n / n p_n = \lambda_n / n p n = λ n / n . Then:
P ( X n = k ) = ( n k ) p n k ( 1 − p n ) n − k = n ( n − 1 ) ⋯ ( n − k + 1 ) k ! ( λ n n ) k ( 1 − λ n n ) n − k P(X_n = k) = \binom{n}{k} p_n^k (1 - p_n)^{n-k} = \frac{n(n-1)\cdots(n-k+1)}{k!} \left(\frac{\lambda_n}{n}\right)^k \left(1 - \frac{\lambda_n}{n}\right)^{n-k} P ( X n = k ) = ( k n ) p n k ( 1 − p n ) n − k = k ! n ( n − 1 ) ⋯ ( n − k + 1 ) ( n λ n ) k ( 1 − n λ n ) n − k
= λ n k k ! ⋅ n n ⋅ n − 1 n ⋯ n − k + 1 n ⋅ ( 1 − λ n n ) n ⋅ ( 1 − λ n n ) − k = \frac{\lambda_n^k}{k!} \cdot \frac{n}{n} \cdot \frac{n-1}{n} \cdots \frac{n-k+1}{n} \cdot \left(1 - \frac{\lambda_n}{n}\right)^n \cdot \left(1 - \frac{\lambda_n}{n}\right)^{-k} = k ! λ n k ⋅ n n ⋅ n n − 1 ⋯ n n − k + 1 ⋅ ( 1 − n λ n ) n ⋅ ( 1 − n λ n ) − k
As n → ∞ n \to \infty n → ∞ : λ n → λ \lambda_n \to \lambda λ n → λ ; n − j n → 1 \frac{n-j}{n} \to 1 n n − j → 1 for each fixed j j j ; ( 1 − λ n n ) n → e − λ \left(1 - \frac{\lambda_n}{n}\right)^n \to e^{-\lambda} ( 1 − n λ n ) n → e − λ ; and ( 1 − λ n n ) − k → 1 \left(1 - \frac{\lambda_n}{n}\right)^{-k} \to 1 ( 1 − n λ n ) − k → 1 .
Therefore: P ( X n = k ) → λ k e − λ k ! = P ( P o i s s o n ( λ ) = k ) P(X_n = k) \to \frac{\lambda^k e^{-\lambda}}{k!} = P(\mathrm{Poisson}(\lambda) = k) P ( X n = k ) → k ! λ k e − λ = P ( Poisson ( λ ) = k ) . ■ \blacksquare ■
Intuition. The Poisson distribution approximates the binomial when n n n is large, p p p is small, and n p np n p is moderate.
Theorem 3.4 (Normal approximation to the Binomial). If X ∼ B i n ( n , p ) X \sim \mathrm{Bin}(n, p) X ∼ Bin ( n , p ) with n n n large, then Approximately X ≈ N ( n p , n p ( 1 − p ) ) X \approx N(np, np(1-p)) X ≈ N ( n p , n p ( 1 − p )) . More precisely, using a continuity correction:
P ( a ≤ X ≤ b ) ≈ Φ ( b + 0.5 − n p n p ( 1 − p ) ) − Φ ( a − 0.5 − n p n p ( 1 − p ) ) P(a \leq X \leq b) \approx \Phi\left(\frac{b + 0.5 - np}{\sqrt{np(1-p)}}\right) - \Phi\left(\frac{a - 0.5 - np}{\sqrt{np(1-p)}}\right) P ( a ≤ X ≤ b ) ≈ Φ ( n p ( 1 − p ) b + 0.5 − n p ) − Φ ( n p ( 1 − p ) a − 0.5 − n p )
Intuition. By the CLT, the sum of n n n i.i.d. B e r n o u l l i ( p ) \mathrm{Bernoulli}(p) Bernoulli ( p ) variables (each with mean p p p and variance p ( 1 − p ) p(1-p) p ( 1 − p ) ) is approximately normal.
Problem 3.1. A call centre receives an average of 4.5 calls per minute. What is the probability of receiving More than 6 calls in a given minute?
Solution Model the number of calls as X ∼ P o i s s o n ( 4.5 ) X \sim \mathrm{Poisson}(4.5) X ∼ Poisson ( 4.5 ) .
P ( X > 6 ) = 1 − P ( X ≤ 6 ) = 1 − ∑ k = 0 6 e − 4.5 ⋅ 4.5 k k ! P(X \gt 6) = 1 - P(X \leq 6) = 1 - \sum_{k=0}^{6} \frac{e^{-4.5} \cdot 4.5^k}{k!} P ( X > 6 ) = 1 − P ( X ≤ 6 ) = 1 − ∑ k = 0 6 k ! e − 4.5 ⋅ 4. 5 k
= 1 − e − 4.5 ( 1 + 4.5 + 4.5 2 2 + 4.5 3 6 + 4.5 4 24 + 4.5 5 120 + 4.5 6 720 ) = 1 - e^{-4.5}\left(1 + 4.5 + \frac{4.5^2}{2} + \frac{4.5^3}{6} + \frac{4.5^4}{24} + \frac{4.5^5}{120} + \frac{4.5^6}{720}\right) = 1 − e − 4.5 ( 1 + 4.5 + 2 4. 5 2 + 6 4. 5 3 + 24 4. 5 4 + 120 4. 5 5 + 720 4. 5 6 )
= 1 − e − 4.5 ( 1 + 4.5 + 10.125 + 15.1875 + 17.0859 + 15.3773 + 11.5330 ) = 1 - e^{-4.5}(1 + 4.5 + 10.125 + 15.1875 + 17.0859 + 15.3773 + 11.5330) = 1 − e − 4.5 ( 1 + 4.5 + 10.125 + 15.1875 + 17.0859 + 15.3773 + 11.5330 )
≈ 1 − 0.9314 ≈ 0.0686 \approx 1 - 0.9314 \approx 0.0686 ≈ 1 − 0.9314 ≈ 0.0686
Problem 3.2. The lifetime of a component is exponentially distributed with mean 500 hours. Given that the Component has lasted 300 hours, what is the probability it lasts at least another 200 hours?
Solution The mean is 1 / λ = 500 1/\lambda = 500 1/ λ = 500 So λ = 1 / 500 \lambda = 1/500 λ = 1/500 . By the memoryless property:
P ( X > 300 + 200 ∣ X > 300 ) = P ( X > 200 ) = e − 200 / 500 = e − 0.4 ≈ 0.6703 P(X \gt 300 + 200 \mid X \gt 300) = P(X \gt 200) = e^{-200/500} = e^{-0.4} \approx 0.6703 P ( X > 300 + 200 ∣ X > 300 ) = P ( X > 200 ) = e − 200/500 = e − 0.4 ≈ 0.6703
Definition. The expected value of X X X is
E [ X ] = { ∑ x x f X ( x ) ( d i s c r e t e ) ∫ − ∞ ∞ x f X ( x ) d x ( c o n t i n u o u s ) E[X] = \begin{cases} \sum_x x\, f_X(x) & \mathrm{(discrete)} \\ \int_{-\infty}^{\infty} x\, f_X(x)\, dx & \mathrm{(continuous)} \end{cases} E [ X ] = { ∑ x x f X ( x ) ∫ − ∞ ∞ x f X ( x ) d x ( discrete ) ( continuous )
Proposition 4.1 (LOTUS — Law of the Unconscious Statistician). For any function g g g :
E [ g ( X ) ] = { ∑ x g ( x ) f X ( x ) ( d i s c r e t e ) ∫ − ∞ ∞ g ( x ) f X ( x ) d x ( c o n t i n u o u s ) E[g(X)] = \begin{cases} \sum_x g(x)\, f_X(x) & \mathrm{(discrete)} \\ \int_{-\infty}^{\infty} g(x)\, f_X(x)\, dx & \mathrm{(continuous)} \end{cases} E [ g ( X )] = { ∑ x g ( x ) f X ( x ) ∫ − ∞ ∞ g ( x ) f X ( x ) d x ( discrete ) ( continuous )
Intuition. We do not need to find the distribution of Y = g ( X ) Y = g(X) Y = g ( X ) to compute E [ Y ] E[Y] E [ Y ] ; we integrate with respect to the Distribution of X X X directly.
Theorem 4.1 (Linearity of Expectation).
E [ a X + b ] = a E [ X ] + b E[aX + b] = aE[X] + b E [ a X + b ] = a E [ X ] + b .E [ X + Y ] = E [ X ] + E [ Y ] E[X + Y] = E[X] + E[Y] E [ X + Y ] = E [ X ] + E [ Y ] for any random variables X , Y X, Y X , Y (no independence required).Proof. We prove (2) for the continuous case; the discrete case is analogous.
E [ X + Y ] = ∬ R 2 ( x + y ) f X , Y ( x , y ) d x d y E[X + Y] = \iint_{\mathbb{R}^2} (x + y)\, f_{X,Y}(x,y)\, dx\, dy E [ X + Y ] = ∬ R 2 ( x + y ) f X , Y ( x , y ) d x d y
= ∬ R 2 x f X , Y ( x , y ) d x d y + ∬ R 2 y f X , Y ( x , y ) d x d y = \iint_{\mathbb{R}^2} x\, f_{X,Y}(x,y)\, dx\, dy + \iint_{\mathbb{R}^2} y\, f_{X,Y}(x,y)\, dx\, dy = ∬ R 2 x f X , Y ( x , y ) d x d y + ∬ R 2 y f X , Y ( x , y ) d x d y
= ∫ − ∞ ∞ x ( ∫ − ∞ ∞ f X , Y ( x , y ) d y ) d x + ∫ − ∞ ∞ y ( ∫ − ∞ ∞ f X , Y ( x , y ) d x ) d y = \int_{-\infty}^{\infty} x \left(\int_{-\infty}^{\infty} f_{X,Y}(x,y)\, dy\right) dx + \int_{-\infty}^{\infty} y \left(\int_{-\infty}^{\infty} f_{X,Y}(x,y)\, dx\right) dy = ∫ − ∞ ∞ x ( ∫ − ∞ ∞ f X , Y ( x , y ) d y ) d x + ∫ − ∞ ∞ y ( ∫ − ∞ ∞ f X , Y ( x , y ) d x ) d y
= ∫ − ∞ ∞ x f X ( x ) d x + ∫ − ∞ ∞ y f Y ( y ) d y = E [ X ] + E [ Y ] ■ = \int_{-\infty}^{\infty} x\, f_X(x)\, dx + \int_{-\infty}^{\infty} y\, f_Y(y)\, dy = E[X] + E[Y] \quad \blacksquare = ∫ − ∞ ∞ x f X ( x ) d x + ∫ − ∞ ∞ y f Y ( y ) d y = E [ X ] + E [ Y ] ■
If X X X and Y Y Y are independent, E [ X Y ] = E [ X ] E [ Y ] E[XY] = E[X]E[Y] E [ X Y ] = E [ X ] E [ Y ] . Proof. E [ X Y ] = ∬ x y f X ( x ) f Y ( y ) d x d y = ( ∫ x f X ( x ) d x ) ( ∫ y f Y ( y ) d y ) = E [ X ] E [ Y ] E[XY] = \iint xy\, f_X(x)f_Y(y)\, dx\, dy = \left(\int x f_X(x)\, dx\right)\left(\int y f_Y(y)\, dy\right) = E[X]E[Y] E [ X Y ] = ∬ x y f X ( x ) f Y ( y ) d x d y = ( ∫ x f X ( x ) d x ) ( ∫ y f Y ( y ) d y ) = E [ X ] E [ Y ] . ■ \blacksquare ■
V a r ( X ) = E [ ( X − E [ X ] ) 2 ] = E [ X 2 ] − ( E [ X ] ) 2 \mathrm{Var}(X) = E[(X - E[X])^2] = E[X^2] - (E[X])^2 Var ( X ) = E [( X − E [ X ] ) 2 ] = E [ X 2 ] − ( E [ X ] ) 2
Theorem 4.2.
V a r ( a X + b ) = a 2 V a r ( X ) \mathrm{Var}(aX + b) = a^2 \mathrm{Var}(X) Var ( a X + b ) = a 2 Var ( X ) .If X , Y X, Y X , Y are independent: V a r ( X + Y ) = V a r ( X ) + V a r ( Y ) \mathrm{Var}(X + Y) = \mathrm{Var}(X) + \mathrm{Var}(Y) Var ( X + Y ) = Var ( X ) + Var ( Y ) . Proof. (1) V a r ( a X + b ) = E [ ( a X + b − a E [ X ] − b ) 2 ] = E [ a 2 ( X − E [ X ] ) 2 ] = a 2 V a r ( X ) \mathrm{Var}(aX + b) = E[(aX + b - aE[X] - b)^2] = E[a^2(X - E[X])^2] = a^2 \mathrm{Var}(X) Var ( a X + b ) = E [( a X + b − a E [ X ] − b ) 2 ] = E [ a 2 ( X − E [ X ] ) 2 ] = a 2 Var ( X ) .
(2) V a r ( X + Y ) = E [ ( X + Y ) 2 ] − ( E [ X ] + E [ Y ] ) 2 \mathrm{Var}(X + Y) = E[(X + Y)^2] - (E[X] + E[Y])^2 Var ( X + Y ) = E [( X + Y ) 2 ] − ( E [ X ] + E [ Y ] ) 2 = E [ X 2 ] + 2 E [ X Y ] + E [ Y 2 ] − E [ X ] 2 − 2 E [ X ] E [ Y ] − E [ Y ] 2 = E[X^2] + 2E[XY] + E[Y^2] - E[X]^2 - 2E[X]E[Y] - E[Y]^2 = E [ X 2 ] + 2 E [ X Y ] + E [ Y 2 ] − E [ X ] 2 − 2 E [ X ] E [ Y ] − E [ Y ] 2 = ( E [ X 2 ] − E [ X ] 2 ) + ( E [ Y 2 ] − E [ Y ] 2 ) + 2 ( E [ X Y ] − E [ X ] E [ Y ] ) = (E[X^2] - E[X]^2) + (E[Y^2] - E[Y]^2) + 2(E[XY] - E[X]E[Y]) = ( E [ X 2 ] − E [ X ] 2 ) + ( E [ Y 2 ] − E [ Y ] 2 ) + 2 ( E [ X Y ] − E [ X ] E [ Y ]) = V a r ( X ) + V a r ( Y ) + 2 C o v ( X , Y ) = \mathrm{Var}(X) + \mathrm{Var}(Y) + 2\,\mathrm{Cov}(X,Y) = Var ( X ) + Var ( Y ) + 2 Cov ( X , Y ) .
If X , Y X, Y X , Y are independent, C o v ( X , Y ) = 0 \mathrm{Cov}(X,Y) = 0 Cov ( X , Y ) = 0 . ■ \blacksquare ■
The moment generating function (MGF) of X X X is
M X ( t ) = E [ e t X ] M_X(t) = E[e^{tX}] M X ( t ) = E [ e tX ]
(provided the expectation exists in a neighbourhood of t = 0 t = 0 t = 0 ).
Theorem 4.3. If M X ( t ) M_X(t) M X ( t ) exists in a neighbourhood of 0 0 0 Then E [ X n ] = M X ( n ) ( 0 ) E[X^n] = M_X^{(n)}(0) E [ X n ] = M X ( n ) ( 0 ) .
Proof. M X ( t ) = E [ e t X ] = ∑ n = 0 ∞ t n n ! E [ X n ] M_X(t) = E[e^{tX}] = \sum_{n=0}^{\infty} \frac{t^n}{n!} E[X^n] M X ( t ) = E [ e tX ] = ∑ n = 0 ∞ n ! t n E [ X n ] (by expanding the Taylor series and exchanging Summation and expectation, justified by dominated convergence). The coefficient of t n / n ! t^n/n! t n / n ! is E [ X n ] E[X^n] E [ X n ] So E [ X n ] = M X ( n ) ( 0 ) E[X^n] = M_X^{(n)}(0) E [ X n ] = M X ( n ) ( 0 ) . ■ \blacksquare ■
Theorem 4.4 (Uniqueness). If M X ( t ) = M Y ( t ) M_X(t) = M_Y(t) M X ( t ) = M Y ( t ) for all t t t in a neighbourhood of 0 0 0 Then X X X And Y Y Y have the same distribution.
Theorem 4.5. If X X X and Y Y Y are independent, M X + Y ( t ) = M X ( t ) M Y ( t ) M_{X+Y}(t) = M_X(t) M_Y(t) M X + Y ( t ) = M X ( t ) M Y ( t ) .
Proof. M X + Y ( t ) = E [ e t ( X + Y ) ] = E [ e t X e t Y ] = E [ e t X ] E [ e t Y ] = M X ( t ) M Y ( t ) M_{X+Y}(t) = E[e^{t(X+Y)}] = E[e^{tX} e^{tY}] = E[e^{tX}]\, E[e^{tY}] = M_X(t)\, M_Y(t) M X + Y ( t ) = E [ e t ( X + Y ) ] = E [ e tX e t Y ] = E [ e tX ] E [ e t Y ] = M X ( t ) M Y ( t ) Where the third equality uses independence. ■ \blacksquare ■
Theorem 4.6a (Markov’s Inequality). If X ≥ 0 X \geq 0 X ≥ 0 and a > 0 a \gt 0 a > 0 :
P ( X ≥ a ) ≤ E [ X ] a P(X \geq a) \leq \frac{E[X]}{a} P ( X ≥ a ) ≤ a E [ X ]
Proof. E [ X ] = ∫ 0 ∞ x d F ( x ) ≥ ∫ a ∞ x d F ( x ) ≥ a ∫ a ∞ d F ( x ) = a P ( X ≥ a ) E[X] = \int_0^\infty x\, dF(x) \geq \int_a^\infty x\, dF(x) \geq a \int_a^\infty dF(x) = a\, P(X \geq a) E [ X ] = ∫ 0 ∞ x d F ( x ) ≥ ∫ a ∞ x d F ( x ) ≥ a ∫ a ∞ d F ( x ) = a P ( X ≥ a ) . ■ \blacksquare ■
Theorem 4.6b (Chebyshev’s Inequality). For any random variable X X X with finite mean μ \mu μ and variance σ 2 \sigma^2 σ 2 And any k > 0 k \gt 0 k > 0 :
P ( ∣ X − μ ∣ ≥ k ) ≤ σ 2 k 2 P(|X - \mu| \geq k) \leq \frac{\sigma^2}{k^2} P ( ∣ X − μ ∣ ≥ k ) ≤ k 2 σ 2
Proof. Apply Markov’s inequality to ( X − μ ) 2 (X - \mu)^2 ( X − μ ) 2 with a = k 2 a = k^2 a = k 2 : P ( ∣ X − μ ∣ ≥ k ) = P ( ( X − μ ) 2 ≥ k 2 ) ≤ E [ ( X − μ ) 2 ] k 2 = σ 2 k 2 P(|X - \mu| \geq k) = P((X - \mu)^2 \geq k^2) \leq \frac{E[(X-\mu)^2]}{k^2} = \frac{\sigma^2}{k^2} P ( ∣ X − μ ∣ ≥ k ) = P (( X − μ ) 2 ≥ k 2 ) ≤ k 2 E [( X − μ ) 2 ] = k 2 σ 2 . ■ \blacksquare ■
Theorem 4.6c (Jensen’s Inequality). If φ \varphi φ is convex, then E [ φ ( X ) ] ≥ φ ( E [ X ] ) E[\varphi(X)] \geq \varphi(E[X]) E [ φ ( X )] ≥ φ ( E [ X ]) . If φ \varphi φ is concave, the inequality reverses.
Proof (sketch). For a convex function φ \varphi φ The tangent line at any point lies below the graph: φ ( x ) ≥ φ ( μ ) + φ ′ ( μ ) ( x − μ ) \varphi(x) \geq \varphi(\mu) + \varphi'(\mu)(x - \mu) φ ( x ) ≥ φ ( μ ) + φ ′ ( μ ) ( x − μ ) where μ = E [ X ] \mu = E[X] μ = E [ X ] . Taking expectations of both sides: E [ φ ( X ) ] ≥ φ ( μ ) + φ ′ ( μ ) ⋅ 0 = φ ( E [ X ] ) E[\varphi(X)] \geq \varphi(\mu) + \varphi'(\mu) \cdot 0 = \varphi(E[X]) E [ φ ( X )] ≥ φ ( μ ) + φ ′ ( μ ) ⋅ 0 = φ ( E [ X ]) . ■ \blacksquare ■
Remark. Important applications: E [ X 2 ] ≥ ( E [ X ] ) 2 E[X^2] \geq (E[X])^2 E [ X 2 ] ≥ ( E [ X ] ) 2 (variance is non-negative, since x 2 x^2 x 2 is convex); E [ log X ] ≤ log E [ X ] E[\log X] \leq \log E[X] E [ log X ] ≤ log E [ X ] (logarithm is concave — this is used in proving the information inequality).
Theorem 4.6 (Cauchy-Schwarz). For any random variables X , Y X, Y X , Y with finite second moments:
( E [ X Y ] ) 2 ≤ E [ X 2 ] E [ Y 2 ] (E[XY])^2 \leq E[X^2]\, E[Y^2] ( E [ X Y ] ) 2 ≤ E [ X 2 ] E [ Y 2 ]
Proof. For any real t t t , E [ ( X + t Y ) 2 ] = E [ X 2 ] + 2 t E [ X Y ] + t 2 E [ Y 2 ] ≥ 0 E[(X + tY)^2] = E[X^2] + 2t\, E[XY] + t^2\, E[Y^2] \geq 0 E [( X + t Y ) 2 ] = E [ X 2 ] + 2 t E [ X Y ] + t 2 E [ Y 2 ] ≥ 0 . This is a quadratic in t t t That is always non-negative, so its discriminant must be non-positive:
( 2 E [ X Y ] ) 2 − 4 E [ Y 2 ] E [ X 2 ] ≤ 0 ⟹ ( E [ X Y ] ) 2 ≤ E [ X 2 ] E [ Y 2 ] (2E[XY])^2 - 4\, E[Y^2]\, E[X^2] \leq 0 \implies (E[XY])^2 \leq E[X^2]\, E[Y^2] ( 2 E [ X Y ] ) 2 − 4 E [ Y 2 ] E [ X 2 ] ≤ 0 ⟹ ( E [ X Y ] ) 2 ≤ E [ X 2 ] E [ Y 2 ]
■ \blacksquare ■
Corollary 4.1. ∣ ρ X , Y ∣ ≤ 1 |\rho_{X,Y}| \leq 1 ∣ ρ X , Y ∣ ≤ 1 .
Proof. Apply Cauchy-Schwarz to X − E [ X ] X - E[X] X − E [ X ] and Y − E [ Y ] Y - E[Y] Y − E [ Y ] :
C o v ( X , Y ) 2 ≤ V a r ( X ) V a r ( Y ) \mathrm{Cov}(X,Y)^2 \leq \mathrm{Var}(X)\, \mathrm{Var}(Y) Cov ( X , Y ) 2 ≤ Var ( X ) Var ( Y )
So ∣ ρ X , Y ∣ = ∣ C o v ( X , Y ) ∣ V a r ( X ) V a r ( Y ) ≤ 1 |\rho_{X,Y}| = \frac{|\mathrm{Cov}(X,Y)|}{\sqrt{\mathrm{Var}(X)\,\mathrm{Var}(Y)}} \leq 1 ∣ ρ X , Y ∣ = Var ( X ) Var ( Y ) ∣ Cov ( X , Y ) ∣ ≤ 1 . ■ \blacksquare ■
Theorem 4.7 (Conditional Variance Formula).
V a r ( Y ) = E [ V a r ( Y ∣ X ) ] + V a r ( E [ Y ∣ X ] ) \mathrm{Var}(Y) = E[\mathrm{Var}(Y \mid X)] + \mathrm{Var}(E[Y \mid X]) Var ( Y ) = E [ Var ( Y ∣ X )] + Var ( E [ Y ∣ X ])
Proof. E [ V a r ( Y ∣ X ) ] = E [ E [ Y 2 ∣ X ] ] − E [ ( E [ Y ∣ X ] ) 2 ] = E [ Y 2 ] − E [ ( E [ Y ∣ X ] ) 2 ] E[\mathrm{Var}(Y \mid X)] = E[E[Y^2 \mid X]] - E[(E[Y \mid X])^2] = E[Y^2] - E[(E[Y \mid X])^2] E [ Var ( Y ∣ X )] = E [ E [ Y 2 ∣ X ]] − E [( E [ Y ∣ X ] ) 2 ] = E [ Y 2 ] − E [( E [ Y ∣ X ] ) 2 ] . Also V a r ( E [ Y ∣ X ] ) = E [ ( E [ Y ∣ X ] ) 2 ] − ( E [ E [ Y ∣ X ] ] ) 2 = E [ ( E [ Y ∣ X ] ) 2 ] − ( E [ Y ] ) 2 \mathrm{Var}(E[Y \mid X]) = E[(E[Y \mid X])^2] - (E[E[Y \mid X]])^2 = E[(E[Y \mid X])^2] - (E[Y])^2 Var ( E [ Y ∣ X ]) = E [( E [ Y ∣ X ] ) 2 ] − ( E [ E [ Y ∣ X ]] ) 2 = E [( E [ Y ∣ X ] ) 2 ] − ( E [ Y ] ) 2 . Adding: E [ Y 2 ] − ( E [ Y ] ) 2 = V a r ( Y ) E[Y^2] - (E[Y])^2 = \mathrm{Var}(Y) E [ Y 2 ] − ( E [ Y ] ) 2 = Var ( Y ) . ■ \blacksquare ■
Intuition. Total variance equals the average “within-group” variance plus the “between-group” variance. This Decomposition is the foundation of ANOVA (Analysis of Variance).
Worked Example. Find the MGF of X ∼ B i n ( n , p ) X \sim \mathrm{Bin}(n, p) X ∼ Bin ( n , p ) and use it to derive E [ X ] E[X] E [ X ] and V a r ( X ) \mathrm{Var}(X) Var ( X ) .
M X ( t ) = ( 1 − p + p e t ) n M_X(t) = (1 - p + pe^t)^n M X ( t ) = ( 1 − p + p e t ) n
M X ′ ( t ) = n ( 1 − p + p e t ) n − 1 ⋅ p e t M_X'(t) = n(1 - p + pe^t)^{n-1} \cdot pe^t M X ′ ( t ) = n ( 1 − p + p e t ) n − 1 ⋅ p e t
E [ X ] = M X ′ ( 0 ) = n ( 1 ) n − 1 ⋅ p = n p E[X] = M_X'(0) = n(1)^{n-1} \cdot p = np E [ X ] = M X ′ ( 0 ) = n ( 1 ) n − 1 ⋅ p = n p
M X ′ ′ ( t ) = n ( n − 1 ) ( 1 − p + p e t ) n − 2 ( p e t ) 2 + n ( 1 − p + p e t ) n − 1 ⋅ p e t M_X''(t) = n(n-1)(1 - p + pe^t)^{n-2}(pe^t)^2 + n(1 - p + pe^t)^{n-1} \cdot pe^t M X ′′ ( t ) = n ( n − 1 ) ( 1 − p + p e t ) n − 2 ( p e t ) 2 + n ( 1 − p + p e t ) n − 1 ⋅ p e t
E [ X 2 ] = M X ′ ′ ( 0 ) = n ( n − 1 ) p 2 + n p E[X^2] = M_X''(0) = n(n-1)p^2 + np E [ X 2 ] = M X ′′ ( 0 ) = n ( n − 1 ) p 2 + n p
V a r ( X ) = n ( n − 1 ) p 2 + n p − n 2 p 2 = n p − n p 2 = n p ( 1 − p ) ■ \mathrm{Var}(X) = n(n-1)p^2 + np - n^2p^2 = np - np^2 = np(1-p) \quad \blacksquare Var ( X ) = n ( n − 1 ) p 2 + n p − n 2 p 2 = n p − n p 2 = n p ( 1 − p ) ■
Problem 4.3. The number of accidents at an intersection per week follows P o i s s o n ( λ ) \mathrm{Poisson}(\lambda) Poisson ( λ ) with λ = 2 \lambda = 2 λ = 2 . Find P ( X ≤ 1 ) P(X \leq 1) P ( X ≤ 1 ) and, using Markov’s inequality, give an upper bound for P ( X ≥ 6 ) P(X \geq 6) P ( X ≥ 6 ) .
Solution P ( X ≤ 1 ) = P ( X = 0 ) + P ( X = 1 ) = e − 2 + 2 e − 2 = 3 e − 2 ≈ 0.406 P(X \leq 1) = P(X = 0) + P(X = 1) = e^{-2} + 2e^{-2} = 3e^{-2} \approx 0.406 P ( X ≤ 1 ) = P ( X = 0 ) + P ( X = 1 ) = e − 2 + 2 e − 2 = 3 e − 2 ≈ 0.406
By Markov’s inequality (since X ≥ 0 X \geq 0 X ≥ 0 ):
P ( X ≥ 6 ) ≤ E [ X ] 6 = 2 6 = 1 3 ≈ 0.333 P(X \geq 6) \leq \frac{E[X]}{6} = \frac{2}{6} = \frac{1}{3} \approx 0.333 P ( X ≥ 6 ) ≤ 6 E [ X ] = 6 2 = 3 1 ≈ 0.333
For comparison, the exact value: P ( X ≥ 6 ) = 1 − P ( X ≤ 5 ) = 1 − e − 2 ( 1 + 2 + 2 + 8 / 6 + 16 / 24 + 32 / 120 ) ≈ 0.0166 P(X \geq 6) = 1 - P(X \leq 5) = 1 - e^{-2}(1 + 2 + 2 + 8/6 + 16/24 + 32/120) \approx 0.0166 P ( X ≥ 6 ) = 1 − P ( X ≤ 5 ) = 1 − e − 2 ( 1 + 2 + 2 + 8/6 + 16/24 + 32/120 ) ≈ 0.0166 . Markov’s bound is very loose but requires no knowledge beyond the mean.
M X ( t ) = E [ e t X ] = ∫ 0 ∞ e t x λ e − λ x d x = λ ∫ 0 ∞ e − ( λ − t ) x d x M_X(t) = E[e^{tX}] = \int_0^{\infty} e^{tx} \lambda e^{-\lambda x}\, dx = \lambda \int_0^{\infty} e^{-(\lambda - t)x}\, dx M X ( t ) = E [ e tX ] = ∫ 0 ∞ e t x λ e − λ x d x = λ ∫ 0 ∞ e − ( λ − t ) x d x
For t < λ t \lt \lambda t < λ : M X ( t ) = λ λ − t M_X(t) = \frac{\lambda}{\lambda - t} M X ( t ) = λ − t λ .
M X ′ ( t ) = λ ( λ − t ) 2 M_X'(t) = \frac{\lambda}{(\lambda - t)^2} M X ′ ( t ) = ( λ − t ) 2 λ So E [ X ] = M X ′ ( 0 ) = 1 / λ E[X] = M_X'(0) = 1/\lambda E [ X ] = M X ′ ( 0 ) = 1/ λ . ■ \blacksquare ■
Problem 4.1. Find E [ X 2 ] E[X^2] E [ X 2 ] and V a r ( X ) \mathrm{Var}(X) Var ( X ) for X ∼ E x p ( λ ) X \sim \mathrm{Exp}(\lambda) X ∼ Exp ( λ ) using the MGF.
Solution M X ′ ′ ( t ) = 2 λ ( λ − t ) 3 M_X''(t) = \frac{2\lambda}{(\lambda - t)^3} M X ′′ ( t ) = ( λ − t ) 3 2 λ So E [ X 2 ] = M X ′ ′ ( 0 ) = 2 λ λ 3 = 2 λ 2 E[X^2] = M_X''(0) = \frac{2\lambda}{\lambda^3} = \frac{2}{\lambda^2} E [ X 2 ] = M X ′′ ( 0 ) = λ 3 2 λ = λ 2 2 .
V a r ( X ) = E [ X 2 ] − ( E [ X ] ) 2 = 2 λ 2 − 1 λ 2 = 1 λ 2 \mathrm{Var}(X) = E[X^2] - (E[X])^2 = \frac{2}{\lambda^2} - \frac{1}{\lambda^2} = \frac{1}{\lambda^2} Var ( X ) = E [ X 2 ] − ( E [ X ] ) 2 = λ 2 2 − λ 2 1 = λ 2 1
Problem 4.2. A fair die is rolled. Let X X X be the value shown. Compute E [ X ] E[X] E [ X ] , E [ X 2 ] E[X^2] E [ X 2 ] And V a r ( X ) \mathrm{Var}(X) Var ( X ) .
Solution E [ X ] = 1 6 ( 1 + 2 + 3 + 4 + 5 + 6 ) = 21 6 = 3.5 E[X] = \frac{1}{6}(1 + 2 + 3 + 4 + 5 + 6) = \frac{21}{6} = 3.5 E [ X ] = 6 1 ( 1 + 2 + 3 + 4 + 5 + 6 ) = 6 21 = 3.5
E [ X 2 ] = 1 6 ( 1 + 4 + 9 + 16 + 25 + 36 ) = 91 6 ≈ 15.167 E[X^2] = \frac{1}{6}(1 + 4 + 9 + 16 + 25 + 36) = \frac{91}{6} \approx 15.167 E [ X 2 ] = 6 1 ( 1 + 4 + 9 + 16 + 25 + 36 ) = 6 91 ≈ 15.167
V a r ( X ) = 91 6 − ( 7 2 ) 2 = 91 6 − 49 4 = 182 − 147 12 = 35 12 ≈ 2.917 \mathrm{Var}(X) = \frac{91}{6} - \left(\frac{7}{2}\right)^2 = \frac{91}{6} - \frac{49}{4} = \frac{182 - 147}{12} = \frac{35}{12} \approx 2.917 Var ( X ) = 6 91 − ( 2 7 ) 2 = 6 91 − 4 49 = 12 182 − 147 = 12 35 ≈ 2.917
:::caution Common Pitfall V a r ( X ) = E [ X 2 ] − ( E [ X ] ) 2 \mathrm{Var}(X) = E[X^2] - (E[X])^2 Var ( X ) = E [ X 2 ] − ( E [ X ] ) 2 not ( E [ X ] ) 2 − E [ X 2 ] (E[X])^2 - E[X^2] ( E [ X ] ) 2 − E [ X 2 ] . The variance is always non-negative, so if you Obtain a negative value, you have made an arithmetic error. :::
For two random variables X X X and Y Y Y The joint CDF is F X , Y ( x , y ) = P ( X ≤ x , Y ≤ y ) F_{X,Y}(x,y) = P(X \leq x, Y \leq y) F X , Y ( x , y ) = P ( X ≤ x , Y ≤ y ) .
The joint PDF (for continuous) satisfies P ( ( X , Y ) ∈ A ) = ∬ A f X , Y ( x , y ) d x d y P((X,Y) \in A) = \iint_A f_{X,Y}(x,y)\, dx\, dy P (( X , Y ) ∈ A ) = ∬ A f X , Y ( x , y ) d x d y .
The marginal PDF of X X X is obtained by integrating out Y Y Y :
f X ( x ) = ∫ − ∞ ∞ f X , Y ( x , y ) d y f_X(x) = \int_{-\infty}^{\infty} f_{X,Y}(x,y)\, dy f X ( x ) = ∫ − ∞ ∞ f X , Y ( x , y ) d y
Similarly, f Y ( y ) = ∫ − ∞ ∞ f X , Y ( x , y ) d x f_Y(y) = \int_{-\infty}^{\infty} f_{X,Y}(x,y)\, dx f Y ( y ) = ∫ − ∞ ∞ f X , Y ( x , y ) d x .
Definition. The conditional PDF of X X X given Y = y Y = y Y = y (when f Y ( y ) > 0 f_Y(y) \gt 0 f Y ( y ) > 0 ) is
f X ∣ Y ( x ∣ y ) = f X , Y ( x , y ) f Y ( y ) f_{X \mid Y}(x \mid y) = \frac{f_{X,Y}(x,y)}{f_Y(y)} f X ∣ Y ( x ∣ y ) = f Y ( y ) f X , Y ( x , y )
Definition. The conditional expectation is
E [ X ∣ Y = y ] = ∫ − ∞ ∞ x f X ∣ Y ( x ∣ y ) d x E[X \mid Y = y] = \int_{-\infty}^{\infty} x\, f_{X \mid Y}(x \mid y)\, dx E [ X ∣ Y = y ] = ∫ − ∞ ∞ x f X ∣ Y ( x ∣ y ) d x
Theorem 5.0 (Law of Iterated Expectations / Tower Property).
E [ X ] = E [ E [ X ∣ Y ] ] E[X] = E[E[X \mid Y]] E [ X ] = E [ E [ X ∣ Y ]]
Proof. For the continuous case:
E [ E [ X ∣ Y ] ] = ∫ − ∞ ∞ E [ X ∣ Y = y ] f Y ( y ) d y = ∫ − ∞ ∞ ( ∫ − ∞ ∞ x f X ∣ Y ( x ∣ y ) d x ) f Y ( y ) d y E[E[X \mid Y]] = \int_{-\infty}^{\infty} E[X \mid Y = y]\, f_Y(y)\, dy = \int_{-\infty}^{\infty} \left(\int_{-\infty}^{\infty} x\, f_{X \mid Y}(x \mid y)\, dx\right) f_Y(y)\, dy E [ E [ X ∣ Y ]] = ∫ − ∞ ∞ E [ X ∣ Y = y ] f Y ( y ) d y = ∫ − ∞ ∞ ( ∫ − ∞ ∞ x f X ∣ Y ( x ∣ y ) d x ) f Y ( y ) d y
= ∫ − ∞ ∞ ∫ − ∞ ∞ x f X , Y ( x , y ) f Y ( y ) f Y ( y ) d x d y = ∫ − ∞ ∞ ∫ − ∞ ∞ x f X , Y ( x , y ) d x d y = E [ X ] = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} x\, \frac{f_{X,Y}(x,y)}{f_Y(y)}\, f_Y(y)\, dx\, dy = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} x\, f_{X,Y}(x,y)\, dx\, dy = E[X] = ∫ − ∞ ∞ ∫ − ∞ ∞ x f Y ( y ) f X , Y ( x , y ) f Y ( y ) d x d y = ∫ − ∞ ∞ ∫ − ∞ ∞ x f X , Y ( x , y ) d x d y = E [ X ]
■ \blacksquare ■
X X X and Y Y Y are independent if and only if
f X , Y ( x , y ) = f X ( x ) f Y ( y ) f o r a l l x , y f_{X,Y}(x,y) = f_X(x) f_Y(y) \quad \mathrm{for} all x, y f X , Y ( x , y ) = f X ( x ) f Y ( y ) for a l l x , y
Theorem 5.1. If X X X and Y Y Y are independent, then E [ X Y ] = E [ X ] E [ Y ] E[XY] = E[X]E[Y] E [ X Y ] = E [ X ] E [ Y ] and V a r ( X + Y ) = V a r ( X ) + V a r ( Y ) \mathrm{Var}(X + Y) = \mathrm{Var}(X) + \mathrm{Var}(Y) Var ( X + Y ) = Var ( X ) + Var ( Y ) .
Proposition 5.1 (Independence Criteria). The following are equivalent for continuous X , Y X, Y X , Y :
X X X and Y Y Y are independent.f X , Y ( x , y ) = f X ( x ) f Y ( y ) f_{X,Y}(x,y) = f_X(x) f_Y(y) f X , Y ( x , y ) = f X ( x ) f Y ( y ) for all x , y x, y x , y .f X ∣ Y ( x ∣ y ) = f X ( x ) f_{X \mid Y}(x \mid y) = f_X(x) f X ∣ Y ( x ∣ y ) = f X ( x ) for all x , y x, y x , y with f Y ( y ) > 0 f_Y(y) \gt 0 f Y ( y ) > 0 .F X , Y ( x , y ) = F X ( x ) F Y ( y ) F_{X,Y}(x,y) = F_X(x)\, F_Y(y) F X , Y ( x , y ) = F X ( x ) F Y ( y ) for all x , y x, y x , y .C o v ( X , Y ) = E [ ( X − E [ X ] ) ( Y − E [ Y ] ) ] = E [ X Y ] − E [ X ] E [ Y ] \mathrm{Cov}(X, Y) = E[(X - E[X])(Y - E[Y])] = E[XY] - E[X]E[Y] Cov ( X , Y ) = E [( X − E [ X ]) ( Y − E [ Y ])] = E [ X Y ] − E [ X ] E [ Y ]
The correlation coefficient is
ρ X , Y = C o v ( X , Y ) V a r ( X ) V a r ( Y ) \rho_{X,Y} = \frac{\mathrm{Cov}(X,Y)}{\sqrt{\mathrm{Var}(X)\mathrm{Var}(Y)}} ρ X , Y = Var ( X ) Var ( Y ) Cov ( X , Y )
Properties:
C o v ( a X + b , c Y + d ) = a c C o v ( X , Y ) \mathrm{Cov}(aX + b, cY + d) = ac\,\mathrm{Cov}(X, Y) Cov ( a X + b , c Y + d ) = a c Cov ( X , Y ) .C o v ( X , X ) = V a r ( X ) \mathrm{Cov}(X, X) = \mathrm{Var}(X) Cov ( X , X ) = Var ( X ) .C o v ( X + Z , Y ) = C o v ( X , Y ) + C o v ( Z , Y ) \mathrm{Cov}(X + Z, Y) = \mathrm{Cov}(X, Y) + \mathrm{Cov}(Z, Y) Cov ( X + Z , Y ) = Cov ( X , Y ) + Cov ( Z , Y ) (bilinearity).− 1 ≤ ρ X , Y ≤ 1 -1 \leq \rho_{X,Y} \leq 1 − 1 ≤ ρ X , Y ≤ 1 .ρ = ± 1 \rho = \pm 1 ρ = ± 1 if and only if X X X and Y Y Y are linearly related.ρ = 0 \rho = 0 ρ = 0 does not imply independence (only uncorrelatedness).Proposition 5.2 (Variance of a Sum). For any random variables X 1 , … , X n X_1, \ldots, X_n X 1 , … , X n :
V a r ( ∑ i = 1 n X i ) = ∑ i = 1 n V a r ( X i ) + 2 ∑ 1 ≤ i < j ≤ n C o v ( X i , X j ) \mathrm{Var}\left(\sum_{i=1}^n X_i\right) = \sum_{i=1}^n \mathrm{Var}(X_i) + 2\sum_{1 \leq i \lt j \leq n} \mathrm{Cov}(X_i, X_j) Var ( ∑ i = 1 n X i ) = ∑ i = 1 n Var ( X i ) + 2 ∑ 1 ≤ i < j ≤ n Cov ( X i , X j )
Proof. Expand V a r ( ∑ X i ) = E [ ( ∑ X i ) 2 ] − ( E [ ∑ X i ] ) 2 \mathrm{Var}(\sum X_i) = E[(\sum X_i)^2] - (E[\sum X_i])^2 Var ( ∑ X i ) = E [( ∑ X i ) 2 ] − ( E [ ∑ X i ] ) 2 and collect terms. ■ \blacksquare ■
Remark. If the X i X_i X i are pairwise uncorrelated (which includes independence as a special case), the covariance Terms vanish and the variance of the sum equals the sum of the variances.
Theorem 5.2. Let ( X , Y ) (X, Y) ( X , Y ) have joint PDF f X , Y ( x , y ) f_{X,Y}(x,y) f X , Y ( x , y ) and let ( U , V ) = g ( X , Y ) (U, V) = g(X, Y) ( U , V ) = g ( X , Y ) where g g g is a bijection From R 2 \mathbb{R}^2 R 2 to R 2 \mathbb{R}^2 R 2 with inverse g − 1 g^{-1} g − 1 :
u = u ( x , y ) , v = v ( x , y ) u = u(x, y), \quad v = v(x, y) u = u ( x , y ) , v = v ( x , y )
Then the joint PDF of ( U , V ) (U, V) ( U , V ) is
f U , V ( u , v ) = f X , Y ( x ( u , v ) , y ( u , v ) ) ⋅ ∣ J ∣ f_{U,V}(u,v) = f_{X,Y}(x(u,v), y(u,v)) \cdot |J| f U , V ( u , v ) = f X , Y ( x ( u , v ) , y ( u , v )) ⋅ ∣ J ∣
Where the Jacobian determinant is
J = det ( ∂ x ∂ u ∂ x ∂ v ∂ y ∂ u ∂ y ∂ v ) J = \det \begin{pmatrix} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\ \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \end{pmatrix} J = det ( ∂ u ∂ x ∂ u ∂ y ∂ v ∂ x ∂ v ∂ y )
Problem 5.1. Let X , Y X, Y X , Y be independent with X , Y ∼ E x p ( λ ) X, Y \sim \mathrm{Exp}(\lambda) X , Y ∼ Exp ( λ ) . Find the joint distribution of U = X + Y U = X + Y U = X + Y and V = X / ( X + Y ) V = X / (X + Y) V = X / ( X + Y ) .
Solution The inverse transformation is X = U V X = UV X = U V , Y = U ( 1 − V ) Y = U(1 - V) Y = U ( 1 − V ) for u > 0 , 0 < v < 1 u \gt 0, 0 \lt v \lt 1 u > 0 , 0 < v < 1 .
The Jacobian:
J = det ( v u 1 − v − u ) = − u v − u ( 1 − v ) = − u J = \det \begin{pmatrix} v & u \\ 1 - v & -u \end{pmatrix} = -uv - u(1 - v) = -u J = det ( v 1 − v u − u ) = − uv − u ( 1 − v ) = − u
So ∣ J ∣ = u |J| = u ∣ J ∣ = u .
The joint PDF of ( X , Y ) (X, Y) ( X , Y ) is f X , Y ( x , y ) = λ 2 e − λ ( x + y ) f_{X,Y}(x,y) = \lambda^2 e^{-\lambda(x+y)} f X , Y ( x , y ) = λ 2 e − λ ( x + y ) for x , y > 0 x, y \gt 0 x , y > 0 .
f U , V ( u , v ) = λ 2 e − λ ( u v + u ( 1 − v ) ) ⋅ u = λ 2 u e − λ u , u > 0 , 0 < v < 1 f_{U,V}(u,v) = \lambda^2 e^{-\lambda(uv + u(1-v))} \cdot u = \lambda^2 u\, e^{-\lambda u}, \quad u \gt 0, 0 \lt v \lt 1 f U , V ( u , v ) = λ 2 e − λ ( uv + u ( 1 − v )) ⋅ u = λ 2 u e − λ u , u > 0 , 0 < v < 1
This factors as f U ( u ) ⋅ f V ( v ) f_U(u) \cdot f_V(v) f U ( u ) ⋅ f V ( v ) where f U ( u ) = λ 2 u e − λ u f_U(u) = \lambda^2 u\, e^{-\lambda u} f U ( u ) = λ 2 u e − λ u (Gamma( 2 , λ ) (2, \lambda) ( 2 , λ ) ) And f V ( v ) = 1 f_V(v) = 1 f V ( v ) = 1 on ( 0 , 1 ) (0, 1) ( 0 , 1 ) (Uniform( 0 , 1 ) (0, 1) ( 0 , 1 ) ). Hence U U U and V V V are independent. ■ \blacksquare ■
Definition. ( X , Y ) (X, Y) ( X , Y ) has a bivariate normal distribution with parameters μ X , μ Y , σ X 2 , σ Y 2 , ρ \mu_X, \mu_Y, \sigma_X^2, \sigma_Y^2, \rho μ X , μ Y , σ X 2 , σ Y 2 , ρ If the joint PDF is
f ( x , y ) = 1 2 π σ X σ Y 1 − ρ 2 exp ( − 1 2 ( 1 − ρ 2 ) [ ( x − μ X ) 2 σ X 2 − 2 ρ ( x − μ X ) ( y − μ Y ) σ X σ Y + ( y − μ Y ) 2 σ Y 2 ] ) f(x,y) = \frac{1}{2\pi \sigma_X \sigma_Y \sqrt{1 - \rho^2}} \exp\left(-\frac{1}{2(1-\rho^2)}\left[\frac{(x - \mu_X)^2}{\sigma_X^2} - \frac{2\rho(x - \mu_X)(y - \mu_Y)}{\sigma_X \sigma_Y} + \frac{(y - \mu_Y)^2}{\sigma_Y^2}\right]\right) f ( x , y ) = 2 π σ X σ Y 1 − ρ 2 1 exp ( − 2 ( 1 − ρ 2 ) 1 [ σ X 2 ( x − μ X ) 2 − σ X σ Y 2 ρ ( x − μ X ) ( y − μ Y ) + σ Y 2 ( y − μ Y ) 2 ] )
Key Properties:
Both marginals are normal: X ∼ N ( μ X , σ X 2 ) X \sim N(\mu_X, \sigma_X^2) X ∼ N ( μ X , σ X 2 ) and Y ∼ N ( μ Y , σ Y 2 ) Y \sim N(\mu_Y, \sigma_Y^2) Y ∼ N ( μ Y , σ Y 2 ) . ρ = C o r r ( X , Y ) \rho = \mathrm{Corr}(X, Y) ρ = Corr ( X , Y ) .X X X and Y Y Y are independent if and only if ρ = 0 \rho = 0 ρ = 0 .Every linear combination a X + b Y aX + bY a X + bY is normally distributed. The conditional distribution Y ∣ X = x Y \mid X = x Y ∣ X = x is normal with E [ Y ∣ X = x ] = μ Y + ρ σ Y σ X ( x − μ X ) E[Y \mid X = x] = \mu_Y + \rho \frac{\sigma_Y}{\sigma_X}(x - \mu_X) E [ Y ∣ X = x ] = μ Y + ρ σ X σ Y ( x − μ X ) and V a r ( Y ∣ X = x ) = σ Y 2 ( 1 − ρ 2 ) \mathrm{Var}(Y \mid X = x) = \sigma_Y^2(1 - \rho^2) Var ( Y ∣ X = x ) = σ Y 2 ( 1 − ρ 2 ) . The joint MGF is M X , Y ( t 1 , t 2 ) = exp ( μ X t 1 + μ Y t 2 + 1 2 ( σ X 2 t 1 2 + 2 ρ σ X σ Y t 1 t 2 + σ Y 2 t 2 2 ) ) M_{X,Y}(t_1, t_2) = \exp\left(\mu_X t_1 + \mu_Y t_2 + \frac{1}{2}(\sigma_X^2 t_1^2 + 2\rho\sigma_X\sigma_Y t_1 t_2 + \sigma_Y^2 t_2^2)\right) M X , Y ( t 1 , t 2 ) = exp ( μ X t 1 + μ Y t 2 + 2 1 ( σ X 2 t 1 2 + 2 ρ σ X σ Y t 1 t 2 + σ Y 2 t 2 2 ) )
Problem 5.4. Let ( X , Y ) (X, Y) ( X , Y ) be bivariate normal with μ X = 0 \mu_X = 0 μ X = 0 , μ Y = 0 \mu_Y = 0 μ Y = 0 , σ X = σ Y = 1 \sigma_X = \sigma_Y = 1 σ X = σ Y = 1 , ρ = 1 / 2 \rho = 1/2 ρ = 1/2 . Find P ( Y > 1 ∣ X = 0.5 ) P(Y \gt 1 \mid X = 0.5) P ( Y > 1 ∣ X = 0.5 ) .
Solution The conditional distribution Y ∣ X = 0.5 Y \mid X = 0.5 Y ∣ X = 0.5 is normal with:
E [ Y ∣ X = 0.5 ] = 0 + 1 2 ⋅ 1 ⋅ ( 0.5 − 0 ) = 0.25 E[Y \mid X = 0.5] = 0 + \frac{1}{2} \cdot 1 \cdot (0.5 - 0) = 0.25 E [ Y ∣ X = 0.5 ] = 0 + 2 1 ⋅ 1 ⋅ ( 0.5 − 0 ) = 0.25
V a r ( Y ∣ X = 0.5 ) = 1 ⋅ ( 1 − 1 / 4 ) = 3 / 4 , σ = 3 / 2 \mathrm{Var}(Y \mid X = 0.5) = 1 \cdot (1 - 1/4) = 3/4, \quad \sigma = \sqrt{3}/2 Var ( Y ∣ X = 0.5 ) = 1 ⋅ ( 1 − 1/4 ) = 3/4 , σ = 3 /2
P ( Y > 1 ∣ X = 0.5 ) = P ( Z > 1 − 0.25 3 / 2 ) = P ( Z > 0.75 × 2 3 ) = P ( Z > 0.866 ) ≈ 0.193 P(Y \gt 1 \mid X = 0.5) = P\left(Z \gt \frac{1 - 0.25}{\sqrt{3}/2}\right) = P\left(Z \gt \frac{0.75 \times 2}{\sqrt{3}}\right) = P(Z \gt 0.866) \approx 0.193 P ( Y > 1 ∣ X = 0.5 ) = P ( Z > 3 /2 1 − 0.25 ) = P ( Z > 3 0.75 × 2 ) = P ( Z > 0.866 ) ≈ 0.193
Problem 5.2. Let f X , Y ( x , y ) = 8 x y f_{X,Y}(x,y) = 8xy f X , Y ( x , y ) = 8 x y for 0 ≤ x ≤ 1 , 0 ≤ y ≤ x 0 \leq x \leq 1, 0 \leq y \leq x 0 ≤ x ≤ 1 , 0 ≤ y ≤ x . Find the marginal distributions of X X X And Y Y Y And determine whether X X X and Y Y Y are independent.
Solution f X ( x ) = ∫ 0 x 8 x y d y = 8 x ⋅ x 2 2 = 4 x 3 , 0 ≤ x ≤ 1 f_X(x) = \int_0^x 8xy\, dy = 8x \cdot \frac{x^2}{2} = 4x^3, \quad 0 \leq x \leq 1 f X ( x ) = ∫ 0 x 8 x y d y = 8 x ⋅ 2 x 2 = 4 x 3 , 0 ≤ x ≤ 1
f Y ( y ) = ∫ y 1 8 x y d x = 8 y ⋅ 1 − y 2 2 = 4 y ( 1 − y 2 ) , 0 ≤ y ≤ 1 f_Y(y) = \int_y^1 8xy\, dx = 8y \cdot \frac{1 - y^2}{2} = 4y(1 - y^2), \quad 0 \leq y \leq 1 f Y ( y ) = ∫ y 1 8 x y d x = 8 y ⋅ 2 1 − y 2 = 4 y ( 1 − y 2 ) , 0 ≤ y ≤ 1
Check: f X ( x ) f Y ( y ) = 4 x 3 ⋅ 4 y ( 1 − y 2 ) = 16 x 3 y ( 1 − y 2 ) ≠ 8 x y = f X , Y ( x , y ) f_X(x) f_Y(y) = 4x^3 \cdot 4y(1 - y^2) = 16x^3 y(1 - y^2) \neq 8xy = f_{X,Y}(x,y) f X ( x ) f Y ( y ) = 4 x 3 ⋅ 4 y ( 1 − y 2 ) = 16 x 3 y ( 1 − y 2 ) = 8 x y = f X , Y ( x , y ) .
Therefore X X X and Y Y Y are not independent. ■ \blacksquare ■
Problem 5.3. Let X ∼ N ( 0 , 1 ) X \sim N(0, 1) X ∼ N ( 0 , 1 ) and Y = X 2 Y = X^2 Y = X 2 . Compute C o v ( X , Y ) \mathrm{Cov}(X, Y) Cov ( X , Y ) and ρ X , Y \rho_{X,Y} ρ X , Y .
Solution E [ X ] = 0 E[X] = 0 E [ X ] = 0 , E [ Y ] = E [ X 2 ] = 1 E[Y] = E[X^2] = 1 E [ Y ] = E [ X 2 ] = 1 And E [ X Y ] = E [ X 3 ] = 0 E[XY] = E[X^3] = 0 E [ X Y ] = E [ X 3 ] = 0 (since X 3 X^3 X 3 is an odd function of a symmetric distribution).
C o v ( X , Y ) = E [ X Y ] − E [ X ] E [ Y ] = 0 − 0 = 0 \mathrm{Cov}(X, Y) = E[XY] - E[X]E[Y] = 0 - 0 = 0 Cov ( X , Y ) = E [ X Y ] − E [ X ] E [ Y ] = 0 − 0 = 0
So ρ X , Y = 0 \rho_{X,Y} = 0 ρ X , Y = 0 . However, X X X and Y Y Y are not independent (knowing X X X determines Y Y Y exactly). This demonstrates that zero correlation does not imply independence. ■ \blacksquare ■
Definition. X n → p X X_n \xrightarrow{p} X X n p X (convergence in probability) if for every ε > 0 \varepsilon \gt 0 ε > 0 :
lim n → ∞ P ( ∣ X n − X ∣ > ε ) = 0 \lim_{n \to \infty} P(|X_n - X| \gt \varepsilon) = 0 lim n → ∞ P ( ∣ X n − X ∣ > ε ) = 0
Definition. X n → d X X_n \xrightarrow{d} X X n d X (convergence in distribution) if lim n → ∞ F X n ( x ) = F X ( x ) \lim_{n \to \infty} F_{X_n}(x) = F_X(x) lim n → ∞ F X n ( x ) = F X ( x ) at all Continuity points of F X F_X F X .
Remark. Convergence in probability implies convergence in distribution. The converse does not hold , But does hold when the limit is a constant.
Proposition 6.1. If X n → p c X_n \xrightarrow{p} c X n p c (a constant), then X n → d c X_n \xrightarrow{d} c X n d c .
Proof. If F c ( x ) F_c(x) F c ( x ) is the CDF of the constant c c c Then F c ( x ) = 0 F_c(x) = 0 F c ( x ) = 0 for x < c x \lt c x < c and F c ( x ) = 1 F_c(x) = 1 F c ( x ) = 1 for x > c x \gt c x > c . For x > c x \gt c x > c : F X n ( x ) = P ( X n ≤ x ) = 1 − P ( X n > x ) → 1 − 0 = 1 = F c ( x ) F_{X_n}(x) = P(X_n \leq x) = 1 - P(X_n \gt x) \to 1 - 0 = 1 = F_c(x) F X n ( x ) = P ( X n ≤ x ) = 1 − P ( X n > x ) → 1 − 0 = 1 = F c ( x ) . For x < c x \lt c x < c : F X n ( x ) = P ( X n ≤ x ) ≤ P ( ∣ X n − c ∣ > c − x ) → 0 = F c ( x ) F_{X_n}(x) = P(X_n \leq x) \leq P(|X_n - c| \gt c - x) \to 0 = F_c(x) F X n ( x ) = P ( X n ≤ x ) ≤ P ( ∣ X n − c ∣ > c − x ) → 0 = F c ( x ) . Since F c F_c F c is continuous at all x ≠ c x \neq c x = c Convergence holds. ■ \blacksquare ■
Definition. X n → a . s . X X_n \xrightarrow{a.s.} X X n a . s . X (almost sure convergence) if P ( lim n → ∞ X n = X ) = 1 P(\lim_{n \to \infty} X_n = X) = 1 P ( lim n → ∞ X n = X ) = 1 .
Remark. The hierarchy of convergence is: almost sure ⟹ \implies ⟹ in probability ⟹ \implies ⟹ in distribution. None of the reverse implications hold .
Theorem 6.1 (Weak Law of Large Numbers). Let X 1 , X 2 , … X_1, X_2, \ldots X 1 , X 2 , … be i.i.d. With E [ X i ] = μ E[X_i] = \mu E [ X i ] = μ and V a r ( X i ) = σ 2 < ∞ \mathrm{Var}(X_i) = \sigma^2 \lt \infty Var ( X i ) = σ 2 < ∞ . Then for every ε > 0 \varepsilon \gt 0 ε > 0 :
lim n → ∞ P ( ∣ 1 n ∑ i = 1 n X i − μ ∣ > ε ) = 0 \lim_{n \to \infty} P\left(\left|\frac{1}{n}\sum_{i=1}^n X_i - \mu\right| \gt \varepsilon\right) = 0 lim n → ∞ P ( n 1 ∑ i = 1 n X i − μ > ε ) = 0
Proof. Let X ˉ n = 1 n ∑ i = 1 n X i \bar{X}_n = \frac{1}{n}\sum_{i=1}^n X_i X ˉ n = n 1 ∑ i = 1 n X i . Then E [ X ˉ n ] = μ E[\bar{X}_n] = \mu E [ X ˉ n ] = μ and V a r ( X ˉ n ) = σ 2 / n \mathrm{Var}(\bar{X}_n) = \sigma^2/n Var ( X ˉ n ) = σ 2 / n . By Chebyshev’s inequality:
P ( ∣ X ˉ n − μ ∣ > ε ) ≤ V a r ( X ˉ n ) ε 2 = σ 2 n ε 2 → 0 P(|\bar{X}_n - \mu| \gt \varepsilon) \leq \frac{\mathrm{Var}(\bar{X}_n)}{\varepsilon^2} = \frac{\sigma^2}{n\varepsilon^2} \to 0 P ( ∣ X ˉ n − μ ∣ > ε ) ≤ ε 2 Var ( X ˉ n ) = n ε 2 σ 2 → 0
■ \blacksquare ■
Theorem 6.2 (Strong Law of Large Numbers). Under the same hypotheses:
P ( lim n → ∞ 1 n ∑ i = 1 n X i = μ ) = 1 P\left(\lim_{n \to \infty} \frac{1}{n}\sum_{i=1}^n X_i = \mu\right) = 1 P ( lim n → ∞ n 1 ∑ i = 1 n X i = μ ) = 1
Theorem 6.3 (Central Limit Theorem). Let X 1 , X 2 , … X_1, X_2, \ldots X 1 , X 2 , … be i.i.d. With E [ X i ] = μ E[X_i] = \mu E [ X i ] = μ and V a r ( X i ) = σ 2 > 0 \mathrm{Var}(X_i) = \sigma^2 \gt 0 Var ( X i ) = σ 2 > 0 . Then
X ˉ n − μ σ / n → d N ( 0 , 1 ) \frac{\bar{X}_n - \mu}{\sigma / \sqrt{n}} \xrightarrow{d} N(0, 1) σ / n X ˉ n − μ d N ( 0 , 1 )
That is, for all a < b a \lt b a < b :
lim n → ∞ P ( a < X ˉ n − μ σ / n < b ) = Φ ( b ) − Φ ( a ) \lim_{n \to \infty} P\left(a \lt \frac{\bar{X}_n - \mu}{\sigma / \sqrt{n}} \lt b\right) = \Phi(b) - \Phi(a) lim n → ∞ P ( a < σ / n X ˉ n − μ < b ) = Φ ( b ) − Φ ( a )
Proof (sketch using MGFs). Let Y i = ( X i − μ ) / σ Y_i = (X_i - \mu)/\sigma Y i = ( X i − μ ) / σ So E [ Y i ] = 0 E[Y_i] = 0 E [ Y i ] = 0 and V a r ( Y i ) = 1 \mathrm{Var}(Y_i) = 1 Var ( Y i ) = 1 . Define Z n = 1 n ∑ i = 1 n Y i Z_n = \frac{1}{\sqrt{n}} \sum_{i=1}^n Y_i Z n = n 1 ∑ i = 1 n Y i . We show M Z n ( t ) → e t 2 / 2 M_{Z_n}(t) \to e^{t^2/2} M Z n ( t ) → e t 2 /2 (the standard normal MGF).
Let M ( t ) = E [ e t Y 1 ] M(t) = E[e^{tY_1}] M ( t ) = E [ e t Y 1 ] be the MGF of Y 1 Y_1 Y 1 . Then:
M Z n ( t ) = [ M ( t n ) ] n M_{Z_n}(t) = \left[M\left(\frac{t}{\sqrt{n}}\right)\right]^n M Z n ( t ) = [ M ( n t ) ] n
By Taylor expansion of M M M around 0: M ( h ) = 1 + h M ′ ( 0 ) + h 2 2 M ′ ′ ( 0 ) + o ( h 2 ) = 1 + 0 + h 2 2 + o ( h 2 ) M(h) = 1 + h\, M'(0) + \frac{h^2}{2} M''(0) + o(h^2) = 1 + 0 + \frac{h^2}{2} + o(h^2) M ( h ) = 1 + h M ′ ( 0 ) + 2 h 2 M ′′ ( 0 ) + o ( h 2 ) = 1 + 0 + 2 h 2 + o ( h 2 ) (since E [ Y 1 ] = 0 E[Y_1] = 0 E [ Y 1 ] = 0 and E [ Y 1 2 ] = 1 E[Y_1^2] = 1 E [ Y 1 2 ] = 1 ).
Therefore:
M Z n ( t ) = [ 1 + t 2 2 n + o ( 1 n ) ] n → e t 2 / 2 M_{Z_n}(t) = \left[1 + \frac{t^2}{2n} + o\left(\frac{1}{n}\right)\right]^n \to e^{t^2/2} M Z n ( t ) = [ 1 + 2 n t 2 + o ( n 1 ) ] n → e t 2 /2
As n → ∞ n \to \infty n → ∞ . By the continuity theorem for MGFs, Z n → d N ( 0 , 1 ) Z_n \xrightarrow{d} N(0, 1) Z n d N ( 0 , 1 ) . ■ \blacksquare ■
Theorem 6.4 (Slutsky). If X n → d X X_n \xrightarrow{d} X X n d X and Y n → p c Y_n \xrightarrow{p} c Y n p c (a constant), then:
X n + Y n → d X + c X_n + Y_n \xrightarrow{d} X + c X n + Y n d X + c .Y n X n → d c X Y_n X_n \xrightarrow{d} cX Y n X n d c X .X n / Y n → d X / c X_n / Y_n \xrightarrow{d} X / c X n / Y n d X / c (provided c ≠ 0 c \neq 0 c = 0 ).Intuition. Slutsky’s theorem allows us to replace a convergent-in-probability sequence by its limit inside Expressions that converge in distribution. This is essential for deriving the asymptotic distribution of t t t -statistics, for instance.
Corollary 6.1 (Asymptotic distribution of the t-statistic). If X 1 , … , X n X_1, \ldots, X_n X 1 , … , X n are i.i.d. With mean μ \mu μ Variance σ 2 \sigma^2 σ 2 And fourth moment, then
X ˉ n − μ S n / n → d N ( 0 , 1 ) \frac{\bar{X}_n - \mu}{S_n / \sqrt{n}} \xrightarrow{d} N(0, 1) S n / n X ˉ n − μ d N ( 0 , 1 )
Where S n 2 = 1 n − 1 ∑ i = 1 n ( X i − X ˉ n ) 2 S_n^2 = \frac{1}{n-1}\sum_{i=1}^n (X_i - \bar{X}_n)^2 S n 2 = n − 1 1 ∑ i = 1 n ( X i − X ˉ n ) 2 .
Proof. By the CLT, n ( X ˉ n − μ ) / σ → d N ( 0 , 1 ) \sqrt{n}(\bar{X}_n - \mu)/\sigma \xrightarrow{d} N(0, 1) n ( X ˉ n − μ ) / σ d N ( 0 , 1 ) . By the WLLN, S n 2 → p σ 2 S_n^2 \xrightarrow{p} \sigma^2 S n 2 p σ 2 So S n → p σ S_n \xrightarrow{p} \sigma S n p σ . By the continuous mapping theorem, σ / S n → p 1 \sigma / S_n \xrightarrow{p} 1 σ / S n p 1 . Applying Slutsky’s Theorem:
n ( X ˉ n − μ ) σ ⋅ σ S n → d N ( 0 , 1 ) ⋅ 1 = N ( 0 , 1 ) ■ \frac{\sqrt{n}(\bar{X}_n - \mu)}{\sigma} \cdot \frac{\sigma}{S_n} \xrightarrow{d} N(0, 1) \cdot 1 = N(0, 1) \quad \blacksquare σ n ( X ˉ n − μ ) ⋅ S n σ d N ( 0 , 1 ) ⋅ 1 = N ( 0 , 1 ) ■
Theorem 6.5 (Delta Method). If n ( T n − θ ) → d N ( 0 , σ 2 ) \sqrt{n}(T_n - \theta) \xrightarrow{d} N(0, \sigma^2) n ( T n − θ ) d N ( 0 , σ 2 ) and g g g is differentiable At θ \theta θ with g ′ ( θ ) ≠ 0 g'(\theta) \neq 0 g ′ ( θ ) = 0 Then
n ( g ( T n ) − g ( θ ) ) → d N ( 0 , σ 2 [ g ′ ( θ ) ] 2 ) \sqrt{n}(g(T_n) - g(\theta)) \xrightarrow{d} N(0, \sigma^2 [g'(\theta)]^2) n ( g ( T n ) − g ( θ )) d N ( 0 , σ 2 [ g ′ ( θ ) ] 2 )
Proof (sketch). By a first-order Taylor expansion: g ( T n ) ≈ g ( θ ) + g ′ ( θ ) ( T n − θ ) g(T_n) \approx g(\theta) + g'(\theta)(T_n - \theta) g ( T n ) ≈ g ( θ ) + g ′ ( θ ) ( T n − θ ) . Multiplying by n \sqrt{n} n : n ( g ( T n ) − g ( θ ) ) ≈ g ′ ( θ ) ⋅ n ( T n − θ ) \sqrt{n}(g(T_n) - g(\theta)) \approx g'(\theta) \cdot \sqrt{n}(T_n - \theta) n ( g ( T n ) − g ( θ )) ≈ g ′ ( θ ) ⋅ n ( T n − θ ) . The right side converges in distribution to g ′ ( θ ) ⋅ N ( 0 , σ 2 ) = N ( 0 , σ 2 [ g ′ ( θ ) ] 2 ) g'(\theta) \cdot N(0, \sigma^2) = N(0, \sigma^2[g'(\theta)]^2) g ′ ( θ ) ⋅ N ( 0 , σ 2 ) = N ( 0 , σ 2 [ g ′ ( θ ) ] 2 ) . Slutsky’s theorem makes this rigorous. ■ \blacksquare ■
Problem 6.4. Let X 1 , … , X n X_1, \ldots, X_n X 1 , … , X n be i.i.d. P o i s s o n ( λ ) \mathrm{Poisson}(\lambda) Poisson ( λ ) . Find the asymptotic distribution of n ( X ˉ n − e − X ˉ n ) \sqrt{n}(\bar{X}_n - e^{-\bar{X}_n}) n ( X ˉ n − e − X ˉ n ) using the delta method.
Solution By the CLT, n ( X ˉ n − λ ) → d N ( 0 , λ ) \sqrt{n}(\bar{X}_n - \lambda) \xrightarrow{d} N(0, \lambda) n ( X ˉ n − λ ) d N ( 0 , λ ) (since V a r ( X i ) = λ \mathrm{Var}(X_i) = \lambda Var ( X i ) = λ ).
Let g ( t ) = t − e − t g(t) = t - e^{-t} g ( t ) = t − e − t . Then g ′ ( t ) = 1 + e − t g'(t) = 1 + e^{-t} g ′ ( t ) = 1 + e − t So g ′ ( λ ) = 1 + e − λ g'(\lambda) = 1 + e^{-\lambda} g ′ ( λ ) = 1 + e − λ .
By the delta method:
n ( g ( X ˉ n ) − g ( λ ) ) → d N ( 0 , λ ( 1 + e − λ ) 2 ) \sqrt{n}(g(\bar{X}_n) - g(\lambda)) \xrightarrow{d} N\left(0, \lambda(1 + e^{-\lambda})^2\right) n ( g ( X ˉ n ) − g ( λ )) d N ( 0 , λ ( 1 + e − λ ) 2 )
Problem 6.1. A factory produces light bulbs with mean lifetime 1000 hours and standard deviation 200 Hours. What is the probability that the mean lifetime of 100 bulbs exceeds 1040 hours?
Solution By the CLT, X ˉ 100 ≈ N ( 1000 , 200 2 / 100 ) = N ( 1000 , 400 ) \bar{X}_{100} \approx N(1000, 200^2/100) = N(1000, 400) X ˉ 100 ≈ N ( 1000 , 20 0 2 /100 ) = N ( 1000 , 400 ) .
P ( X ˉ > 1040 ) = P ( Z > 1040 − 1000 20 ) = P ( Z > 2 ) ≈ 0.0228 P(\bar{X} \gt 1040) = P\left(Z \gt \frac{1040 - 1000}{20}\right) = P(Z \gt 2) \approx 0.0228 P ( X ˉ > 1040 ) = P ( Z > 20 1040 − 1000 ) = P ( Z > 2 ) ≈ 0.0228
■ \blacksquare ■
Problem 6.2. A coin is flipped 10,000 times. Approximate the probability that the number of heads is between 4,900 and 5,100.
Solution Let X ∼ B i n ( 10000 , 0.5 ) X \sim \mathrm{Bin}(10000, 0.5) X ∼ Bin ( 10000 , 0.5 ) So E [ X ] = 5000 E[X] = 5000 E [ X ] = 5000 and V a r ( X ) = 2500 \mathrm{Var}(X) = 2500 Var ( X ) = 2500 . By the normal approximation With continuity correction:
P ( 4900 ≤ X ≤ 5100 ) ≈ P ( 4899.5 − 5000 50 ≤ Z ≤ 5100.5 − 5000 50 ) P(4900 \leq X \leq 5100) \approx P\left(\frac{4899.5 - 5000}{50} \leq Z \leq \frac{5100.5 - 5000}{50}\right) P ( 4900 ≤ X ≤ 5100 ) ≈ P ( 50 4899.5 − 5000 ≤ Z ≤ 50 5100.5 − 5000 )
= P ( − 2.01 ≤ Z ≤ 2.01 ) ≈ Φ ( 2.01 ) − Φ ( − 2.01 ) ≈ 2 × 0.9778 − 1 = 0.9556 = P(-2.01 \leq Z \leq 2.01) \approx \Phi(2.01) - \Phi(-2.01) \approx 2 \times 0.9778 - 1 = 0.9556 = P ( − 2.01 ≤ Z ≤ 2.01 ) ≈ Φ ( 2.01 ) − Φ ( − 2.01 ) ≈ 2 × 0.9778 − 1 = 0.9556
Problem 6.3. Let X 1 , … , X n X_1, \ldots, X_n X 1 , … , X n be i.i.d. With mean μ \mu μ and variance σ 2 \sigma^2 σ 2 . Let S 2 = 1 n − 1 ∑ ( X i − X ˉ ) 2 S^2 = \frac{1}{n-1}\sum(X_i - \bar{X})^2 S 2 = n − 1 1 ∑ ( X i − X ˉ ) 2 . Show that S 2 → p σ 2 S^2 \xrightarrow{p} \sigma^2 S 2 p σ 2 .
Solution First, note E [ S 2 ] = σ 2 E[S^2] = \sigma^2 E [ S 2 ] = σ 2 (it is unbiased). We need to show V a r ( S 2 ) → 0 \mathrm{Var}(S^2) \to 0 Var ( S 2 ) → 0 as n → ∞ n \to \infty n → ∞ . Since S 2 S^2 S 2 is a sample average of i.i.d. Random variables (after centering), by the weak law of large numbers, S 2 → p σ 2 S^2 \xrightarrow{p} \sigma^2 S 2 p σ 2 . ■ \blacksquare ■
Given i.i.d. Observations x 1 , … , x n x_1, \ldots, x_n x 1 , … , x n from a distribution with parameter θ \theta θ The likelihood function is
L ( θ ) = ∏ i = 1 n f ( x i ∣ θ ) L(\theta) = \prod_{i=1}^n f(x_i \mid \theta) L ( θ ) = ∏ i = 1 n f ( x i ∣ θ )
And the log-likelihood is
ℓ ( θ ) = log L ( θ ) = ∑ i = 1 n log f ( x i ∣ θ ) \ell(\theta) = \log L(\theta) = \sum_{i=1}^n \log f(x_i \mid \theta) ℓ ( θ ) = log L ( θ ) = ∑ i = 1 n log f ( x i ∣ θ )
The maximum likelihood estimator (MLE) θ ^ M L E \hat{\theta}_{\mathrm{MLE}} θ ^ MLE maximises L ( θ ) L(\theta) L ( θ ) (equivalently, ℓ ( θ ) \ell(\theta) ℓ ( θ ) ):
θ ^ M L E = arg max θ L ( θ ) \hat{\theta}_{\mathrm{MLE} = \arg\max_\theta L(\theta)} θ ^ MLE = a r g m a x θ L ( θ )
found by solving ℓ ′ ( θ ) = 0 \ell'(\theta) = 0 ℓ ′ ( θ ) = 0 and verifying ℓ ′ ′ ( θ ^ ) < 0 \ell''(\hat{\theta}) \lt 0 ℓ ′′ ( θ ^ ) < 0 .
Theorem 7.1 (Consistency — Sketch). Under regularity conditions, θ ^ M L E → p θ 0 \hat{\theta}_{\mathrm{MLE} \xrightarrow{p} \theta_0} θ ^ MLE p θ 0 (the true parameter).
Proof sketch. By the law of large numbers, 1 n ℓ ( θ ) → p E θ 0 [ log f ( X ∣ θ ) ] \frac{1}{n}\ell(\theta) \xrightarrow{p} E_{\theta_0}[\log f(X \mid \theta)] n 1 ℓ ( θ ) p E θ 0 [ log f ( X ∣ θ )] For each θ \theta θ . The Kullback-Leibler divergence D ( θ 0 ∥ θ ) = − E θ 0 [ log f ( X ∣ θ ) ] + E θ 0 [ log f ( X ∣ θ 0 ) ] D(\theta_0 \| \theta) = -E_{\theta_0}[\log f(X \mid \theta)] + E_{\theta_0}[\log f(X \mid \theta_0)] D ( θ 0 ∥ θ ) = − E θ 0 [ log f ( X ∣ θ )] + E θ 0 [ log f ( X ∣ θ 0 )] Is minimised (at zero) when θ = θ 0 \theta = \theta_0 θ = θ 0 by the information inequality. Therefore the maximiser of ℓ ( θ ) \ell(\theta) ℓ ( θ ) converges in probability to θ 0 \theta_0 θ 0 .
Theorem 7.2 (Asymptotic Normality). Under regularity conditions:
n ( θ ^ M L E − θ 0 ) → d N ( 0 , 1 I ( θ 0 ) ) \sqrt{n}(\hat{\theta}_{\mathrm{MLE} - \theta_0) \xrightarrow{d} N\left(0, \frac{1}{I(\theta_0)}\right)} n ( θ ^ MLE − θ 0 ) d N ( 0 , I ( θ 0 ) 1 )
Where I ( θ 0 ) I(\theta_0) I ( θ 0 ) is the Fisher information .
Definition. The Fisher information for a single observation is
I ( θ ) = E [ ( ∂ ∂ θ log f ( X ∣ θ ) ) 2 ] = − E [ ∂ 2 ∂ θ 2 log f ( X ∣ θ ) ] I(\theta) = E\left[\left(\frac{\partial}{\partial \theta} \log f(X \mid \theta)\right)^2\right] = -E\left[\frac{\partial^2}{\partial \theta^2} \log f(X \mid \theta)\right] I ( θ ) = E [ ( ∂ θ ∂ log f ( X ∣ θ ) ) 2 ] = − E [ ∂ θ 2 ∂ 2 log f ( X ∣ θ ) ]
Provided the interchange of differentiation and integration is valid.
Theorem 7.3 (Cramer-Rao Lower Bound). For any unbiased estimator T T T of θ \theta θ :
V a r ( T ) ≥ 1 n I ( θ ) \mathrm{Var}(T) \geq \frac{1}{n\, I(\theta)} Var ( T ) ≥ n I ( θ ) 1
Intuition. The Cramer-Rao bound gives a theoretical minimum for the variance of any unbiased estimator. An Estimator that achieves this bound is called efficient .
Example 7.1. For X ∼ N ( μ , σ 2 ) X \sim N(\mu, \sigma^2) X ∼ N ( μ , σ 2 ) with σ 2 \sigma^2 σ 2 known, the Fisher information about μ \mu μ is I ( μ ) = 1 / σ 2 I(\mu) = 1/\sigma^2 I ( μ ) = 1/ σ 2 . The MLE μ ^ = X ˉ \hat{\mu} = \bar{X} μ ^ = X ˉ has V a r ( X ˉ ) = σ 2 / n = 1 / ( n ⋅ I ( μ ) ) \mathrm{Var}(\bar{X}) = \sigma^2/n = 1/(n \cdot I(\mu)) Var ( X ˉ ) = σ 2 / n = 1/ ( n ⋅ I ( μ )) So the sample mean achieves the Cramer-Rao bound and is efficient.
Definition. A 100 ( 1 − α ) % 100(1 - \alpha)\% 100 ( 1 − α ) % confidence interval for θ \theta θ is a random interval [ L , U ] [L, U] [ L , U ] such that
P θ ( L ≤ θ ≤ U ) = 1 − α P_\theta(L \leq \theta \leq U) = 1 - \alpha P θ ( L ≤ θ ≤ U ) = 1 − α
Theorem 7.4. Under the asymptotic normality of the MLE, an approximate 100 ( 1 − α ) % 100(1-\alpha)\% 100 ( 1 − α ) % confidence interval For θ \theta θ is
θ ^ ± z α / 2 ⋅ 1 n I ( θ ^ ) \hat{\theta} \pm z_{\alpha/2} \cdot \frac{1}{\sqrt{n\, I(\hat{\theta})}} θ ^ ± z α /2 ⋅ n I ( θ ^ ) 1
Where z α / 2 = Φ − 1 ( 1 − α / 2 ) z_{\alpha/2} = \Phi^{-1}(1 - \alpha/2) z α /2 = Φ − 1 ( 1 − α /2 ) .
Example 7.2. For X 1 , … , X n ∼ N ( μ , σ 2 ) X_1, \ldots, X_n \sim N(\mu, \sigma^2) X 1 , … , X n ∼ N ( μ , σ 2 ) with σ \sigma σ known, the exact 100 ( 1 − α ) % 100(1-\alpha)\% 100 ( 1 − α ) % Confidence interval for μ \mu μ is:
X ˉ ± z α / 2 ⋅ σ n \bar{X} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} X ˉ ± z α /2 ⋅ n σ
When σ \sigma σ is unknown, replace σ \sigma σ with S S S and z α / 2 z_{\alpha/2} z α /2 with t n − 1 , α / 2 t_{n-1, \alpha/2} t n − 1 , α /2 :
X ˉ ± t n − 1 , α / 2 ⋅ S n \bar{X} \pm t_{n-1, \alpha/2} \cdot \frac{S}{\sqrt{n}} X ˉ ± t n − 1 , α /2 ⋅ n S
Theorem 7.5 (Wald Confidence Interval). For a scalar parameter θ \theta θ with MLE θ ^ \hat{\theta} θ ^ satisfying Asymptotic normality, the Wald confidence interval is
θ ^ ± z α / 2 S E ( θ ^ ) ^ \hat{\theta} \pm z_{\alpha/2}\, \widehat{\mathrm{SE}(\hat{\theta})} θ ^ ± z α /2 SE ( θ ^ )
Where S E ( θ ^ ) = 1 / n I ( θ ^ ) ^ \widehat{\mathrm{SE}(\hat{\theta}) = 1/\sqrt{n\, I(\hat{\theta})}} SE ( θ ^ ) = 1/ n I ( θ ^ ) is the estimated standard error.
Problem 7.4. In a survey of 400 people, 220 support a policy. Construct a 95% confidence interval for the True proportion p p p .
Solution p ^ = 220 / 400 = 0.55 \hat{p} = 220/400 = 0.55 p ^ = 220/400 = 0.55 . For a Bernoulli: I ( p ) = 1 / [ p ( 1 − p ) ] I(p) = 1/[p(1-p)] I ( p ) = 1/ [ p ( 1 − p )] So S E = p ^ ( 1 − p ^ ) / n = 0.55 × 0.45 / 400 = 0.000619 ≈ 0.02488 ^ \widehat{\mathrm{SE} = \sqrt{\hat{p}(1 - \hat{p})/n} = \sqrt{0.55 \times 0.45 / 400} = \sqrt{0.000619} \approx 0.02488} SE = p ^ ( 1 − p ^ ) / n = 0.55 × 0.45/400 = 0.000619 ≈ 0.02488 .
95 % C I : 0.55 ± 1.96 × 0.02488 = 0.55 ± 0.0488 = ( 0.501 , 0.599 ) 95\%\, \mathrm{CI}: 0.55 \pm 1.96 \times 0.02488 = 0.55 \pm 0.0488 = (0.501, 0.599) 95% CI : 0.55 ± 1.96 × 0.02488 = 0.55 ± 0.0488 = ( 0.501 , 0.599 )
Problem 7.1. Find the MLE for λ \lambda λ given i.i.d. Observations x 1 , … , x n x_1, \ldots, x_n x 1 , … , x n from E x p ( λ ) \mathrm{Exp}(\lambda) Exp ( λ ) .
Solution L ( λ ) = ∏ i = 1 n λ e − λ x i = λ n e − λ ∑ x i L(\lambda) = \prod_{i=1}^n \lambda e^{-\lambda x_i} = \lambda^n e^{-\lambda \sum x_i} L ( λ ) = ∏ i = 1 n λ e − λ x i = λ n e − λ ∑ x i
ℓ ( λ ) = n log λ − λ ∑ i = 1 n x i \ell(\lambda) = n \log \lambda - \lambda \sum_{i=1}^n x_i ℓ ( λ ) = n log λ − λ ∑ i = 1 n x i
d ℓ d λ = n λ − ∑ i = 1 n x i = 0 ⟹ λ ^ = n ∑ x i = 1 x ˉ \frac{d\ell}{d\lambda} = \frac{n}{\lambda} - \sum_{i=1}^n x_i = 0 \implies \hat{\lambda} = \frac{n}{\sum x_i} = \frac{1}{\bar{x}} d λ d ℓ = λ n − ∑ i = 1 n x i = 0 ⟹ λ ^ = ∑ x i n = x ˉ 1
Verify: d 2 ℓ d λ 2 = − n λ 2 < 0 \frac{d^2\ell}{d\lambda^2} = -\frac{n}{\lambda^2} \lt 0 d λ 2 d 2 ℓ = − λ 2 n < 0 Confirming this is a maximum. ■ \blacksquare ■
Problem 7.2. Find the MLE for p p p given i.i.d. Observations from B i n ( n , p ) \mathrm{Bin}(n, p) Bin ( n , p ) (observed counts x 1 , … , x m x_1, \ldots, x_m x 1 , … , x m ).
Solution L ( p ) = ∏ j = 1 m ( n x j ) p x j ( 1 − p ) n − x j L(p) = \prod_{j=1}^m \binom{n}{x_j} p^{x_j} (1-p)^{n - x_j} L ( p ) = ∏ j = 1 m ( x j n ) p x j ( 1 − p ) n − x j
ℓ ( p ) = ∑ j = 1 m [ log ( n x j ) + x j log p + ( n − x j ) log ( 1 − p ) ] \ell(p) = \sum_{j=1}^m \left[\log \binom{n}{x_j} + x_j \log p + (n - x_j) \log(1 - p)\right] ℓ ( p ) = ∑ j = 1 m [ log ( x j n ) + x j log p + ( n − x j ) log ( 1 − p ) ]
d ℓ d p = ∑ j = 1 m [ x j p − n − x j 1 − p ] = ∑ x j p − m n − ∑ x j 1 − p = 0 \frac{d\ell}{dp} = \sum_{j=1}^m \left[\frac{x_j}{p} - \frac{n - x_j}{1 - p}\right] = \frac{\sum x_j}{p} - \frac{mn - \sum x_j}{1 - p} = 0 d p d ℓ = ∑ j = 1 m [ p x j − 1 − p n − x j ] = p ∑ x j − 1 − p mn − ∑ x j = 0
Solving: ( 1 − p ) ∑ x j = p ( m n − ∑ x j ) (1 - p)\sum x_j = p(mn - \sum x_j) ( 1 − p ) ∑ x j = p ( mn − ∑ x j ) So ∑ x j = p m n \sum x_j = pmn ∑ x j = p mn Hence p ^ = ∑ x j m n = x ˉ n \hat{p} = \frac{\sum x_j}{mn} = \frac{\bar{x}}{n} p ^ = mn ∑ x j = n x ˉ .
Verify: d 2 ℓ d p 2 = − ∑ x j p 2 − m n − ∑ x j ( 1 − p ) 2 < 0 \frac{d^2\ell}{dp^2} = -\frac{\sum x_j}{p^2} - \frac{mn - \sum x_j}{(1-p)^2} \lt 0 d p 2 d 2 ℓ = − p 2 ∑ x j − ( 1 − p ) 2 mn − ∑ x j < 0 . ■ \blacksquare ■
Problem 7.3. Compute the Fisher information for λ \lambda λ in the exponential model and construct a 95% confidence Interval.
Solution For X ∼ E x p ( λ ) X \sim \mathrm{Exp}(\lambda) X ∼ Exp ( λ ) : f ( x ∣ λ ) = λ e − λ x f(x \mid \lambda) = \lambda e^{-\lambda x} f ( x ∣ λ ) = λ e − λ x So log f = log λ − λ x \log f = \log \lambda - \lambda x log f = log λ − λ x .
∂ ∂ λ log f = 1 λ − x \frac{\partial}{\partial \lambda} \log f = \frac{1}{\lambda} - x ∂ λ ∂ log f = λ 1 − x
I ( λ ) = − E [ ∂ 2 ∂ λ 2 log f ] = − E [ − 1 λ 2 ] = 1 λ 2 I(\lambda) = -E\left[\frac{\partial^2}{\partial \lambda^2} \log f\right] = -E\left[-\frac{1}{\lambda^2}\right] = \frac{1}{\lambda^2} I ( λ ) = − E [ ∂ λ 2 ∂ 2 log f ] = − E [ − λ 2 1 ] = λ 2 1
The MLE λ ^ = 1 / X ˉ \hat{\lambda} = 1/\bar{X} λ ^ = 1/ X ˉ is approximately N ( λ , 1 / ( n ⋅ I ( λ ) ) ) = N ( λ , λ 2 / n ) N(\lambda, 1/(n \cdot I(\lambda))) = N(\lambda, \lambda^2/n) N ( λ , 1/ ( n ⋅ I ( λ ))) = N ( λ , λ 2 / n ) .
A 95% confidence interval is:
λ ^ ± 1.96 ⋅ λ ^ n \hat{\lambda} \pm 1.96 \cdot \frac{\hat{\lambda}}{\sqrt{n}} λ ^ ± 1.96 ⋅ n λ ^
:::caution Common Pitfall The MLE is not always unbiased. For example, the MLE σ ^ 2 = 1 n ∑ ( X i − X ˉ ) 2 \hat{\sigma}^2 = \frac{1}{n}\sum (X_i - \bar{X})^2 σ ^ 2 = n 1 ∑ ( X i − X ˉ ) 2 For the normal variance is biased; the unbiased estimator uses n − 1 n - 1 n − 1 in the denominator. :::
A hypothesis test evaluates two competing statements:
Null hypothesis H 0 H_0 H 0 : the status quo (e.g., μ = μ 0 \mu = \mu_0 μ = μ 0 ).Alternative hypothesis H 1 H_1 H 1 : what we want to show (e.g., μ > μ 0 \mu \gt \mu_0 μ > μ 0 ).A test statistic T T T is a function of the data. We reject H 0 H_0 H 0 if T T T falls in the rejection Region (critical region).
Type I error : rejecting H 0 H_0 H 0 when it is true (false positive). Probability = α \alpha α (significance Level).
Type II error : failing to reject H 0 H_0 H 0 when it is false (false negative). Probability = β \beta β .
The power of a test is 1 − β = P ( r e j e c t H 0 ∣ H 1 i s t r u e ) 1 - \beta = P(\mathrm{reject} H_0 \mid H_1 \mathrm{ is} true) 1 − β = P ( reject H 0 ∣ H 1 is t r u e ) .
Theorem 8.1 (Neyman-Pearson Lemma). Consider testing H 0 : θ = θ 0 H_0: \theta = \theta_0 H 0 : θ = θ 0 versus H 1 : θ = θ 1 H_1: \theta = \theta_1 H 1 : θ = θ 1 Based on a single observation X X X with PDF f ( x ∣ θ ) f(x \mid \theta) f ( x ∣ θ ) . The most powerful test of level α \alpha α rejects H 0 H_0 H 0 when the likelihood ratio exceeds a threshold:
Λ ( x ) = f ( x ∣ θ 1 ) f ( x ∣ θ 0 ) > k \Lambda(x) = \frac{f(x \mid \theta_1)}{f(x \mid \theta_0)} \gt k Λ ( x ) = f ( x ∣ θ 0 ) f ( x ∣ θ 1 ) > k
For some k k k chosen so that P ( Λ ( X ) > k ∣ H 0 ) = α P(\Lambda(X) \gt k \mid H_0) = \alpha P ( Λ ( X ) > k ∣ H 0 ) = α .
Proof (sketch). Consider any test ϕ \phi ϕ with level α \alpha α (i.e., E θ 0 [ ϕ ( X ) ] ≤ α E_{\theta_0}[\phi(X)] \leq \alpha E θ 0 [ ϕ ( X )] ≤ α ). The power Under H 1 H_1 H 1 is E θ 1 [ ϕ ( X ) ] = ∫ ϕ ( x ) f ( x ∣ θ 1 ) d x E_{\theta_1}[\phi(X)] = \int \phi(x) f(x \mid \theta_1)\, dx E θ 1 [ ϕ ( X )] = ∫ ϕ ( x ) f ( x ∣ θ 1 ) d x . Write this as ∫ ϕ ( x ) Λ ( x ) f ( x ∣ θ 0 ) d x \int \phi(x) \Lambda(x) f(x \mid \theta_0)\, dx ∫ ϕ ( x ) Λ ( x ) f ( x ∣ θ 0 ) d x . The likelihood ratio test ϕ ∗ \phi^* ϕ ∗ rejects when Λ > k \Lambda \gt k Λ > k and Randomises on the boundary, so it assigns the largest ϕ ∗ ( x ) \phi^*(x) ϕ ∗ ( x ) values to the largest Λ ( x ) \Lambda(x) Λ ( x ) values. Any other Level-α \alpha α test assigns less rejection probability to large-Λ \Lambda Λ regions and cannot exceed the power of ϕ ∗ \phi^* ϕ ∗ . ■ \blacksquare ■
For composite hypotheses H 0 : θ ∈ Θ 0 H_0: \theta \in \Theta_0 H 0 : θ ∈ Θ 0 vs H 1 : θ ∈ Θ 1 H_1: \theta \in \Theta_1 H 1 : θ ∈ Θ 1 The generalised likelihood Ratio statistic is
Λ = sup θ ∈ Θ 0 L ( θ ) sup θ ∈ Θ L ( θ ) \Lambda = \frac{\sup_{\theta \in \Theta_0} L(\theta)}{\sup_{\theta \in \Theta} L(\theta)} Λ = s u p θ ∈ Θ L ( θ ) s u p θ ∈ Θ 0 L ( θ )
We reject H 0 H_0 H 0 when Λ \Lambda Λ is small (equivalently, when − 2 log Λ -2\log \Lambda − 2 log Λ is large).
Theorem 8.2 (Wilks’ Theorem). Under H 0 H_0 H 0 and regularity conditions:
− 2 log Λ → d χ d 2 -2 \log \Lambda \xrightarrow{d} \chi^2_d − 2 log Λ d χ d 2
Where d = dim ( Θ ) − dim ( Θ 0 ) d = \dim(\Theta) - \dim(\Theta_0) d = dim ( Θ ) − dim ( Θ 0 ) is the difference in the number of free parameters.
The p-value is the probability of observing a test statistic at least as extreme as the one Computed, assuming H 0 H_0 H 0 is true. We reject H 0 H_0 H 0 if the p-value is less than α \alpha α .
If X 1 , … , X n ∼ N ( μ , σ 2 ) X_1, \ldots, X_n \sim N(\mu, \sigma^2) X 1 , … , X n ∼ N ( μ , σ 2 ) with known σ \sigma σ To test H 0 : μ = μ 0 H_0: \mu = \mu_0 H 0 : μ = μ 0 :
Z = X ˉ − μ 0 σ / n Z = \frac{\bar{X} - \mu_0}{\sigma / \sqrt{n}} Z = σ / n X ˉ − μ 0
Under H 0 H_0 H 0 , Z ∼ N ( 0 , 1 ) Z \sim N(0, 1) Z ∼ N ( 0 , 1 ) .
For H 1 : μ > μ 0 H_1: \mu \gt \mu_0 H 1 : μ > μ 0 : reject if Z > z α Z \gt z_\alpha Z > z α . For H 1 : μ < μ 0 H_1: \mu \lt \mu_0 H 1 : μ < μ 0 : reject if Z < − z α Z \lt -z_\alpha Z < − z α . For H 1 : μ ≠ μ 0 H_1: \mu \neq \mu_0 H 1 : μ = μ 0 : reject if ∣ Z ∣ > z α / 2 |Z| \gt z_{\alpha/2} ∣ Z ∣ > z α /2 . If σ \sigma σ is unknown, replace σ \sigma σ with the sample standard deviation S S S :
T = X ˉ − μ 0 S / n T = \frac{\bar{X} - \mu_0}{S / \sqrt{n}} T = S / n X ˉ − μ 0
Under H 0 H_0 H 0 , T ∼ t n − 1 T \sim t_{n-1} T ∼ t n − 1 (Student’s t-distribution with n − 1 n - 1 n − 1 degrees of freedom).
To test H 0 : σ 2 = σ 0 2 H_0: \sigma^2 = \sigma_0^2 H 0 : σ 2 = σ 0 2 for X 1 , … , X n ∼ N ( μ , σ 2 ) X_1, \ldots, X_n \sim N(\mu, \sigma^2) X 1 , … , X n ∼ N ( μ , σ 2 ) :
χ 2 = ( n − 1 ) S 2 σ 0 2 \chi^2 = \frac{(n-1)S^2}{\sigma_0^2} χ 2 = σ 0 2 ( n − 1 ) S 2
Under H 0 H_0 H 0 , χ 2 ∼ χ n − 1 2 \chi^2 \sim \chi^2_{n-1} χ 2 ∼ χ n − 1 2 .
To test whether observed data follow a specified discrete distribution, partition the sample space into k k k cells With expected counts e i e_i e i and observed counts o i o_i o i . The test statistic is
χ 2 = ∑ i = 1 k ( o i − e i ) 2 e i \chi^2 = \sum_{i=1}^k \frac{(o_i - e_i)^2}{e_i} χ 2 = ∑ i = 1 k e i ( o i − e i ) 2
Under H 0 H_0 H 0 (and provided expected counts are sufficiently large), χ 2 ∼ χ k − 1 − p 2 \chi^2 \sim \chi^2_{k - 1 - p} χ 2 ∼ χ k − 1 − p 2 where p p p is the Number of parameters estimated from the data.
Problem 8.4. A die is rolled 60 times with the following frequencies: \\{1: 8, 2: 12, 3: 9, 4: 11, 5: 13, 6: 7\\}. Test whether the die is fair at α = 0.05 \alpha = 0.05 α = 0.05 .
Solution H 0 H_0 H 0 : die is fair (each face has probability 1 / 6 1/6 1/6 ). Expected count per face: e i = 60 / 6 = 10 e_i = 60/6 = 10 e i = 60/6 = 10 .
χ 2 = ( 8 − 10 ) 2 10 + ( 12 − 10 ) 2 10 + ( 9 − 10 ) 2 10 + ( 11 − 10 ) 2 10 + ( 13 − 10 ) 2 10 + ( 7 − 10 ) 2 10 \chi^2 = \frac{(8 - 10)^2}{10} + \frac{(12 - 10)^2}{10} + \frac{(9 - 10)^2}{10} + \frac{(11 - 10)^2}{10} + \frac{(13 - 10)^2}{10} + \frac{(7 - 10)^2}{10} χ 2 = 10 ( 8 − 10 ) 2 + 10 ( 12 − 10 ) 2 + 10 ( 9 − 10 ) 2 + 10 ( 11 − 10 ) 2 + 10 ( 13 − 10 ) 2 + 10 ( 7 − 10 ) 2
= 4 + 4 + 1 + 1 + 9 + 9 10 = 28 10 = 2.8 = \frac{4 + 4 + 1 + 1 + 9 + 9}{10} = \frac{28}{10} = 2.8 = 10 4 + 4 + 1 + 1 + 9 + 9 = 10 28 = 2.8
Under H 0 H_0 H 0 , χ 2 ∼ χ 5 2 \chi^2 \sim \chi^2_5 χ 2 ∼ χ 5 2 . The critical value at α = 0.05 \alpha = 0.05 α = 0.05 is χ 5 , 0.05 2 = 11.07 \chi^2_{5, 0.05} = 11.07 χ 5 , 0.05 2 = 11.07 .
Since 2.8 < 11.07 2.8 \lt 11.07 2.8 < 11.07 We fail to reject H 0 H_0 H 0 . There is insufficient evidence that the die is unfair. ■ \blacksquare ■
Two-sample Z-test. To test H 0 : μ 1 − μ 2 = 0 H_0: \mu_1 - \mu_2 = 0 H 0 : μ 1 − μ 2 = 0 for independent samples with known variances σ 1 2 , σ 2 2 \sigma_1^2, \sigma_2^2 σ 1 2 , σ 2 2 :
Z = X ˉ 1 − X ˉ 2 σ 1 2 / n 1 + σ 2 2 / n 2 Z = \frac{\bar{X}_1 - \bar{X}_2}{\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}} Z = σ 1 2 / n 1 + σ 2 2 / n 2 X ˉ 1 − X ˉ 2
Under H 0 H_0 H 0 , Z ∼ N ( 0 , 1 ) Z \sim N(0, 1) Z ∼ N ( 0 , 1 ) .
Two-sample t-test (Welch’s). When variances are unknown and possibly unequal:
T = X ˉ 1 − X ˉ 2 S 1 2 / n 1 + S 2 2 / n 2 T = \frac{\bar{X}_1 - \bar{X}_2}{\sqrt{S_1^2/n_1 + S_2^2/n_2}} T = S 1 2 / n 1 + S 2 2 / n 2 X ˉ 1 − X ˉ 2
The degrees of freedom are approximated by Welch’s formula:
ν = ( S 1 2 / n 1 + S 2 2 / n 2 ) 2 ( S 1 2 / n 1 ) 2 n 1 − 1 + ( S 2 2 / n 2 ) 2 n 2 − 1 \nu = \frac{(S_1^2/n_1 + S_2^2/n_2)^2}{\frac{(S_1^2/n_1)^2}{n_1 - 1} + \frac{(S_2^2/n_2)^2}{n_2 - 1}} ν = n 1 − 1 ( S 1 2 / n 1 ) 2 + n 2 − 1 ( S 2 2 / n 2 ) 2 ( S 1 2 / n 1 + S 2 2 / n 2 ) 2
Problem 8.5. A study compares two teaching methods. Method A (20 students): mean score 78, standard deviation 8. Method B (25 students): mean score 72, standard deviation 10. Test H 0 : μ A = μ B H_0: \mu_A = \mu_B H 0 : μ A = μ B vs H 1 : μ A ≠ μ B H_1: \mu_A \neq \mu_B H 1 : μ A = μ B At α = 0.05 \alpha = 0.05 α = 0.05 .
Solution Using Welch’s t-test:
T = 78 − 72 64 / 20 + 100 / 25 = 6 3.2 + 4 = 6 7.2 = 6 2.683 ≈ 2.236 T = \frac{78 - 72}{\sqrt{64/20 + 100/25}} = \frac{6}{\sqrt{3.2 + 4}} = \frac{6}{\sqrt{7.2}} = \frac{6}{2.683} \approx 2.236 T = 64/20 + 100/25 78 − 72 = 3.2 + 4 6 = 7.2 6 = 2.683 6 ≈ 2.236
ν = ( 3.2 + 4 ) 2 3.2 2 / 19 + 4 2 / 24 = 51.84 0.539 + 0.667 = 51.84 1.206 ≈ 42.98 \nu = \frac{(3.2 + 4)^2}{3.2^2/19 + 4^2/24} = \frac{51.84}{0.539 + 0.667} = \frac{51.84}{1.206} \approx 42.98 ν = 3. 2 2 /19 + 4 2 /24 ( 3.2 + 4 ) 2 = 0.539 + 0.667 51.84 = 1.206 51.84 ≈ 42.98
Use ν ≈ 43 \nu \approx 43 ν ≈ 43 degrees of freedom. The critical values for a two-sided test at α = 0.05 \alpha = 0.05 α = 0.05 are Approximately ± 2.017 \pm 2.017 ± 2.017 .
Since ∣ T ∣ = 2.236 > 2.017 |T| = 2.236 \gt 2.017 ∣ T ∣ = 2.236 > 2.017 We reject H 0 H_0 H 0 at the 5% significance level. There is evidence that the two Teaching methods produce different mean scores. ■ \blacksquare ■
Problem 8.1. A process produces bolts with mean diameter 10mm. A sample of 25 bolts has mean 10.12mm And standard deviation 0.3mm. Test H 0 : μ = 10 H_0: \mu = 10 H 0 : μ = 10 vs H 1 : μ ≠ 10 H_1: \mu \neq 10 H 1 : μ = 10 at α = 0.05 \alpha = 0.05 α = 0.05 .
Solution Use the t-test: T = 10.12 − 10 0.3 / 25 = 0.12 0.06 = 2 T = \frac{10.12 - 10}{0.3/\sqrt{25}} = \frac{0.12}{0.06} = 2 T = 0.3/ 25 10.12 − 10 = 0.06 0.12 = 2 .
Under H 0 H_0 H 0 , T ∼ t 24 T \sim t_{24} T ∼ t 24 . The critical values are t 24 , 0.025 ≈ 2.064 t_{24, 0.025} \approx 2.064 t 24 , 0.025 ≈ 2.064 .
Since ∣ T ∣ = 2 < 2.064 |T| = 2 \lt 2.064 ∣ T ∣ = 2 < 2.064 We fail to reject H 0 H_0 H 0 at the 5% significance level. There is insufficient Evidence to conclude the mean diameter differs from 10mm. ■ \blacksquare ■
Problem 8.2. A pharmaceutical company claims a drug reduces blood pressure by 5mmHg on average. In a trial Of 50 patients, the observed mean reduction was 4.2mmHg with standard deviation 3.1mmHg. Test the claim at α = 0.05 \alpha = 0.05 α = 0.05 .
Solution H 0 : μ = 5 H_0: \mu = 5 H 0 : μ = 5 vs H 1 : μ ≠ 5 H_1: \mu \neq 5 H 1 : μ = 5 .
T = 4.2 − 5 3.1 / 50 = − 0.8 0.4384 ≈ − 1.825 T = \frac{4.2 - 5}{3.1 / \sqrt{50}} = \frac{-0.8}{0.4384} \approx -1.825 T = 3.1/ 50 4.2 − 5 = 0.4384 − 0.8 ≈ − 1.825
Under H 0 H_0 H 0 , T ∼ t 49 T \sim t_{49} T ∼ t 49 . The critical values for a two-sided test at α = 0.05 \alpha = 0.05 α = 0.05 are approximately ± 2.010 \pm 2.010 ± 2.010 .
Since ∣ T ∣ = 1.825 < 2.010 |T| = 1.825 \lt 2.010 ∣ T ∣ = 1.825 < 2.010 We fail to reject H 0 H_0 H 0 . There is insufficient evidence to refute the company’s Claim. ■ \blacksquare ■
Problem 8.3. Let X 1 , … , X n X_1, \ldots, X_n X 1 , … , X n be i.i.d. N ( μ , σ 2 ) N(\mu, \sigma^2) N ( μ , σ 2 ) with σ 2 \sigma^2 σ 2 known. Derive the likelihood ratio Test for H 0 : μ = μ 0 H_0: \mu = \mu_0 H 0 : μ = μ 0 vs H 1 : μ ≠ μ 0 H_1: \mu \neq \mu_0 H 1 : μ = μ 0 .
Solution Under H 0 H_0 H 0 : sup μ = μ 0 L ( μ , σ 2 ) = L ( μ 0 , σ 2 ) \sup_{\mu = \mu_0} L(\mu, \sigma^2) = L(\mu_0, \sigma^2) sup μ = μ 0 L ( μ , σ 2 ) = L ( μ 0 , σ 2 ) .
Under H 1 ∪ H 0 H_1 \cup H_0 H 1 ∪ H 0 : sup μ L ( μ , σ 2 ) = L ( x ˉ , σ 2 ) \sup_\mu L(\mu, \sigma^2) = L(\bar{x}, \sigma^2) sup μ L ( μ , σ 2 ) = L ( x ˉ , σ 2 ) .
Λ = L ( μ 0 , σ 2 ) L ( x ˉ , σ 2 ) = exp ( − 1 2 σ 2 [ ∑ ( x i − μ 0 ) 2 − ∑ ( x i − x ˉ ) 2 ] ) \Lambda = \frac{L(\mu_0, \sigma^2)}{L(\bar{x}, \sigma^2)} = \exp\left(-\frac{1}{2\sigma^2}\left[\sum(x_i - \mu_0)^2 - \sum(x_i - \bar{x})^2\right]\right) Λ = L ( x ˉ , σ 2 ) L ( μ 0 , σ 2 ) = exp ( − 2 σ 2 1 [ ∑ ( x i − μ 0 ) 2 − ∑ ( x i − x ˉ ) 2 ] )
Now ∑ ( x i − μ 0 ) 2 = ∑ ( x i − x ˉ ) 2 + n ( x ˉ − μ 0 ) 2 \sum(x_i - \mu_0)^2 = \sum(x_i - \bar{x})^2 + n(\bar{x} - \mu_0)^2 ∑ ( x i − μ 0 ) 2 = ∑ ( x i − x ˉ ) 2 + n ( x ˉ − μ 0 ) 2 So:
Λ = exp ( − n ( x ˉ − μ 0 ) 2 2 σ 2 ) \Lambda = \exp\left(-\frac{n(\bar{x} - \mu_0)^2}{2\sigma^2}\right) Λ = exp ( − 2 σ 2 n ( x ˉ − μ 0 ) 2 )
We reject H 0 H_0 H 0 when Λ \Lambda Λ is small, i.e., when n ( x ˉ − μ 0 ) 2 σ 2 \frac{n(\bar{x} - \mu_0)^2}{\sigma^2} σ 2 n ( x ˉ − μ 0 ) 2 is large, which is Equivalent to ∣ X ˉ − μ 0 σ / n ∣ > c \left|\frac{\bar{X} - \mu_0}{\sigma / \sqrt{n}}\right| \gt c σ / n X ˉ − μ 0 > c . This recovers the Z-test. ■ \blacksquare ■
:::caution Common Pitfall “Failing to reject H 0 H_0 H 0 ” is not the same as “accepting H 0 H_0 H 0 ”. The test only provides evidence against H 0 H_0 H 0 ; absence of evidence is not evidence of absence. The distinction is critical in scientific Reasoning. :::
Problem 1. Let A , B , C A, B, C A , B , C be events with P ( A ) = 0.4 P(A) = 0.4 P ( A ) = 0.4 , P ( B ) = 0.5 P(B) = 0.5 P ( B ) = 0.5 , P ( C ) = 0.3 P(C) = 0.3 P ( C ) = 0.3 , P ( A ∩ B ) = 0.2 P(A \cap B) = 0.2 P ( A ∩ B ) = 0.2 P ( A ∩ C ) = 0.1 P(A \cap C) = 0.1 P ( A ∩ C ) = 0.1 , P ( B ∩ C ) = 0.15 P(B \cap C) = 0.15 P ( B ∩ C ) = 0.15 And P ( A ∩ B ∩ C ) = 0.05 P(A \cap B \cap C) = 0.05 P ( A ∩ B ∩ C ) = 0.05 . Compute P ( A ∪ B ∪ C ) P(A \cup B \cup C) P ( A ∪ B ∪ C ) .
Solution By the general inclusion-exclusion principle:
P ( A ∪ B ∪ C ) = P ( A ) + P ( B ) + P ( C ) − P ( A ∩ B ) − P ( A ∩ C ) − P ( B ∩ C ) + P ( A ∩ B ∩ C ) P(A \cup B \cup C) = P(A) + P(B) + P(C) - P(A \cap B) - P(A \cap C) - P(B \cap C) + P(A \cap B \cap C) P ( A ∪ B ∪ C ) = P ( A ) + P ( B ) + P ( C ) − P ( A ∩ B ) − P ( A ∩ C ) − P ( B ∩ C ) + P ( A ∩ B ∩ C )
= 0.4 + 0.5 + 0.3 − 0.2 − 0.1 − 0.15 + 0.05 = 0.80 = 0.4 + 0.5 + 0.3 - 0.2 - 0.1 - 0.15 + 0.05 = 0.80 = 0.4 + 0.5 + 0.3 − 0.2 − 0.1 − 0.15 + 0.05 = 0.80
If you get this wrong, revise: Section 1.5 (Inclusion-Exclusion).
Problem 2. Cards are drawn without replacement from a standard 52-card deck. What is the probability that the Third ace appears on the 10th draw?
Solution We need exactly 2 aces in the first 9 draws and the 10th card is an ace.
P = ( 4 2 ) ( 48 7 ) ( 52 9 ) × 2 43 = 6 × 62891499 3679075400 × 2 43 ≈ 0.00476 P = \frac{\binom{4}{2}\binom{48}{7}}{\binom{52}{9}} \times \frac{2}{43} = \frac{6 \times 62891499}{3679075400} \times \frac{2}{43} \approx 0.00476 P = ( 9 52 ) ( 2 4 ) ( 7 48 ) × 43 2 = 3679075400 6 × 62891499 × 43 2 ≈ 0.00476
If you get this wrong, revise: Section 1.6 (Conditional Probability).
Problem 3. Prove that for events A A A and B B B : P ( A ∩ B ) ≥ P ( A ) + P ( B ) − 1 P(A \cap B) \geq P(A) + P(B) - 1 P ( A ∩ B ) ≥ P ( A ) + P ( B ) − 1 .
Solution From inclusion-exclusion: P ( A ∪ B ) = P ( A ) + P ( B ) − P ( A ∩ B ) ≤ 1 P(A \cup B) = P(A) + P(B) - P(A \cap B) \leq 1 P ( A ∪ B ) = P ( A ) + P ( B ) − P ( A ∩ B ) ≤ 1 .
Therefore: P ( A ) + P ( B ) − P ( A ∩ B ) ≤ 1 P(A) + P(B) - P(A \cap B) \leq 1 P ( A ) + P ( B ) − P ( A ∩ B ) ≤ 1 Which gives P ( A ∩ B ) ≥ P ( A ) + P ( B ) − 1 P(A \cap B) \geq P(A) + P(B) - 1 P ( A ∩ B ) ≥ P ( A ) + P ( B ) − 1 . ■ \blacksquare ■
This is known as the Bonferroni inequality .
If you get this wrong, revise: Section 1.4 (Basic Properties).
Problem 4. Let X X X be a continuous random variable with PDF f ( x ) = c x 2 f(x) = cx^2 f ( x ) = c x 2 for 0 ≤ x ≤ 1 0 \leq x \leq 1 0 ≤ x ≤ 1 and f ( x ) = 0 f(x) = 0 f ( x ) = 0 Otherwise. Find c c c The CDF, E [ X ] E[X] E [ X ] And V a r ( X ) \mathrm{Var}(X) Var ( X ) .
Solution Normalisation: ∫ 0 1 c x 2 d x = c / 3 = 1 \int_0^1 cx^2\, dx = c/3 = 1 ∫ 0 1 c x 2 d x = c /3 = 1 So c = 3 c = 3 c = 3 .
CDF: F ( x ) = ∫ 0 x 3 t 2 d t = x 3 F(x) = \int_0^x 3t^2\, dt = x^3 F ( x ) = ∫ 0 x 3 t 2 d t = x 3 for 0 ≤ x ≤ 1 0 \leq x \leq 1 0 ≤ x ≤ 1 .
E [ X ] = ∫ 0 1 x ⋅ 3 x 2 d x = 3 ∫ 0 1 x 3 d x = 3 4 E[X] = \int_0^1 x \cdot 3x^2\, dx = 3\int_0^1 x^3\, dx = \frac{3}{4} E [ X ] = ∫ 0 1 x ⋅ 3 x 2 d x = 3 ∫ 0 1 x 3 d x = 4 3
E [ X 2 ] = ∫ 0 1 x 2 ⋅ 3 x 2 d x = 3 ∫ 0 1 x 4 d x = 3 5 E[X^2] = \int_0^1 x^2 \cdot 3x^2\, dx = 3\int_0^1 x^4\, dx = \frac{3}{5} E [ X 2 ] = ∫ 0 1 x 2 ⋅ 3 x 2 d x = 3 ∫ 0 1 x 4 d x = 5 3
V a r ( X ) = 3 5 − ( 3 4 ) 2 = 3 5 − 9 16 = 48 − 45 80 = 3 80 \mathrm{Var}(X) = \frac{3}{5} - \left(\frac{3}{4}\right)^2 = \frac{3}{5} - \frac{9}{16} = \frac{48 - 45}{80} = \frac{3}{80} Var ( X ) = 5 3 − ( 4 3 ) 2 = 5 3 − 16 9 = 80 48 − 45 = 80 3
If you get this wrong, revise: Section 2.4 (PDF) and Section 4.1-4.2 (Expectation and Variance).
Problem 5. If X ∼ B i n ( n , p ) X \sim \mathrm{Bin}(n, p) X ∼ Bin ( n , p ) Use LOTUS to show that E [ X ( X − 1 ) ] = n ( n − 1 ) p 2 E[X(X - 1)] = n(n-1)p^2 E [ X ( X − 1 )] = n ( n − 1 ) p 2 . Use this to derive V a r ( X ) = n p ( 1 − p ) \mathrm{Var}(X) = np(1 - p) Var ( X ) = n p ( 1 − p ) .
Solution E [ X ( X − 1 ) ] = ∑ k = 0 n k ( k − 1 ) ( n k ) p k ( 1 − p ) n − k E[X(X - 1)] = \sum_{k=0}^n k(k-1) \binom{n}{k} p^k (1-p)^{n-k} E [ X ( X − 1 )] = ∑ k = 0 n k ( k − 1 ) ( k n ) p k ( 1 − p ) n − k
For k ≥ 2 k \geq 2 k ≥ 2 : k ( k − 1 ) ( n k ) = k ( k − 1 ) ⋅ n ! k ! ( n − k ) ! = n ! ( k − 2 ) ! ( n − k ) ! = n ( n − 1 ) ( n − 2 k − 2 ) k(k-1)\binom{n}{k} = k(k-1) \cdot \frac{n!}{k!(n-k)!} = \frac{n!}{(k-2)!(n-k)!} = n(n-1)\binom{n-2}{k-2} k ( k − 1 ) ( k n ) = k ( k − 1 ) ⋅ k ! ( n − k )! n ! = ( k − 2 )! ( n − k )! n ! = n ( n − 1 ) ( k − 2 n − 2 ) .
E [ X ( X − 1 ) ] = n ( n − 1 ) p 2 ∑ k = 2 n ( n − 2 k − 2 ) p k − 2 ( 1 − p ) n − k = n ( n − 1 ) p 2 ⋅ 1 = n ( n − 1 ) p 2 E[X(X-1)] = n(n-1)p^2 \sum_{k=2}^n \binom{n-2}{k-2} p^{k-2}(1-p)^{n-k} = n(n-1)p^2 \cdot 1 = n(n-1)p^2 E [ X ( X − 1 )] = n ( n − 1 ) p 2 ∑ k = 2 n ( k − 2 n − 2 ) p k − 2 ( 1 − p ) n − k = n ( n − 1 ) p 2 ⋅ 1 = n ( n − 1 ) p 2
(the sum is the binomial theorem for B i n ( n − 2 , p ) \mathrm{Bin}(n-2, p) Bin ( n − 2 , p ) ).
Now E [ X 2 ] = E [ X ( X − 1 ) ] + E [ X ] = n ( n − 1 ) p 2 + n p E[X^2] = E[X(X-1)] + E[X] = n(n-1)p^2 + np E [ X 2 ] = E [ X ( X − 1 )] + E [ X ] = n ( n − 1 ) p 2 + n p .
V a r ( X ) = n ( n − 1 ) p 2 + n p − n 2 p 2 = n p − n p 2 = n p ( 1 − p ) ■ \mathrm{Var}(X) = n(n-1)p^2 + np - n^2p^2 = np - np^2 = np(1-p) \quad \blacksquare Var ( X ) = n ( n − 1 ) p 2 + n p − n 2 p 2 = n p − n p 2 = n p ( 1 − p ) ■
If you get this wrong, revise: Section 3.1 (Binomial Distribution) and Section 4.1 (LOTUS).
Problem 6. Let X ∼ P o i s s o n ( λ ) X \sim \mathrm{Poisson}(\lambda) X ∼ Poisson ( λ ) . Find E [ X ( X − 1 ) ( X − 2 ) ] E[X(X-1)(X-2)] E [ X ( X − 1 ) ( X − 2 )] and use it to compute V a r ( X ) \mathrm{Var}(X) Var ( X ) .
Solution E [ X ( X − 1 ) ( X − 2 ) ] = ∑ k = 0 ∞ k ( k − 1 ) ( k − 2 ) e − λ λ k k ! = e − λ ∑ k = 3 ∞ λ k ( k − 3 ) ! E[X(X-1)(X-2)] = \sum_{k=0}^{\infty} k(k-1)(k-2) \frac{e^{-\lambda}\lambda^k}{k!} = e^{-\lambda} \sum_{k=3}^{\infty} \frac{\lambda^k}{(k-3)!} E [ X ( X − 1 ) ( X − 2 )] = ∑ k = 0 ∞ k ( k − 1 ) ( k − 2 ) k ! e − λ λ k = e − λ ∑ k = 3 ∞ ( k − 3 )! λ k
= e − λ λ 3 ∑ j = 0 ∞ λ j j ! = λ 3 = e^{-\lambda} \lambda^3 \sum_{j=0}^{\infty} \frac{\lambda^j}{j!} = \lambda^3 = e − λ λ 3 ∑ j = 0 ∞ j ! λ j = λ 3
So E [ X 3 ] = E [ X ( X − 1 ) ( X − 2 ) ] + 3 E [ X 2 ] − 2 E [ X ] = λ 3 + 3 ( λ 2 + λ ) − 2 λ = λ 3 + 3 λ 2 + λ E[X^3] = E[X(X-1)(X-2)] + 3E[X^2] - 2E[X] = \lambda^3 + 3(\lambda^2 + \lambda) - 2\lambda = \lambda^3 + 3\lambda^2 + \lambda E [ X 3 ] = E [ X ( X − 1 ) ( X − 2 )] + 3 E [ X 2 ] − 2 E [ X ] = λ 3 + 3 ( λ 2 + λ ) − 2 λ = λ 3 + 3 λ 2 + λ .
For variance: E [ X 2 ] = E [ X ( X − 1 ) ] + E [ X ] = λ 2 + λ E[X^2] = E[X(X-1)] + E[X] = \lambda^2 + \lambda E [ X 2 ] = E [ X ( X − 1 )] + E [ X ] = λ 2 + λ .
V a r ( X ) = ( λ 2 + λ ) − λ 2 = λ ■ \mathrm{Var}(X) = (\lambda^2 + \lambda) - \lambda^2 = \lambda \quad \blacksquare Var ( X ) = ( λ 2 + λ ) − λ 2 = λ ■
If you get this wrong, revise: Section 3.1 (Poisson Distribution).
Problem 7. Let X X X and Y Y Y be independent with X ∼ N ( 2 , 4 ) X \sim N(2, 4) X ∼ N ( 2 , 4 ) and Y ∼ N ( 3 , 9 ) Y \sim N(3, 9) Y ∼ N ( 3 , 9 ) . Find the distribution of 2 X − 3 Y + 5 2X - 3Y + 5 2 X − 3 Y + 5 .
Solution E [ 2 X − 3 Y + 5 ] = 2 ( 2 ) − 3 ( 3 ) + 5 = 4 − 9 + 5 = 0 E[2X - 3Y + 5] = 2(2) - 3(3) + 5 = 4 - 9 + 5 = 0 E [ 2 X − 3 Y + 5 ] = 2 ( 2 ) − 3 ( 3 ) + 5 = 4 − 9 + 5 = 0 .
V a r ( 2 X − 3 Y + 5 ) = 4 V a r ( X ) + 9 V a r ( Y ) = 4 ( 4 ) + 9 ( 9 ) = 16 + 81 = 97 \mathrm{Var}(2X - 3Y + 5) = 4\,\mathrm{Var}(X) + 9\,\mathrm{Var}(Y) = 4(4) + 9(9) = 16 + 81 = 97 Var ( 2 X − 3 Y + 5 ) = 4 Var ( X ) + 9 Var ( Y ) = 4 ( 4 ) + 9 ( 9 ) = 16 + 81 = 97 .
Since linear combinations of independent normals are normal: 2 X − 3 Y + 5 ∼ N ( 0 , 97 ) 2X - 3Y + 5 \sim N(0, 97) 2 X − 3 Y + 5 ∼ N ( 0 , 97 ) . ■ \blacksquare ■
If you get this wrong, revise: Section 3.2 (Normal Distribution) and Theorem 3.2.
Problem 8. Let f X , Y ( x , y ) = 3 2 ( x 2 + y 2 ) f_{X,Y}(x,y) = \frac{3}{2}(x^2 + y^2) f X , Y ( x , y ) = 2 3 ( x 2 + y 2 ) for 0 ≤ x ≤ 1 , 0 ≤ y ≤ 1 0 \leq x \leq 1, 0 \leq y \leq 1 0 ≤ x ≤ 1 , 0 ≤ y ≤ 1 . Find P ( X > Y ) P(X \gt Y) P ( X > Y ) .
Solution P ( X > Y ) = ∫ 0 1 ∫ y 1 3 2 ( x 2 + y 2 ) d x d y P(X \gt Y) = \int_0^1 \int_y^1 \frac{3}{2}(x^2 + y^2)\, dx\, dy P ( X > Y ) = ∫ 0 1 ∫ y 1 2 3 ( x 2 + y 2 ) d x d y
= 3 2 ∫ 0 1 [ x 3 3 + x y 2 ] x = y x = 1 d y = 3 2 ∫ 0 1 ( 1 3 + y 2 − y 3 3 − y 3 ) d y = \frac{3}{2} \int_0^1 \left[\frac{x^3}{3} + xy^2\right]_{x=y}^{x=1}\, dy = \frac{3}{2} \int_0^1 \left(\frac{1}{3} + y^2 - \frac{y^3}{3} - y^3\right)\, dy = 2 3 ∫ 0 1 [ 3 x 3 + x y 2 ] x = y x = 1 d y = 2 3 ∫ 0 1 ( 3 1 + y 2 − 3 y 3 − y 3 ) d y
= 3 2 ∫ 0 1 ( 1 3 + y 2 − 4 y 3 3 ) d y = 3 2 [ y 3 + y 3 3 − y 4 3 ] 0 1 = \frac{3}{2} \int_0^1 \left(\frac{1}{3} + y^2 - \frac{4y^3}{3}\right)\, dy = \frac{3}{2} \left[\frac{y}{3} + \frac{y^3}{3} - \frac{y^4}{3}\right]_0^1 = 2 3 ∫ 0 1 ( 3 1 + y 2 − 3 4 y 3 ) d y = 2 3 [ 3 y + 3 y 3 − 3 y 4 ] 0 1
= 3 2 ( 1 3 + 1 3 − 1 3 ) = 3 2 ⋅ 1 3 = 1 2 = \frac{3}{2} \left(\frac{1}{3} + \frac{1}{3} - \frac{1}{3}\right) = \frac{3}{2} \cdot \frac{1}{3} = \frac{1}{2} = 2 3 ( 3 1 + 3 1 − 3 1 ) = 2 3 ⋅ 3 1 = 2 1
If you get this wrong, revise: Section 5.1 (Joint PDF).
Problem 9. Let X 1 , X 2 X_1, X_2 X 1 , X 2 be i.i.d. With common PDF f ( x ) = 2 x f(x) = 2x f ( x ) = 2 x for 0 ≤ x ≤ 1 0 \leq x \leq 1 0 ≤ x ≤ 1 . Find the PDF of M = max ( X 1 , X 2 ) M = \max(X_1, X_2) M = max ( X 1 , X 2 ) .
Solution The CDF of each X i X_i X i is F ( x ) = x 2 F(x) = x^2 F ( x ) = x 2 for 0 ≤ x ≤ 1 0 \leq x \leq 1 0 ≤ x ≤ 1 .
F M ( m ) = P ( max ( X 1 , X 2 ) ≤ m ) = P ( X 1 ≤ m ) P ( X 2 ≤ m ) = F ( m ) 2 = m 4 F_M(m) = P(\max(X_1, X_2) \leq m) = P(X_1 \leq m)\, P(X_2 \leq m) = F(m)^2 = m^4 F M ( m ) = P ( max ( X 1 , X 2 ) ≤ m ) = P ( X 1 ≤ m ) P ( X 2 ≤ m ) = F ( m ) 2 = m 4
f M ( m ) = d d m F M ( m ) = 4 m 3 , 0 ≤ m ≤ 1 f_M(m) = \frac{d}{dm} F_M(m) = 4m^3, \quad 0 \leq m \leq 1 f M ( m ) = d m d F M ( m ) = 4 m 3 , 0 ≤ m ≤ 1
If you get this wrong, revise: Section 2.2 (CDF Properties) and Section 5.3 (Independence).
Problem 10. Let X X X have MGF M X ( t ) = 1 3 e t + 1 3 e 2 t + 1 3 e 3 t M_X(t) = \frac{1}{3}e^t + \frac{1}{3}e^{2t} + \frac{1}{3}e^{3t} M X ( t ) = 3 1 e t + 3 1 e 2 t + 3 1 e 3 t . What is the distribution Of X X X ? Compute E [ X ] E[X] E [ X ] and V a r ( X ) \mathrm{Var}(X) Var ( X ) .
Solution The MGF is a weighted sum of exponentials, corresponding to a discrete distribution:
P ( X = 1 ) = P ( X = 2 ) = P ( X = 3 ) = 1 3 P(X = 1) = P(X = 2) = P(X = 3) = \frac{1}{3} P ( X = 1 ) = P ( X = 2 ) = P ( X = 3 ) = 3 1
This is the discrete uniform distribution on \\{1, 2, 3\\}.
E [ X ] = M X ′ ( 0 ) = 1 3 e 0 + 2 3 e 0 + 3 3 e 0 = 1 + 2 + 3 3 = 2 E[X] = M_X'(0) = \frac{1}{3}e^0 + \frac{2}{3}e^0 + \frac{3}{3}e^0 = \frac{1 + 2 + 3}{3} = 2 E [ X ] = M X ′ ( 0 ) = 3 1 e 0 + 3 2 e 0 + 3 3 e 0 = 3 1 + 2 + 3 = 2
E [ X 2 ] = M X ′ ′ ( 0 ) = 1 3 + 4 3 + 9 3 = 14 3 E[X^2] = M_X''(0) = \frac{1}{3} + \frac{4}{3} + \frac{9}{3} = \frac{14}{3} E [ X 2 ] = M X ′′ ( 0 ) = 3 1 + 3 4 + 3 9 = 3 14
V a r ( X ) = 14 3 − 4 = 2 3 \mathrm{Var}(X) = \frac{14}{3} - 4 = \frac{2}{3} Var ( X ) = 3 14 − 4 = 3 2
If you get this wrong, revise: Section 4.3 (MGFs).
Problem 11. Use the CLT to approximate P ( B i n ( 100 , 0.3 ) ≤ 35 ) P(\mathrm{Bin}(100, 0.3) \leq 35) P ( Bin ( 100 , 0.3 ) ≤ 35 ) .
Solution X ∼ B i n ( 100 , 0.3 ) X \sim \mathrm{Bin}(100, 0.3) X ∼ Bin ( 100 , 0.3 ) So E [ X ] = 30 E[X] = 30 E [ X ] = 30 , V a r ( X ) = 21 \mathrm{Var}(X) = 21 Var ( X ) = 21 , σ = 21 ≈ 4.583 \sigma = \sqrt{21} \approx 4.583 σ = 21 ≈ 4.583 .
With continuity correction:
P ( X ≤ 35 ) ≈ P ( Z ≤ 35.5 − 30 21 ) = P ( Z ≤ 5.5 4.583 ) = P ( Z ≤ 1.20 ) ≈ 0.8849 P(X \leq 35) \approx P\left(Z \leq \frac{35.5 - 30}{\sqrt{21}}\right) = P\left(Z \leq \frac{5.5}{4.583}\right) = P(Z \leq 1.20) \approx 0.8849 P ( X ≤ 35 ) ≈ P ( Z ≤ 21 35.5 − 30 ) = P ( Z ≤ 4.583 5.5 ) = P ( Z ≤ 1.20 ) ≈ 0.8849
If you get this wrong, revise: Section 6.3 (CLT) and Section 3.3 (Normal Approximation).
Problem 12. Let X 1 , … , X 100 X_1, \ldots, X_{100} X 1 , … , X 100 be i.i.d. U n i f o r m ( 0 , 1 ) \mathrm{Uniform}(0, 1) Uniform ( 0 , 1 ) . Approximate P ( 0.48 < X ˉ < 0.52 ) P(0.48 \lt \bar{X} \lt 0.52) P ( 0.48 < X ˉ < 0.52 ) .
Solution E [ X i ] = 1 / 2 E[X_i] = 1/2 E [ X i ] = 1/2 , V a r ( X i ) = 1 / 12 \mathrm{Var}(X_i) = 1/12 Var ( X i ) = 1/12 . By the CLT:
X ˉ ≈ N ( 1 2 , 1 1200 ) , σ X ˉ = 1 1200 ≈ 0.02887 \bar{X} \approx N\left(\frac{1}{2}, \frac{1}{1200}\right), \quad \sigma_{\bar{X}} = \frac{1}{\sqrt{1200}} \approx 0.02887 X ˉ ≈ N ( 2 1 , 1200 1 ) , σ X ˉ = 1200 1 ≈ 0.02887
P ( 0.48 < X ˉ < 0.52 ) = P ( 0.48 − 0.50 0.02887 < Z < 0.52 − 0.50 0.02887 ) = P ( − 0.693 < Z < 0.693 ) P(0.48 \lt \bar{X} \lt 0.52) = P\left(\frac{0.48 - 0.50}{0.02887} \lt Z \lt \frac{0.52 - 0.50}{0.02887}\right) = P(-0.693 \lt Z \lt 0.693) P ( 0.48 < X ˉ < 0.52 ) = P ( 0.02887 0.48 − 0.50 < Z < 0.02887 0.52 − 0.50 ) = P ( − 0.693 < Z < 0.693 )
≈ Φ ( 0.693 ) − Φ ( − 0.693 ) ≈ 2 ( 0.7557 ) − 1 = 0.5114 \approx \Phi(0.693) - \Phi(-0.693) \approx 2(0.7557) - 1 = 0.5114 ≈ Φ ( 0.693 ) − Φ ( − 0.693 ) ≈ 2 ( 0.7557 ) − 1 = 0.5114
If you get this wrong, revise: Section 6.3 (CLT).
Problem 13. Find the MLE for θ \theta θ given a single observation x x x from the Pareto distribution with PDF f ( x ∣ θ ) = θ / x θ + 1 f(x \mid \theta) = \theta / x^{\theta + 1} f ( x ∣ θ ) = θ / x θ + 1 for x ≥ 1 x \geq 1 x ≥ 1 and θ > 0 \theta \gt 0 θ > 0 .
Solution L ( θ ) = θ x θ + 1 L(\theta) = \frac{\theta}{x^{\theta + 1}} L ( θ ) = x θ + 1 θ
ℓ ( θ ) = log θ − ( θ + 1 ) log x \ell(\theta) = \log \theta - (\theta + 1)\log x ℓ ( θ ) = log θ − ( θ + 1 ) log x
d ℓ d θ = 1 θ − log x = 0 ⟹ θ ^ = 1 log x \frac{d\ell}{d\theta} = \frac{1}{\theta} - \log x = 0 \implies \hat{\theta} = \frac{1}{\log x} d θ d ℓ = θ 1 − log x = 0 ⟹ θ ^ = l o g x 1
Verify: d 2 ℓ d θ 2 = − 1 θ 2 < 0 \frac{d^2\ell}{d\theta^2} = -\frac{1}{\theta^2} \lt 0 d θ 2 d 2 ℓ = − θ 2 1 < 0 Confirming a maximum. ■ \blacksquare ■
If you get this wrong, revise: Section 7.2 (MLE Procedure).
Problem 14. Compute the Fisher information I ( θ ) I(\theta) I ( θ ) for the Pareto distribution in Problem 13.
Solution ∂ ∂ θ log f ( x ∣ θ ) = 1 θ − log x \frac{\partial}{\partial \theta} \log f(x \mid \theta) = \frac{1}{\theta} - \log x ∂ θ ∂ log f ( x ∣ θ ) = θ 1 − log x
∂ 2 ∂ θ 2 log f ( x ∣ θ ) = − 1 θ 2 \frac{\partial^2}{\partial \theta^2} \log f(x \mid \theta) = -\frac{1}{\theta^2} ∂ θ 2 ∂ 2 log f ( x ∣ θ ) = − θ 2 1
I ( θ ) = − E [ − 1 θ 2 ] = 1 θ 2 I(\theta) = -E\left[-\frac{1}{\theta^2}\right] = \frac{1}{\theta^2} I ( θ ) = − E [ − θ 2 1 ] = θ 2 1
If you get this wrong, revise: Section 7.4 (Fisher Information).
Problem 15. A test of H 0 : μ = 50 H_0: \mu = 50 H 0 : μ = 50 vs H 1 : μ > 50 H_1: \mu \gt 50 H 1 : μ > 50 is conducted at α = 0.01 \alpha = 0.01 α = 0.01 with n = 16 n = 16 n = 16 and known σ = 8 \sigma = 8 σ = 8 . What is the power of the test if the true mean is μ = 54 \mu = 54 μ = 54 ?
Solution Under H 0 H_0 H 0 , X ˉ ∼ N ( 50 , 64 / 16 ) = N ( 50 , 4 ) \bar{X} \sim N(50, 64/16) = N(50, 4) X ˉ ∼ N ( 50 , 64/16 ) = N ( 50 , 4 ) . The critical value in terms of X ˉ \bar{X} X ˉ is:
x ˉ c = 50 + z 0.01 ⋅ 8 4 = 50 + 2.326 × 2 = 54.652 \bar{x}_c = 50 + z_{0.01} \cdot \frac{8}{4} = 50 + 2.326 \times 2 = 54.652 x ˉ c = 50 + z 0.01 ⋅ 4 8 = 50 + 2.326 × 2 = 54.652
Under H 1 H_1 H 1 (true μ = 54 \mu = 54 μ = 54 ): X ˉ ∼ N ( 54 , 4 ) \bar{X} \sim N(54, 4) X ˉ ∼ N ( 54 , 4 ) .
P o w e r = P ( X ˉ > 54.652 ∣ μ = 54 ) = P ( Z > 54.652 − 54 2 ) = P ( Z > 0.326 ) ≈ 0.372 \mathrm{Power} = P(\bar{X} \gt 54.652 \mid \mu = 54) = P\left(Z \gt \frac{54.652 - 54}{2}\right) = P(Z \gt 0.326) \approx 0.372 Power = P ( X ˉ > 54.652 ∣ μ = 54 ) = P ( Z > 2 54.652 − 54 ) = P ( Z > 0.326 ) ≈ 0.372
If you get this wrong, revise: Section 8.6 (Z-Test) and Section 8.2 (Power).
Problem 16. Let X ∼ E x p ( λ ) X \sim \mathrm{Exp}(\lambda) X ∼ Exp ( λ ) and Y ∼ E x p ( μ ) Y \sim \mathrm{Exp}(\mu) Y ∼ Exp ( μ ) be independent. Show that P ( X < Y ) = λ / ( λ + μ ) P(X \lt Y) = \lambda / (\lambda + \mu) P ( X < Y ) = λ / ( λ + μ ) .
Solution P ( X < Y ) = ∫ 0 ∞ ∫ x ∞ λ e − λ x μ e − μ y d y d x = ∫ 0 ∞ λ e − λ x e − μ x d x P(X \lt Y) = \int_0^{\infty} \int_x^{\infty} \lambda e^{-\lambda x} \mu e^{-\mu y}\, dy\, dx = \int_0^{\infty} \lambda e^{-\lambda x} e^{-\mu x}\, dx P ( X < Y ) = ∫ 0 ∞ ∫ x ∞ λ e − λ x μ e − μ y d y d x = ∫ 0 ∞ λ e − λ x e − μx d x
= λ ∫ 0 ∞ e − ( λ + μ ) x d x = λ λ + μ ■ = \lambda \int_0^{\infty} e^{-(\lambda + \mu)x}\, dx = \frac{\lambda}{\lambda + \mu} \quad \blacksquare = λ ∫ 0 ∞ e − ( λ + μ ) x d x = λ + μ λ ■
If you get this wrong, revise: Section 5.1 (Joint PDF) and Section 3.2 (Exponential Distribution).
Problem 17. Prove Chebyshev’s inequality: for any random variable X X X with finite mean μ \mu μ and variance σ 2 \sigma^2 σ 2 And any k > 0 k \gt 0 k > 0 :
P ( ∣ X − μ ∣ ≥ k σ ) ≤ 1 k 2 P(|X - \mu| \geq k\sigma) \leq \frac{1}{k^2} P ( ∣ X − μ ∣ ≥ k σ ) ≤ k 2 1
Solution σ 2 = E [ ( X − μ ) 2 ] = ∫ − ∞ ∞ ( x − μ ) 2 d F ( x ) \sigma^2 = E[(X - \mu)^2] = \int_{-\infty}^{\infty} (x - \mu)^2\, dF(x) σ 2 = E [( X − μ ) 2 ] = ∫ − ∞ ∞ ( x − μ ) 2 d F ( x )
≥ ∫ ∣ x − μ ∣ ≥ k σ ( x − μ ) 2 d F ( x ) ≥ ∫ ∣ x − μ ∣ ≥ k σ k 2 σ 2 d F ( x ) = k 2 σ 2 P ( ∣ X − μ ∣ ≥ k σ ) \geq \int_{|x - \mu| \geq k\sigma} (x - \mu)^2\, dF(x) \geq \int_{|x - \mu| \geq k\sigma} k^2 \sigma^2\, dF(x) = k^2 \sigma^2\, P(|X - \mu| \geq k\sigma) ≥ ∫ ∣ x − μ ∣ ≥ k σ ( x − μ ) 2 d F ( x ) ≥ ∫ ∣ x − μ ∣ ≥ k σ k 2 σ 2 d F ( x ) = k 2 σ 2 P ( ∣ X − μ ∣ ≥ k σ )
Therefore P ( ∣ X − μ ∣ ≥ k σ ) ≤ 1 / k 2 P(|X - \mu| \geq k\sigma) \leq 1/k^2 P ( ∣ X − μ ∣ ≥ k σ ) ≤ 1/ k 2 . ■ \blacksquare ■
If you get this wrong, revise: Section 4.2 (Variance).
Problem 18. Let X 1 , … , X n ∼ N ( μ , 1 ) X_1, \ldots, X_n \sim N(\mu, 1) X 1 , … , X n ∼ N ( μ , 1 ) with μ \mu μ unknown. Find the likelihood ratio test statistic for H 0 : μ = μ 0 H_0: \mu = \mu_0 H 0 : μ = μ 0 vs H 1 : μ ≠ μ 0 H_1: \mu \neq \mu_0 H 1 : μ = μ 0 and show it is equivalent to the Z-test.
Solution Under H 0 H_0 H 0 : sup L = ( 2 π ) − n / 2 exp ( − 1 2 ∑ ( x i − μ 0 ) 2 ) \sup L = (2\pi)^{-n/2} \exp\left(-\frac{1}{2}\sum(x_i - \mu_0)^2\right) sup L = ( 2 π ) − n /2 exp ( − 2 1 ∑ ( x i − μ 0 ) 2 ) .
Under H 1 ∪ H 0 H_1 \cup H_0 H 1 ∪ H 0 : sup L = ( 2 π ) − n / 2 exp ( − 1 2 ∑ ( x i − x ˉ ) 2 ) \sup L = (2\pi)^{-n/2} \exp\left(-\frac{1}{2}\sum(x_i - \bar{x})^2\right) sup L = ( 2 π ) − n /2 exp ( − 2 1 ∑ ( x i − x ˉ ) 2 ) .
Λ = L ( μ 0 ) L ( x ˉ ) = exp ( − 1 2 [ ∑ ( x i − μ 0 ) 2 − ∑ ( x i − x ˉ ) 2 ] ) = exp ( − n ( x ˉ − μ 0 ) 2 2 ) \Lambda = \frac{L(\mu_0)}{L(\bar{x})} = \exp\left(-\frac{1}{2}\left[\sum(x_i - \mu_0)^2 - \sum(x_i - \bar{x})^2\right]\right) = \exp\left(-\frac{n(\bar{x} - \mu_0)^2}{2}\right) Λ = L ( x ˉ ) L ( μ 0 ) = exp ( − 2 1 [ ∑ ( x i − μ 0 ) 2 − ∑ ( x i − x ˉ ) 2 ] ) = exp ( − 2 n ( x ˉ − μ 0 ) 2 )
− 2 log Λ = n ( x ˉ − μ 0 ) 2 = ( x ˉ − μ 0 1 / n ) 2 = Z 2 -2\log \Lambda = n(\bar{x} - \mu_0)^2 = \left(\frac{\bar{x} - \mu_0}{1/\sqrt{n}}\right)^2 = Z^2 − 2 log Λ = n ( x ˉ − μ 0 ) 2 = ( 1/ n x ˉ − μ 0 ) 2 = Z 2
Under H 0 H_0 H 0 , Z 2 ∼ χ 1 2 Z^2 \sim \chi^2_1 Z 2 ∼ χ 1 2 So we reject when ∣ Z ∣ > z α / 2 |Z| \gt z_{\alpha/2} ∣ Z ∣ > z α /2 . This is exactly the Z-test. ■ \blacksquare ■
If you get this wrong, revise: Section 8.4 (Likelihood Ratio Tests) and Section 8.6 (Z-Test).
Problem 19. Let X 1 , … , X n X_1, \ldots, X_n X 1 , … , X n be i.i.d. N ( μ , σ 2 ) N(\mu, \sigma^2) N ( μ , σ 2 ) with both parameters unknown. Find the MLE For ( μ , σ 2 ) (\mu, \sigma^2) ( μ , σ 2 ) and show that σ ^ M L E 2 \hat{\sigma}^2_{\mathrm{MLE}} σ ^ MLE 2 is biased.
Solution L ( μ , σ 2 ) = ( 2 π σ 2 ) − n / 2 exp ( − 1 2 σ 2 ∑ i = 1 n ( x i − μ ) 2 ) L(\mu, \sigma^2) = (2\pi\sigma^2)^{-n/2} \exp\left(-\frac{1}{2\sigma^2}\sum_{i=1}^n (x_i - \mu)^2\right) L ( μ , σ 2 ) = ( 2 π σ 2 ) − n /2 exp ( − 2 σ 2 1 ∑ i = 1 n ( x i − μ ) 2 )
ℓ ( μ , σ 2 ) = − n 2 log ( 2 π ) − n 2 log ( σ 2 ) − 1 2 σ 2 ∑ i = 1 n ( x i − μ ) 2 \ell(\mu, \sigma^2) = -\frac{n}{2}\log(2\pi) - \frac{n}{2}\log(\sigma^2) - \frac{1}{2\sigma^2}\sum_{i=1}^n (x_i - \mu)^2 ℓ ( μ , σ 2 ) = − 2 n log ( 2 π ) − 2 n log ( σ 2 ) − 2 σ 2 1 ∑ i = 1 n ( x i − μ ) 2
∂ ℓ ∂ μ = 1 σ 2 ∑ i = 1 n ( x i − μ ) = 0 ⟹ μ ^ = x ˉ \frac{\partial \ell}{\partial \mu} = \frac{1}{\sigma^2}\sum_{i=1}^n (x_i - \mu) = 0 \implies \hat{\mu} = \bar{x} ∂ μ ∂ ℓ = σ 2 1 ∑ i = 1 n ( x i − μ ) = 0 ⟹ μ ^ = x ˉ
∂ ℓ ∂ σ 2 = − n 2 σ 2 + 1 2 ( σ 2 ) 2 ∑ i = 1 n ( x i − μ ) 2 = 0 \frac{\partial \ell}{\partial \sigma^2} = -\frac{n}{2\sigma^2} + \frac{1}{2(\sigma^2)^2}\sum_{i=1}^n (x_i - \mu)^2 = 0 ∂ σ 2 ∂ ℓ = − 2 σ 2 n + 2 ( σ 2 ) 2 1 ∑ i = 1 n ( x i − μ ) 2 = 0
Substituting μ ^ = x ˉ \hat{\mu} = \bar{x} μ ^ = x ˉ : σ ^ 2 = 1 n ∑ i = 1 n ( x i − x ˉ ) 2 \hat{\sigma}^2 = \frac{1}{n}\sum_{i=1}^n (x_i - \bar{x})^2 σ ^ 2 = n 1 ∑ i = 1 n ( x i − x ˉ ) 2 .
To check bias: E [ σ ^ 2 ] = E [ n − 1 n S 2 ] = n − 1 n σ 2 ≠ σ 2 E[\hat{\sigma}^2] = E\left[\frac{n-1}{n} S^2\right] = \frac{n-1}{n} \sigma^2 \neq \sigma^2 E [ σ ^ 2 ] = E [ n n − 1 S 2 ] = n n − 1 σ 2 = σ 2 .
The bias is − σ 2 / n -\sigma^2/n − σ 2 / n . ■ \blacksquare ■
If you get this wrong, revise: Section 7.2 (MLE Procedure).
Problem 20. Use the delta method to find the asymptotic distribution of p ^ ( 1 − p ^ ) \hat{p}(1 - \hat{p}) p ^ ( 1 − p ^ ) where p ^ = 1 n ∑ i = 1 n X i \hat{p} = \frac{1}{n}\sum_{i=1}^n X_i p ^ = n 1 ∑ i = 1 n X i and X i ∼ B e r n o u l l i ( p ) X_i \sim \mathrm{Bernoulli}(p) X i ∼ Bernoulli ( p ) .
Solution By the CLT, n ( p ^ − p ) → d N ( 0 , p ( 1 − p ) ) \sqrt{n}(\hat{p} - p) \xrightarrow{d} N(0, p(1-p)) n ( p ^ − p ) d N ( 0 , p ( 1 − p )) .
Let g ( t ) = t ( 1 − t ) = t − t 2 g(t) = t(1 - t) = t - t^2 g ( t ) = t ( 1 − t ) = t − t 2 . Then g ′ ( t ) = 1 − 2 t g'(t) = 1 - 2t g ′ ( t ) = 1 − 2 t So g ′ ( p ) = 1 − 2 p g'(p) = 1 - 2p g ′ ( p ) = 1 − 2 p .
By the delta method:
n ( p ^ ( 1 − p ^ ) − p ( 1 − p ) ) → d N ( 0 , p ( 1 − p ) ( 1 − 2 p ) 2 ) \sqrt{n}\left(\hat{p}(1 - \hat{p}) - p(1 - p)\right) \xrightarrow{d} N(0, p(1 - p)(1 - 2p)^2) n ( p ^ ( 1 − p ^ ) − p ( 1 − p ) ) d N ( 0 , p ( 1 − p ) ( 1 − 2 p ) 2 )
If you get this wrong, revise: Section 6.5 (Delta Method) and Section 6.3 (CLT).
Problem 21. Let X 1 , … , X n X_1, \ldots, X_n X 1 , … , X n be i.i.d. From a distribution with finite mean μ \mu μ and finite variance σ 2 \sigma^2 σ 2 . Show that the sample mean is a consistent estimator of μ \mu μ using Chebyshev’s inequality.
Solution E [ X ˉ n ] = μ E[\bar{X}_n] = \mu E [ X ˉ n ] = μ (unbiased) and V a r ( X ˉ n ) = σ 2 / n \mathrm{Var}(\bar{X}_n) = \sigma^2/n Var ( X ˉ n ) = σ 2 / n .
By Chebyshev’s inequality, for any ε > 0 \varepsilon \gt 0 ε > 0 :
P ( ∣ X ˉ n − μ ∣ ≥ ε ) ≤ V a r ( X ˉ n ) ε 2 = σ 2 n ε 2 P(|\bar{X}_n - \mu| \geq \varepsilon) \leq \frac{\mathrm{Var}(\bar{X}_n)}{\varepsilon^2} = \frac{\sigma^2}{n\varepsilon^2} P ( ∣ X ˉ n − μ ∣ ≥ ε ) ≤ ε 2 Var ( X ˉ n ) = n ε 2 σ 2
As n → ∞ n \to \infty n → ∞ The right side goes to 0, so X ˉ n → p μ \bar{X}_n \xrightarrow{p} \mu X ˉ n p μ . ■ \blacksquare ■
If you get this wrong, revise: Section 6.2 (Law of Large Numbers).
Problem 22. A random sample of size 64 is drawn from a population with unknown mean and standard deviation σ = 4 \sigma = 4 σ = 4 . Find the probability that the sample mean differs from the population mean by more than 1.
Solution By the CLT, X ˉ ≈ N ( μ , σ 2 / n ) = N ( μ , 16 / 64 ) = N ( μ , 1 / 4 ) \bar{X} \approx N(\mu, \sigma^2/n) = N(\mu, 16/64) = N(\mu, 1/4) X ˉ ≈ N ( μ , σ 2 / n ) = N ( μ , 16/64 ) = N ( μ , 1/4 ) .
P ( ∣ X ˉ − μ ∣ > 1 ) = P ( ∣ X ˉ − μ 0.5 ∣ > 2 ) = P ( ∣ Z ∣ > 2 ) = 2 ( 1 − Φ ( 2 ) ) ≈ 2 ( 0.0228 ) = 0.0456 P(|\bar{X} - \mu| \gt 1) = P\left(\left|\frac{\bar{X} - \mu}{0.5}\right| \gt 2\right) = P(|Z| \gt 2) = 2(1 - \Phi(2)) \approx 2(0.0228) = 0.0456 P ( ∣ X ˉ − μ ∣ > 1 ) = P ( 0.5 X ˉ − μ > 2 ) = P ( ∣ Z ∣ > 2 ) = 2 ( 1 − Φ ( 2 )) ≈ 2 ( 0.0228 ) = 0.0456
If you get this wrong, revise: Section 6.3 (CLT).
Problem 23. Let X X X and Y Y Y have joint PDF f ( x , y ) = e − x − y f(x, y) = e^{-x - y} f ( x , y ) = e − x − y for x > 0 , y > 0 x \gt 0, y \gt 0 x > 0 , y > 0 . Compute E [ X ∣ Y = y ] E[X \mid Y = y] E [ X ∣ Y = y ] And verify the law of iterated expectations.
Solution The marginal of Y Y Y : f Y ( y ) = ∫ 0 ∞ e − x − y d x = e − y f_Y(y) = \int_0^{\infty} e^{-x-y}\, dx = e^{-y} f Y ( y ) = ∫ 0 ∞ e − x − y d x = e − y So Y ∼ E x p ( 1 ) Y \sim \mathrm{Exp}(1) Y ∼ Exp ( 1 ) .
The conditional PDF: f X ∣ Y ( x ∣ y ) = e − x − y e − y = e − x f_{X \mid Y}(x \mid y) = \frac{e^{-x-y}}{e^{-y}} = e^{-x} f X ∣ Y ( x ∣ y ) = e − y e − x − y = e − x for x > 0 x \gt 0 x > 0 .
Note that f X ∣ Y ( x ∣ y ) f_{X \mid Y}(x \mid y) f X ∣ Y ( x ∣ y ) does not depend on y y y Confirming X X X and Y Y Y are independent.
E [ X ∣ Y = y ] = ∫ 0 ∞ x e − x d x = 1 E[X \mid Y = y] = \int_0^{\infty} x\, e^{-x}\, dx = 1 E [ X ∣ Y = y ] = ∫ 0 ∞ x e − x d x = 1
By the law of iterated expectations: E [ E [ X ∣ Y ] ] = E [ 1 ] = 1 = E [ X ] E[E[X \mid Y]] = E[1] = 1 = E[X] E [ E [ X ∣ Y ]] = E [ 1 ] = 1 = E [ X ] (since X ∼ E x p ( 1 ) X \sim \mathrm{Exp}(1) X ∼ Exp ( 1 ) ). ■ \blacksquare ■
If you get this wrong, revise: Section 5.3 (Conditional Distributions) and Section 5.3 (Tower Property).
Problem 24. Let X ∼ N ( 0 , 1 ) X \sim N(0, 1) X ∼ N ( 0 , 1 ) and Y ∼ N ( 0 , 1 ) Y \sim N(0, 1) Y ∼ N ( 0 , 1 ) be independent. Show that X / Y X/Y X / Y follows a Cauchy Distribution.
Solution We use the Jacobian method. Let U = X / Y U = X/Y U = X / Y and V = Y V = Y V = Y . Then X = U V X = UV X = U V , Y = V Y = V Y = V with Jacobian ∣ J ∣ = ∣ v ∣ |J| = |v| ∣ J ∣ = ∣ v ∣ .
f U , V ( u , v ) = 1 2 π e − ( u v ) 2 / 2 e − v 2 / 2 ∣ v ∣ = ∣ v ∣ 2 π e − v 2 ( u 2 + 1 ) / 2 f_{U,V}(u,v) = \frac{1}{2\pi} e^{-(uv)^2/2}\, e^{-v^2/2}\, |v| = \frac{|v|}{2\pi} e^{-v^2(u^2 + 1)/2} f U , V ( u , v ) = 2 π 1 e − ( uv ) 2 /2 e − v 2 /2 ∣ v ∣ = 2 π ∣ v ∣ e − v 2 ( u 2 + 1 ) /2
Integrating out v v v :
f U ( u ) = ∫ − ∞ ∞ ∣ v ∣ 2 π e − v 2 ( 1 + u 2 ) / 2 d v = 1 π ∫ 0 ∞ v e − v 2 ( 1 + u 2 ) / 2 d v f_U(u) = \int_{-\infty}^{\infty} \frac{|v|}{2\pi} e^{-v^2(1+u^2)/2}\, dv = \frac{1}{\pi} \int_0^{\infty} v\, e^{-v^2(1+u^2)/2}\, dv f U ( u ) = ∫ − ∞ ∞ 2 π ∣ v ∣ e − v 2 ( 1 + u 2 ) /2 d v = π 1 ∫ 0 ∞ v e − v 2 ( 1 + u 2 ) /2 d v
Let w = v 2 ( 1 + u 2 ) / 2 w = v^2(1+u^2)/2 w = v 2 ( 1 + u 2 ) /2 So d w = v ( 1 + u 2 ) d v dw = v(1+u^2)\, dv d w = v ( 1 + u 2 ) d v :
f U ( u ) = 1 π ( 1 + u 2 ) ∫ 0 ∞ e − w d w = 1 π ( 1 + u 2 ) f_U(u) = \frac{1}{\pi(1+u^2)} \int_0^{\infty} e^{-w}\, dw = \frac{1}{\pi(1+u^2)} f U ( u ) = π ( 1 + u 2 ) 1 ∫ 0 ∞ e − w d w = π ( 1 + u 2 ) 1
This is the standard Cauchy distribution. Note that E [ ∣ X / Y ∣ ] = ∞ E[|X/Y|] = \infty E [ ∣ X / Y ∣ ] = ∞ So the mean does not exist. ■ \blacksquare ■
If you get this wrong, revise: Section 5.6 (Jacobian Method).
Problem 25. Prove that for any events A , B , C A, B, C A , B , C :
P ( A ∩ B ∩ C ) = P ( A ) P ( B ∣ A ) P ( C ∣ A ∩ B ) P(A \cap B \cap C) = P(A)\, P(B \mid A)\, P(C \mid A \cap B) P ( A ∩ B ∩ C ) = P ( A ) P ( B ∣ A ) P ( C ∣ A ∩ B )
Solution By the definition of conditional probability applied twice:
P ( B ∩ C ∣ A ) = P ( A ∩ B ∩ C ) P ( A ) P(B \cap C \mid A) = \frac{P(A \cap B \cap C)}{P(A)} P ( B ∩ C ∣ A ) = P ( A ) P ( A ∩ B ∩ C )
P ( C ∣ A ∩ B ) = P ( A ∩ B ∩ C ) P ( A ∩ B ) P(C \mid A \cap B) = \frac{P(A \cap B \cap C)}{P(A \cap B)} P ( C ∣ A ∩ B ) = P ( A ∩ B ) P ( A ∩ B ∩ C )
From the second: P ( A ∩ B ∩ C ) = P ( C ∣ A ∩ B ) P ( A ∩ B ) P(A \cap B \cap C) = P(C \mid A \cap B)\, P(A \cap B) P ( A ∩ B ∩ C ) = P ( C ∣ A ∩ B ) P ( A ∩ B ) . And P ( A ∩ B ) = P ( B ∣ A ) P ( A ) P(A \cap B) = P(B \mid A)\, P(A) P ( A ∩ B ) = P ( B ∣ A ) P ( A ) .
Substituting: P ( A ∩ B ∩ C ) = P ( A ) P ( B ∣ A ) P ( C ∣ A ∩ B ) P(A \cap B \cap C) = P(A)\, P(B \mid A)\, P(C \mid A \cap B) P ( A ∩ B ∩ C ) = P ( A ) P ( B ∣ A ) P ( C ∣ A ∩ B ) . ■ \blacksquare ■
This is the chain rule of probability , which generalises to n n n events.
If you get this wrong, revise: Section 1.5 (Conditional Probability).
Problem 26. Show that the Poisson distribution is infinitely divisible: if X ∼ P o i s s o n ( λ ) X \sim \mathrm{Poisson}(\lambda) X ∼ Poisson ( λ ) Then X X X can be expressed as the sum of n n n i.i.d. Random variables for any positive integer n n n .
Solution The MGF of X ∼ P o i s s o n ( λ ) X \sim \mathrm{Poisson}(\lambda) X ∼ Poisson ( λ ) is M X ( t ) = exp ( λ ( e t − 1 ) ) M_X(t) = \exp(\lambda(e^t - 1)) M X ( t ) = exp ( λ ( e t − 1 )) .
For any integer n ≥ 1 n \geq 1 n ≥ 1 We can write:
M X ( t ) = [ exp ( λ n ( e t − 1 ) ) ] n M_X(t) = \left[\exp\left(\frac{\lambda}{n}(e^t - 1)\right)\right]^n M X ( t ) = [ exp ( n λ ( e t − 1 ) ) ] n
Each factor exp ( λ n ( e t − 1 ) ) \exp\left(\frac{\lambda}{n}(e^t - 1)\right) exp ( n λ ( e t − 1 ) ) is the MGF of P o i s s o n ( λ / n ) \mathrm{Poisson}(\lambda/n) Poisson ( λ / n ) . Therefore X = Y 1 + ⋯ + Y n X = Y_1 + \cdots + Y_n X = Y 1 + ⋯ + Y n where Y i ∼ P o i s s o n ( λ / n ) Y_i \sim \mathrm{Poisson}(\lambda/n) Y i ∼ Poisson ( λ / n ) are i.i.d. ■ \blacksquare ■
If you get this wrong, revise: Section 4.3 (MGFs) and Section 3.1 (Poisson Distribution).
Dropping negative signs during algebraic manipulation. Substitute back to verify your answer.
Confusing the domain and range of functions, or not considering restrictions (e.g., denominator cannot be zero).
Confusing P ( A ∣ B ) P(A|B) P ( A ∣ B ) with P ( B ∣ A ) P(B|A) P ( B ∣ A ) . These are related by Bayes’ theorem but are not equal in general.
Problem. Given i.i.d. samples x 1 , … , x n x_1, \ldots, x_n x 1 , … , x n from X ∼ N ( μ , σ 2 ) X \sim N(\mu, \sigma^2) X ∼ N ( μ , σ 2 ) , find the MLE for μ \mu μ and σ 2 \sigma^2 σ 2 .
Solution. Log-likelihood:
ℓ ( μ , σ 2 ) = − n 2 ln ( 2 π ) − n 2 ln σ 2 − 1 2 σ 2 ∑ i = 1 n ( x i − μ ) 2 \ell(\mu, \sigma^2) = -\frac{n}{2}\ln(2\pi) - \frac{n}{2}\ln\sigma^2 - \frac{1}{2\sigma^2}\sum_{i=1}^n (x_i - \mu)^2 ℓ ( μ , σ 2 ) = − 2 n ln ( 2 π ) − 2 n ln σ 2 − 2 σ 2 1 ∑ i = 1 n ( x i − μ ) 2
∂ ℓ ∂ μ = 1 σ 2 ∑ ( x i − μ ) = 0 ⇒ μ ^ = x ˉ \frac{\partial \ell}{\partial \mu} = \frac{1}{\sigma^2}\sum(x_i - \mu) = 0 \Rightarrow \hat{\mu} = \bar{x} ∂ μ ∂ ℓ = σ 2 1 ∑ ( x i − μ ) = 0 ⇒ μ ^ = x ˉ .
∂ ℓ ∂ σ 2 = − n 2 σ 2 + 1 2 σ 4 ∑ ( x i − μ ) 2 = 0 ⇒ σ ^ 2 = 1 n ∑ ( x i − x ˉ ) 2 \frac{\partial \ell}{\partial \sigma^2} = -\frac{n}{2\sigma^2} + \frac{1}{2\sigma^4}\sum(x_i - \mu)^2 = 0 \Rightarrow \hat{\sigma}^2 = \frac{1}{n}\sum(x_i - \bar{x})^2 ∂ σ 2 ∂ ℓ = − 2 σ 2 n + 2 σ 4 1 ∑ ( x i − μ ) 2 = 0 ⇒ σ ^ 2 = n 1 ∑ ( x i − x ˉ ) 2 .
Note: σ ^ 2 \hat{\sigma}^2 σ ^ 2 is biased (divide by n n n ); unbiased version divides by n − 1 n-1 n − 1 .
■ \blacksquare ■
Problem. A fair die is rolled 100 times. Use the CLT to approximate P ( X ˉ > 3.7 ) P(\bar{X} > 3.7) P ( X ˉ > 3.7 ) .
Solution. For a fair die: μ = 3.5 \mu = 3.5 μ = 3.5 , σ 2 = 35 12 = 2.917 \sigma^2 = \frac{35}{12} = 2.917 σ 2 = 12 35 = 2.917 , σ = 1.708 \sigma = 1.708 σ = 1.708 .
By CLT: X ˉ ≈ N ( μ , σ 2 / n ) \bar{X} \approx N(\mu, \sigma^2/n) X ˉ ≈ N ( μ , σ 2 / n ) , so SE = 0.1708 \text{SE} = 0.1708 SE = 0.1708 .
P ( X ˉ > 3.7 ) = P ( Z > 3.7 − 3.5 0.1708 ) = P ( Z > 1.17 ) = 1 − Φ ( 1.17 ) = 0.121 P(\bar{X} > 3.7) = P\left(Z > \frac{3.7 - 3.5}{0.1708}\right) = P(Z > 1.17) = 1 - \Phi(1.17) = 0.121 P ( X ˉ > 3.7 ) = P ( Z > 0.1708 3.7 − 3.5 ) = P ( Z > 1.17 ) = 1 − Φ ( 1.17 ) = 0.121
■ \blacksquare ■
Probability axioms: non-negativity, normalisation, additivity for disjoint events; conditional probability and Bayes’ theorem. Distributions: discrete (Binomial, Poisson, Geometric) and continuous (Normal, Exponential, Gamma); know mean, variance, and MGF. Estimation: MLE maximises likelihood function; method of moments equates sample and population moments. Hypothesis testing: null/alternative hypotheses, test statistic, p-value, significance level; Type I/II errors and power. Central Limit Theorem: sample mean of i.i.d. variables is approximately normal for large n n n , regardless of the underlying distribution. Topic Site Link Probability WyattsNotes View Real Analysis WyattsNotes View Differential Equations WyattsNotes View Statistics — Stanford CS229 Stanford View