A First Course in Probability

1. Introduction and combinatorial analysis (part 1)

This section introduces combinatorial analysis, the mathematical theory of counting, which is foundational for solving many problems in probability theory by determining the number of ways events can occur.

1.2 The basic principle of counting

The fundamental tool for solving counting problems is the basic principle of counting, which deals with performing sequential experiments.

Basic principle of counting (Two experiments)

If the first experiment can result in mm possible outcomes, and for each outcome of the first experiment, the second experiment can result in nn possible outcomes, then the total number of outcomes for the two experiments performed sequentially is m⋅nm \cdot n.

Example: Choosing one woman from 10 and one of her children from 3 results in 10×3=3010 \times 3 = 30 possible choices.

Generalized basic principle of counting (r experiments)

If rr experiments are performed sequentially, such that the first has n1n_1 outcomes, the second has n2n_2 outcomes for each outcome of the first, and so on, the total number of outcomes is the product of the outcomes for each step: n1⋅n2⋅…⋅nrn_1 \cdot n_2 \cdot \ldots \cdot n_r This principle applies to scenarios like forming committees or constructing license plates where choices are made sequentially from distinct categories 17.

Example: Forming a 7-place license plate with 3 letters (26 choices each) followed by 4 numbers (10 choices each) yields 26⋅26⋅26⋅10⋅10⋅10⋅10=175,760,00026 \cdot 26 \cdot 26 \cdot 10 \cdot 10 \cdot 10 \cdot 10 = 175,760,000 possibilities. If repetition is prohibited for numbers, the count becomes 26⋅25⋅24⋅10⋅9⋅8⋅7=78,624,00026 \cdot 25 \cdot 24 \cdot 10 \cdot 9 \cdot 8 \cdot 7 = 78,624,000.

1.3 Permutations

A permutation is an ordered arrangement of objects. The number of distinct permutations of nn distinguishable objects is n!n! (n factorial) 18. n!=n(n−1)(n−2)⋯3⋅2⋅1n! = n(n-1)(n-2) \cdots 3 \cdot 2 \cdot 1

Tip: If we are ranking nn distinct people, the number of possible rankings is n!n!.

Permutations with indistinguishable objects

If we have nn objects in total, but n1n_1 are alike, n2n_2 are alike, …\ldots, nrn_r are alike (where n1+n2+⋯+nr=nn_1 + n_2 + \cdots + n_r = n), the number of distinct permutations is given by the multinomial coefficient formula: n!n1!n2!⋯nr!\frac{n!}{n_1! n_2! \cdots n_r!}

Example: The number of distinct letter arrangements from PEPPER (6 letters total: 3 P's, 2 E's, 1 R) is 6!3!2!1!=60\frac{6!}{3! 2! 1!} = 60 19.

1.4 Combinations

A combination is a selection of rr objects from a set of nn objects where the order of selection is not relevant.

The number of different groups of rr objects that can be formed from nn objects is calculated by taking the number of ordered selections of rr items from nn (which is n(n−1)⋯(n−r+1)n(n-1) \cdots (n-r+1)) and dividing by the number of ways to order those rr items (r!r!), since order does not matter.

This is denoted by (nr)\binom{n}{r} or C(n,r)C(n, r), and the formula is: (nr)=n(n−1)⋯(n−r+1)r!=n!(n−r)!r!\binom{n}{r} = \frac{n(n-1) \cdots (n-r+1)}{r!} = \frac{n!}{(n-r)! r!}

Example: The number of ways to select a group of 3 items from 5 (A, B, C, D, E) when order is irrelevant is 5⋅4⋅33⋅2⋅1=10\frac{5 \cdot 4 \cdot 3}{3 \cdot 2 \cdot 1} = 10 20.

2. Introduction and combinatorial analysis (part 2)

This section covers the formal definitions and applications of combinations, multinomial coefficients, and finding the number of integer solutions to linear equations, concluding the foundational combinatorial analysis from Chapter 1.

2.1 Combinations and binomial coefficients

The notation (nr)\binom{n}{r} (read "nn choose rr") represents the number of possible combinations of nn objects taken rr at a time, where the order of selection is not considered relevant.

The formula for combinations is: (nr)=n!(n−r)!r!\binom{n}{r} = \frac{n!}{(n - r)! r!}

By convention:

  • 0!0! is defined as 1.
  • (n0)=(nn)=1\binom{n}{0} = \binom{n}{n} = 1.
  • (ni)=0\binom{n}{i} = 0 if i<0i < 0 or i>ni > n.

Example: Forming a committee of 3 from 20 people yields (203)=20⋅19⋅183⋅2⋅1=1140\binom{20}{3} = \frac{20 \cdot 19 \cdot 18}{3 \cdot 2 \cdot 1} = 1140 possibilities.

When forming multiple independent groups, the basic counting principle is applied multiplicatively. For a committee of 2 women from 5 and 3 men from 7, the possibilities are (52)(73)=10⋅35=350\binom{5}{2}\binom{7}{3} = 10 \cdot 35 = 350 21.

The combination formula is central to solving arrangement problems with constraints, such as ensuring no two defective items are consecutive among functional items. If n−mn-m functional items are arranged, there are n−m+1n-m+1 potential spaces (including ends) where defective items can be placed, at most one per space, resulting in (n−m+1m)\binom{n - m + 1}{m} orderings.

2.2 Combinatorial identity and the Binomial Theorem

A fundamental combinatorial identity relates binomial coefficients: (nr)=(n−1r−1)+(n−1r)(4.1)\binom{n}{r} = \binom{n - 1}{r - 1} + \binom{n - 1}{r} \quad (4.1) This identity is proven by considering a specific object: (n−1r−1)\binom{n-1}{r-1} counts groups including that object, and (n−1r)\binom{n-1}{r} counts groups excluding it 22.

These values are the binomial coefficients used in the Binomial Theorem: (x+y)n=∑k=0n(nk)xkyn−k(4.2)(x + y)^n = \sum_{k=0}^{n} \binom{n}{k} x^k y^{n-k} \quad (4.2) The theorem can be proven combinatorially by considering the expansion of (x1+y1)(x2+y2)⋯(xn+yn)(x_1 + y_1)(x_2 + y_2) \cdots (x_n + y_n). The coefficient of a term with kk factors of xix_i and n−kn-k factors of yiy_i corresponds to choosing kk positions out of nn, giving (nk)\binom{n}{k} such terms 23.

Application Example: The number of subsets of a set with nn elements is ∑k=0n(nk)=(1+1)n=2n\sum_{k=0}^{n} \binom{n}{k} = (1+1)^n = 2^n. The number of non-empty subsets is 2n−12^n - 1.

2.3 Multinomial coefficients

The multinomial coefficient addresses dividing nn distinct items into rr distinct groups of predetermined sizes n1,n2,…,nrn_1, n_2, \ldots, n_r, where ∑i=1rni=n\sum_{i=1}^{r} n_i = n 24.

The notation is defined as: (nn1,n2,…,nr)=n!n1!n2!⋯nr!\binom{n}{n_1, n_2, \ldots, n_r} = \frac{n!}{n_1! n_2! \cdots n_r!} This counts the number of possible divisions.

This result is equivalent to the number of permutations of nn items where nin_i items are indistinguishable repetitions of type ii.

Example: Dividing 10 officers into 3 distinct groups (5 patrolling, 2 station full-time, 3 reserve) yields 10!5!2!3!=2520\frac{10!}{5! 2! 3!} = 2520 divisions.

If the destination groups are indistinguishable, the result must be divided by the factorial of the number of groups of equal size. For dividing 10 children into two indistinguishable teams of 5, the result is 10!5!5!2!=126\frac{10!}{5! 5! 2!} = 126 25.

2.4 The Multinomial Theorem

The multinomial theorem generalizes the binomial theorem: (x1+x2+⋯+xr)n=∑(n1,…,nr):n1+⋯+nr=n(nn1,n2,…,nr)x1n1x2n2⋯xrnr(x_1 + x_2 + \cdots + x_r)^n = \sum_{(n_1, \ldots, n_r): n_1 + \cdots + n_r = n} \binom{n}{n_1, n_2, \ldots, n_r} x_1^{n_1} x_2^{n_2} \cdots x_r^{n_r} The sum is over all non-negative integer vectors (n1,…,nr)(n_1, \ldots, n_r) summing to nn.

Tournament Example: For an 8-player knockout tournament, the number of outcomes for the initial round (dividing 8 players into 4 unordered pairs) is calculated by accounting for ordered pairings ((82,2,2,2)=8!/24\binom{8}{2, 2, 2, 2} = 8!/2^4) and then removing the ordering of the 4 resulting pairs: 8!244!=8!4!\frac{8!}{2^4 4!} = \frac{8!}{4!} results for Round 1 The total number of outcomes for the entire tournament with n=2mn=2^m players is n!n! 26.

2.5 The number of integer solutions of equations

This topic, sometimes denoted by asterisks indicating optional material, concerns distributing indistinguishable items into distinguishable urns, which translates to finding the number of non-negative integer solutions to an equation 27.

The problem is finding the number of solutions to: x1+x2+⋯+xr=n,xi≥0x_1 + x_2 + \cdots + x_r = n, \quad x_i \ge 0

2.6 Positive Integer Solutions

The number of positive integer solutions (xi>0x_i > 0) to x1+x2+⋯+xr=nx_1 + x_2 + \cdots + x_r = n is found by placing r−1r-1 dividers in the n−1n-1 spaces between nn lined-up indistinguishable objects (stars and bars method).

Proposition 6.1 (Positive Solutions): There are (n−1r−1)\binom{n - 1}{r - 1} distinct positive integer-valued vectors satisfying the equation x1+x2+⋯+xr=nx_1 + x_2 + \cdots + x_r = n with xi>0x_i > 0 for all ii.

2.7 Nonnegative Integer Solutions

The number of nonnegative integer solutions (xi≥0x_i \ge 0) is equivalent to the number of positive solutions for y1+⋯+yr=n+ry_1 + \cdots + y_r = n + r, by letting yi=xi+1y_i = x_i + 1.

Proposition 6.2 (Nonnegative Solutions): There are (n+r−1r−1)\binom{n + r - 1}{r - 1} distinct nonnegative integer-valued vectors satisfying the equation: x1+x2+⋯+xr=n(6.1)x_1 + x_2 + \cdots + x_r = n \quad (6.1)

Example: Solutions to x1+x2=3x_1 + x_2 = 3 (n=3,r=2n=3, r=2) are (3+2−12−1)=(41)=4\binom{3 + 2 - 1}{2 - 1} = \binom{4}{1} = 4: (0, 3), (1, 2), (2, 1), (3, 0) 28.

This concept also determines the number of terms in a multinomial expansion (x1+x2+⋯+xr)n(x_1 + x_2 + \cdots + x_r)^n. The number of terms is the number of ways to choose non-negative exponents n1,…,nrn_1, \ldots, n_r such that ∑ni=n\sum n_i = n, which is (n+r−1r−1)\binom{n + r - 1}{r - 1}.

The structure of constraints on integer solutions can be reduced to standard forms using substitution techniques based on these propositions 29 30.

This section summarizes advanced combinatorial problems and self-test exercises covering permutations, combinations, integer solutions to equations, and multinomial coefficients derived from the foundational principles of combinatorial analysis.

2.8 Advanced Combinatorial Exercises (Problems 18-23)

This subsection details several challenging theoretical and applied combinatorial problems focusing on partitions, solutions to equations, and partial derivatives, primarily drawn from theoretical exercises.

  • Identity involving Multinomial Coefficients (Problem 18): An identity relating multinomial coefficients is presented, which should be argued using a technique similar to establishing a specific Equation (4.1) (likely the Pascal's Identity analogy for combinations): (nn1,n2,…,nr)=(n−1n1−1,n2,…,nr)+(n−1n1,n2−1,…,nr)+⋯+(n−1n1,n2,…,nr−1)\binom{n}{n_1, n_2, \dots, n_r} = \binom{n - 1}{n_1 - 1, n_2, \dots, n_r} + \binom{n - 1}{n_1, n_2 - 1, \dots, n_r} + \cdots + \binom{n - 1}{n_1, n_2, \dots, n_r - 1}

  • Multinomial Theorem (Problem 19): Requires a formal proof of the multinomial theorem.

  • Distribution of Identical Balls into Urns with Minimum Constraints (Problem 20): Determine the number of ways to distribute nn identical balls into rr urns such that the ii-th urn contains at least mim_i balls, assuming n≥∑i=1rmin \ge \sum_{i=1}^{r} m_i.

  • Counting Solutions with Exact Zeroes (Problem 21): Argue the exact number of solutions to x1+x2+⋯+xr=nx_1 + x_2 + \cdots + x_r = n, where xix_i are non-negative integers, for which exactly kk of the xix_i variables are equal to zero. The stated number of solutions is: (rk)(n−1n−r+k)\binom{r}{k}\binom{n - 1}{n - r + k}

  • Partial Derivatives (Problem 22): Determine the total count of different partial derivatives of order rr possessed by a function f(x1,…,xn)f(x_1, \dots, x_n) of nn variables. This relates to combinations with repetition, where the order of differentiation does not matter.

  • Integer Solutions Summing to ≤k\le k (Problem 23): Determine the number of vectors (x1,…,xn)(x_1, \dots, x_n) such that each xix_i is a non-negative integer and the sum satisfies: ∑i=1nxi≤k\sum_{i=1}^{n} x_i \le k

2.9 Self-Test Problems: Permutations and Simple Selections (Problems 1-6)

These problems cover basic linear arrangements (permutations) and straightforward selections (combinations) involving constraints.

  • Linear Arrangements with Constraints (Problem 1): Arrangements of the letters A, B, C, D, E, F (6 distinct items).

    • (a) A and B adjacent: Treat (AB) or (BA) as a single unit. Total arrangements: 2!×5!2! \times 5!.
    • (b) A before B: By symmetry, exactly half of all arrangements will have A before B. Total arrangements: 6!2\frac{6!}{2}.
    • (c) A before B and B before C (i.e., A before B before C): By symmetry, 13!\frac{1}{3!} of all arrangements satisfy this ordering constraint. Total arrangements: 6!3!=60\frac{6!}{3!} = 60.
    • (d) A before B and C before D: Since the constraints are independent for the pairs (A, B) and (C, D), the fraction of arrangements satisfying both is 12×12=14\frac{1}{2} \times \frac{1}{2} = \frac{1}{4}. Total arrangements: 6!4=180\frac{6!}{4} = 180.
    • (e) A and B adjacent AND C and D adjacent: Treat (AB) and (CD) as units. Total arrangements: 2!×2!×4!2! \times 2! \times 4!.
    • (f) E is not last: Total arrangements minus arrangements where E is last. 6!−5!=5×5!=6006! - 5! = 5 \times 5! = 600.
  • Arrangement by Nationality (Problem 2): Seating 4 Americans (A), 3 French (F), and 3 British (B) where nationalities must sit together.

    • Treat each nationality group as a block. Arrange the blocks: 3!3! ways.
    • Arrange individuals within each block: 4!×3!×3!4! \times 3! \times 3! ways.
    • Total ways: 3!×4!×3!×3!=6×24×6×6=51843! \times 4! \times 3! \times 3! = 6 \times 24 \times 6 \times 6 = 5184.
  • Officer Selection (Problem 3): Choosing a President, Treasurer, and Secretary (ordered positions, P(10,3)P(10, 3) total without restrictions) from 10 people.

    • (a) No restrictions: P(10,3)=10×9×8=720P(10, 3) = 10 \times 9 \times 8 = 720 choices.
    • (b) A and B will not serve together: Total minus cases where A and B are both officers. If A and B are officers, the third officer can be chosen in 8 ways. If A is P and B is T (or vice versa), there are 2 ways to assign P/T positions to A/B, and 8 choices for the remaining position. Total ways involving both A and B: 2×2×8=322 \times 2 \times 8 = 32 (if we consider A, B, X in any order for P, T, S). A simpler approach is to count permutations of {A, B, X} in the 3 slots: 3!×(81)3! \times \binom{8}{1} ways to choose X, and 2!2! ways to place A and B relative to X if they are restricted to two specific slots. The easiest is P(10,3)−(cases with A and B)P(10, 3) - (\text{cases with A and B}). Cases with A and B: Choose 2 positions for A and B (P(3,2)P(3, 2) ways), choose the third person (8 ways). P(3,2)×8=6×8=48P(3, 2) \times 8 = 6 \times 8 = 48 ways where A and B are both officers. Result: 720−48=672720 - 48 = 672.
    • (c) C and D serve together or not at all: This implies either both C and D are officers, or neither is. The complement approach is usually cleaner: Total - (Exactly one of C, D is an officer). If C is an officer and D is not: Choose position for C (3 ways), choose person for the other 2 positions from the 8 non-D people (P(8,2)P(8, 2) ways). 3×P(8,2)=3×56=1683 \times P(8, 2) = 3 \times 56 = 168. Similarly for D being the officer (168168). Cases where both serve: 4848 (from part b logic, switching A/B to C/D). Total cases: 48+168+168=38448 + 168 + 168 = 384. Wait, the instruction is simpler: either C∈{P,T,S}C \in \{P, T, S\} and D∈{P,T,S}D \in \{P, T, S\} OR {C,D}∩{P,T,S}=∅\{C, D\} \cap \{P, T, S\} = \emptyset. Let SCDS_{CD} be the set where both are officers, SC¬DS_{C\neg D} where C is and D is not, S¬CDS_{\neg C D} where D is and C is not, S¬C¬DS_{\neg C \neg D} where neither is. We want ∣SCD∣+∣S¬C¬D∣|S_{CD}| + |S_{\neg C \neg D}|. Total: 720720. Cases where exactly one serves: ∣SC¬D∣+∣S¬CD∣|S_{C\neg D}| + |S_{\neg C D}|. If C is P, T, or S (3 choices), the other two positions are filled by non-D people (8 choices for one slot, 7 for the other): 3×P(8,2)=1683 \times P(8, 2) = 168. Since roles for C/D are symmetric, 2×168=3362 \times 168 = 336. Result: 720−336=384720 - 336 = 384.
    • (d) E must be an officer: Choose the position for E (3 ways). The remaining 2 positions are filled from the remaining 9 people (P(9,2)P(9, 2) ways). 3×P(9,2)=3×72=2163 \times P(9, 2) = 3 \times 72 = 216.
    • (e) F will serve only if he is president: This is equivalent to: If F is NOT president, then F is NOT an officer. (i.e., ¬P  ⟹  ¬F\neg P \implies \neg F). The forbidden case is that F is an officer AND F is not president (i.e., F is Treasurer or Secretary). Total cases where F is T or S: Choose F's position (2 ways). Fill the remaining 2 slots from the remaining 9 people (P(9,2)P(9, 2) ways). 2×72=1442 \times 72 = 144. Result: 720−144=576720 - 144 = 576.
  • Exam Choices (Problem 4): Choosing 7 out of 10 questions.

    • Total choices: (107)=(103)=10×9×86=120\binom{10}{7} = \binom{10}{3} = \frac{10 \times 9 \times 8}{6} = 120.
    • If at least 3 of the first 5 must be answered: Split the 10 questions into Q1Q_1 (first 5) and Q2Q_2 (last 5). We need k1+k2=7k_1 + k_2 = 7, where k1≥3k_1 \ge 3.
      • k1=3,k2=4k_1=3, k_2=4: (53)(54)=10×5=50\binom{5}{3}\binom{5}{4} = 10 \times 5 = 50
      • k1=4,k2=3k_1=4, k_2=3: (54)(53)=5×10=50\binom{5}{4}\binom{5}{3} = 5 \times 10 = 50
      • k1=5,k2=2k_1=5, k_2=2: (55)(52)=1×10=10\binom{5}{5}\binom{5}{2} = 1 \times 10 = 10
      • Total: 50+50+10=11050 + 50 + 10 = 110 choices.
  • Gift Distribution (Problem 5): Dividing 7 distinct gifts among 3 children, where the eldest gets 3, and the other two get 2 each.

    • Choose 3 gifts for the eldest: (73)\binom{7}{3} ways.
    • Choose 2 gifts for the next child from the remaining 4: (42)\binom{4}{2} ways.
    • The last child gets the remaining 2: (22)\binom{2}{2} ways.
    • Total ways: (73)(42)(22)=35×6×1=210\binom{7}{3}\binom{4}{2}\binom{2}{2} = 35 \times 6 \times 1 = 210.
  • License Plates (Problem 6): 7-place plates with 3 letters (L) and 4 digits (D). Repetition allowed, unrestricted placement.

    • Choose the 3 positions for the letters (the remaining 4 are digits): (73)\binom{7}{3} ways.
    • Fill the 3 letter positions (26 choices each): 26326^3.
    • Fill the 4 digit positions (10 choices each): 10410^4.
    • Total ways: (73)×263×104=35×17576×10000=6,151,600,000\binom{7}{3} \times 26^3 \times 10^4 = 35 \times 17576 \times 10000 = 6,151,600,000.

2.10 Combinatorial Identities and Properties (Problems 7-9)

These exercises focus on proving or utilizing fundamental combinatorial identities.

  • Symmetry Identity (Problem 7): Provide a combinatorial explanation for the identity (nr)=(nn−r)\binom{n}{r} = \binom{n}{n-r}.

    • Argument: Choosing rr items from nn items is equivalent to choosing the n−rn-r items that will be left out.
  • n-Digit Numbers (Problem 8): nn-digit numbers using digits {0,1,…,9}\{0, 1, \dots, 9\}.

    • (a) No two consecutive digits are equal: The first digit has 9 choices (cannot be 0). Every subsequent digit has 9 choices (cannot match the preceding one). Total: 9×9n−1=9n9 \times 9^{n-1} = 9^n.
    • (b) Zero appears exactly ii times: This requires careful case analysis involving the placement of the leading non-zero digit and the remaining ii zeroes among the other n−1n-1 slots.
  • Three Classes Selection (Problem 9): Three classes, nn students each (total 3n3n students). Select a group of 3.

    • (a) Total choices: (3n3)\binom{3n}{3}.
    • (b) All 3 in the same class: Choose the class ((31)\binom{3}{1} ways), then choose 3 students from that class ((n3)\binom{n}{3} ways). Total: 3(n3)3 \binom{n}{3}.
    • (c) 2 in one class, 1 in a different class: Choose the class for the pair ((31)\binom{3}{1} ways). Choose 2 students from that class ((n2)\binom{n}{2} ways). Choose the class for the single student ((21)\binom{2}{1} ways). Choose 1 student from that class ((n1)\binom{n}{1} ways). Total: 3(n2)⋅2⋅n=6n(n2)3 \binom{n}{2} \cdot 2 \cdot n = 6n \binom{n}{2}.
    • (d) All 3 in different classes: Choose 3 distinct classes ((33)\binom{3}{3} ways). Choose 1 student from each class (n×n×n=n3n \times n \times n = n^3 ways). Total: n3n^3.
    • (e) Combinatorial Identity: The sum of parts (b), (c), and (d) must equal part (a): (3n3)=3(n3)+6n(n2)+n3\binom{3n}{3} = 3 \binom{n}{3} + 6n \binom{n}{2} + n^3

2.11 Further Self-Test Problems (Problems 10-19)

This section covers more complex selection problems involving size constraints, handling distinct item types, and arrangements with non-repetition.

  • 5-Digit Number Formation with Limited Repetition (Problem 10): Form 5-digit numbers from {1,2,…,9}\{1, 2, \dots, 9\} where no digit appears more than twice.

    • This requires analyzing cases based on the repetition structure (e.g., one digit appears twice, another appears twice, one appears once, etc.).
  • Selecting People Without Couples (Problem 11): Select 6 people from 10 married couples (20 people total) such that no married couple is selected.

    • (a) Total choices without restrictions on gender: First, select 6 couples from which to draw members, (106)\binom{10}{6}. Then, for each of the 6 chosen couples, select one person ((21)\binom{2}{1} ways for each couple). Total: (106)⋅26=210×64=13,440\binom{10}{6} \cdot 2^6 = 210 \times 64 = 13,440.
    • (b) Group must have 3 men (M) and 3 women (W): First, select 3 couples from which the men will be chosen ((103)\binom{10}{3}). Select 3 women from the remaining 7 couples ((73)\binom{7}{3}). This approach is flawed due to interdependence. A better way: Select 3 men from 10 available men, (103)\binom{10}{3}. Select 3 women from 10 available women, (103)\binom{10}{3}. Since no couple can be formed, the selected men and selected women must not belong to the same couples. If CMC_M are the couples containing the selected men, and CWC_W are the couples containing the selected women, then ∣CM∩CW∣=0|C_M \cap C_W| = 0. The total number of couples involved is 6. Total ways: (103)(73)⋅23\binom{10}{3} \binom{7}{3} \cdot 2^3 if 3 specific couples provided the men and the other 3 provided the women. The constraint is that the 6 people chosen must come from 6 distinct couples. Select 6 couples: (106)\binom{10}{6}. From these 6 couples, select 3 men and 3 women such that no couple is formed: Choose 3 couples to supply the men ((63)\binom{6}{3}), these 3 couples supply the men. The remaining 3 couples supply the women. Total: (106)⋅(63)⋅13⋅13=210×20=4200\binom{10}{6} \cdot \binom{6}{3} \cdot 1^3 \cdot 1^3 = 210 \times 20 = 4200 35.
  • Committee Selection with Gender Constraints (Problem 12): Committee of 6 chosen from 7 men (M) and 8 women (W). Must have ≥3\ge 3 women and ≥2\ge 2 men. Since kM+kW=6k_M + k_W = 6, the constraints are kW≥3k_W \ge 3 and kM≥2k_M \ge 2.

    • If kW=3k_W=3, then kM=3k_M=3: (83)(73)=56×35=1960\binom{8}{3}\binom{7}{3} = 56 \times 35 = 1960
    • If kW=4k_W=4, then kM=2k_M=2: (84)(72)=70×21=1470\binom{8}{4}\binom{7}{2} = 70 \times 21 = 1470
    • If kW=5k_W=5, then kM=1k_M=1 (Violates kM≥2k_M \ge 2).
    • If kW=6k_W=6, then kM=0k_M=0 (Violates kM≥2k_M \ge 2).
    • Total: 1960+1470=34301960 + 1470 = 3430 different committees.
  • Art Collection Recording (Problem 13): 4 Dalis (D), 5 van Goghs (V), 6 Picassos (P). 5 collectors. Report notes only the count of works acquired by each collector. All works sold.

    • This is equivalent to finding the number of non-negative integer solutions to di+vi+pi=Nid_i + v_i + p_i = N_i (total acquired by collector ii) subject to ∑di=4\sum d_i = 4, ∑vi=5\sum v_i = 5, ∑pi=6\sum p_i = 6, where NiN_i is the total number of works collector ii acquired. This is a multi-dimensional stars and bars problem, or more directly, using the structure of finding solutions to x1+⋯+xr=nx_1 + \dots + x_r = n.
    • For Dalis: d1+⋯+d5=4d_1 + \cdots + d_5 = 4. Solutions: (4+5−15−1)=(84)=70\binom{4+5-1}{5-1} = \binom{8}{4} = 70.
    • For van Goghs: v1+⋯+v5=5v_1 + \cdots + v_5 = 5. Solutions: (5+5−15−1)=(94)=126\binom{5+5-1}{5-1} = \binom{9}{4} = 126.
    • For Picassos: p1+⋯+p5=6p_1 + \cdots + p_5 = 6. Solutions: (6+5−15−1)=(104)=210\binom{6+5-1}{5-1} = \binom{10}{4} = 210.
    • Total recorded results: 70×126×210=1,852,20070 \times 126 \times 210 = 1,852,200.
  • Positive Integer Solutions Summing to ≤k\le k (Problem 14): Determine the number of vectors (x1,…,xn)(x_1, \dots, x_n) such that xix_i are positive integers (xi≥1x_i \ge 1) and ∑i=1nxi≤k\sum_{i=1}^{n} x_i \le k, where k≥nk \ge n.

    • Introduce xi′=xi−1≥0x'_i = x_i - 1 \ge 0. The sum becomes ∑(xi′+1)≤k\sum (x'_i + 1) \le k, or ∑xi′≤k−n\sum x'_i \le k - n.
    • Using the slack variable method (equivalent to Problem 23 generalized for positive integers): The problem transforms into finding non-negative integer solutions to x1′+⋯+xn′+s=k−nx'_1 + \cdots + x'_n + s = k-n, where s≥0s \ge 0.
    • The number of solutions is ((k−n)+(n+1)−1(n+1)−1)=(kn)\binom{(k-n) + (n+1) - 1}{(n+1) - 1} = \binom{k}{n}.
  • Exam Score Rankings (Problem 15): nn students; scores are distinct. Posted results list names in decreasing order of score. How many possible posted results?

    • If kk students pass, there are k!k! ways to order them. Since the number of passers (kk) can range from 0 to nn, we sum over all possible numbers of passers: ∑k=0nP(n,k)=∑k=0nn!(n−k)!\sum_{k=0}^{n} P(n, k) = \sum_{k=0}^{n} \frac{n!}{(n-k)!} This is related to the number of ordered subsets (or sequences) that can be formed from nn items.
  • Subsets Containing Specific Elements (Problem 16): Subsets of size 4 from S={1,2,…,20}S = \{1, 2, \dots, 20\} containing at least one element from A={1,2,3,4,5}A = \{1, 2, 3, 4, 5\}.

    • Use the complement rule: Total subsets of size 4 minus subsets of size 4 containing none of the elements in AA.
    • Total subsets of size 4: (204)=20⋅19⋅18⋅174⋅3⋅2⋅1=4845\binom{20}{4} = \frac{20 \cdot 19 \cdot 18 \cdot 17}{4 \cdot 3 \cdot 2 \cdot 1} = 4845.
    • Subsets containing none from AA (i.e., chosen only from {6,…,20}\{6, \dots, 20\}, which has 15 elements): (154)=15⋅14⋅13⋅124⋅3⋅2⋅1=1365\binom{15}{4} = \frac{15 \cdot 14 \cdot 13 \cdot 12}{4 \cdot 3 \cdot 2 \cdot 1} = 1365.
    • Result: 4845−1365=34804845 - 1365 = 3480.
  • Combinatorial Identity Verification (Problem 17): Verify and provide combinatorial arguments for the identity: (n2)=(k2)+k(n−k)+(n−k2),1≤k≤n\binom{n}{2} = \binom{k}{2} + k(n - k) + \binom{n - k}{2}, \quad 1 \le k \le n

    • Analytic Verification: Requires algebraic substitution and simplification.
    • Combinatorial Argument: Consider choosing 2 elements from a set of nn. Partition the nn elements into two groups: Group 1 has size kk, and Group 2 has size n−kn-k. The two chosen elements can come from:
      1. Both from Group 1: (k2)\binom{k}{2} ways.
      2. One from Group 1 and one from Group 2: k(n−k)k(n-k) ways.
      3. Both from Group 2: (n−k2)\binom{n-k}{2} ways. Summing these covers all possibilities for choosing 2 elements from nn.
  • Family Selections (Problem 18): Choosing a parent and a child from the same family, based on distribution counts:

    • 3 families (1P, 1C): 3×(1×1)=33 \times (1 \times 1) = 3 choices.
    • 3 families (1P, 2C): 3×(1×2)=63 \times (1 \times 2) = 6 choices.
    • 5 families (2P, 1C): 5×(2×1)=105 \times (2 \times 1) = 10 choices.
    • 7 families (2P, 2C): 7×(2×2)=287 \times (2 \times 2) = 28 choices.
    • 6 families (2P, 3C): 6×(2×3)=366 \times (2 \times 3) = 36 choices.
    • Total choices: 3+6+10+28+36=833 + 6 + 10 + 28 + 36 = 83 possible choices.
  • 8-Place License Plates (Problem 19): 5 letters (L) and 3 digits (D) in an 8-place plate. No repetitions allowed for letters or digits.

    • No restrictions on placement:
      • Choose 5 positions for letters (remaining 3 for digits): (85)=56\binom{8}{5} = 56 ways.
      • Fill letter positions (P(26, 5) ways).
      • Fill digit positions (P(10, 3) ways).
      • Total: (85)P(26,5)P(10,3)\binom{8}{5} P(26, 5) P(10, 3).
    • If the 3 digits must be consecutive:
      • Treat the three digits as a block (DDD). This block can start at positions 1, 2, 3, 4, 5, or 6 (6 possible starting positions).
      • Place the digit block (6 ways). The remaining 5 spots are for letters.
      • Fill the 3 digit spots (P(10, 3) ways).
      • Fill the 5 letter spots (P(26, 5) ways).
      • Total: 6×P(10,3)×P(26,5)6 \times P(10, 3) \times P(26, 5).

Tip: When dealing with complex constraints in self-test problems, always consider whether using the complement rule (Total - Forbidden Cases) or partitioning the outcomes (as done in Problem 17) yields a simpler calculation path 36.

3. Axioms of probability and conditional probability (part 1)

This section establishes the formal mathematical foundation for probability theory by defining the sample space, events, and the three fundamental axioms that govern probability measures, followed by basic propositions derived from these axioms.

3.1 Sample space and events

The foundation of probability theory begins with defining the outcomes of a random experiment.

  • Sample Space (SS): The set of all possible outcomes of an experiment.
    • Example 1 (Sex of a child): S={g,b}S = \{g, b\} (girl or boy).
    • Example 3 (Flipping two coins): S={(H,H),(H,T),(T,H),(T,T)}S = \{(H, H), (H, T), (T, H), (T, T)\} 37.
    • Example 5 (Transistor lifetime in hours): S={x:0≤x<∞}S = \{x: 0 \le x < \infty\} (all non-negative real numbers).
  • Event (EE): Any subset of the sample space SS. If the outcome of the experiment is contained in EE, the event EE is said to have occurred.
  • Set Operations on Events: Events combine using standard set theory operations, which correspond to logical combinations of the events occurring 38:
    • Union (E∪FE \cup F): The event that either EE or FF (or both) occurs.
    • Intersection (EFEF or E∩FE \cap F): The event that both EE and FF occur.
    • Null Event (∅\emptyset): The event consisting of no outcomes, which cannot occur. If EF=∅EF = \emptyset, then EE and FF are mutually exclusive.
    • Complement (EcE^c): The event consisting of all outcomes in SS that are not in EE. This occurs if and only if EE does not occur. Note that Sc=∅S^c = \emptyset.
    • Subset (E⊂FE \subset F): If all outcomes in EE are also in FF, the occurrence of EE implies the occurrence of FF.
  • Venn Diagrams: Graphical representations used to illustrate logical relationships between events within the sample space rectangle SS 39.
  • Algebraic Rules for Events: Operations on events obey algebraic laws, such as Commutative, Associative, and Distributive laws 40.
    • DeMorgan's Laws: These laws relate complements to unions and intersections for sequences of events E1,E2,…E_1, E_2, \ldots 41: (⋃i=1nEi)c=⋂i=1nEic\left( \bigcup_{i=1}^{n} E_i \right)^c = \bigcap_{i=1}^{n} E_i^c (⋂i=1nEi)c=⋃i=1nEic\left( \bigcap_{i=1}^{n} E_i \right)^c = \bigcup_{i=1}^{n} E_i^c

3.2 Axioms of probability

The probability of an event EE, denoted P(E)P(E), is defined by a set of axioms that are assumed to be in accordance with intuitive notions of chance.

Tip: The axiomatic approach avoids the complexities of assuming convergence in the relative frequency definition, instead building probability theory from simple, self-evident axioms.

The three fundamental axioms for a set function P(E)P(E), defined on the events of a sample space SS, are:

  • Axiom 1 (Bounds): The probability of any event must be between 0 and 1, inclusive: 0≤P(E)≤10 \le P(E) \le 1 \quad .
  • Axiom 2 (Normalization): The probability of the entire sample space must equal 1: P(S)=1P(S) = 1 \quad .
  • Axiom 3 (Additivity for Mutually Exclusive Events): For any sequence of mutually exclusive events E1,E2,…E_1, E_2, \ldots (where EiEj=∅E_i E_j = \emptyset for i≠ji \ne j): P(⋃i=1∞Ei)=∑i=1∞P(Ei)P\left( \bigcup_{i=1}^{\infty} E_i \right) = \sum_{i=1}^{\infty} P(E_i) \quad 42.

From these axioms, it follows that the probability of the null event is zero: P(∅)=0P(\emptyset) = 0. For a finite sequence of mutually exclusive events, Axiom 3 simplifies to: P(⋃i=1nEi)=∑i=1nP(Ei)(3.1)P\left( \bigcup_{i=1}^{n} E_i \right) = \sum_{i=1}^{n} P(E_i) \quad (3.1) \quad .

Example: If a coin is fair, P({H})=P({T})=1/2P(\{H\}) = P(\{T\}) = 1/2. If the coin is biased such that heads is twice as likely as tails, P({H})=2/3P(\{H\}) = 2/3 and P({T})=1/3P(\{T\}) = 1/3 43.

Technical Remark: In cases where the sample space SS is uncountably infinite, P(E)P(E) is strictly defined only for a class of events called measurable events, though all events of practical interest are measurable..

3.3 Simple propositions derived from axioms

Several important propositions about probabilities can be proven directly from the three axioms.

  • Proposition 4.1 (Complement Rule): The probability that an event EE does not occur is 1 minus the probability that it does occur: P(Ec)=1−P(E)P(E^c) = 1 - P(E) \quad . This follows because EE and EcE^c are mutually exclusive and E∪Ec=SE \cup E^c = S.

  • Proposition 4.2 (Monotonicity): If event EE is contained in event FF (E⊂FE \subset F), then the probability of EE is less than or equal to the probability of FF: If E⊂F, then P(E)≤P(F)\text{If } E \subset F, \text{ then } P(E) \le P(F) \quad .

  • Proposition 4.3 (Addition Rule for Two Events): The probability of the union of two events is given by: P(E∪F)=P(E)+P(F)−P(EF)P(E \cup F) = P(E) + P(F) - P(EF) \quad . This is derived by expressing E∪FE \cup F as the union of disjoint events, such as E∪EcFE \cup E^c F, and using Axiom 3 44.

Example: J likes the first book (B1B_1) with P(B1)=.5P(B_1)=.5 and the second book (B2B_2) with P(B2)=.4P(B_2)=.4. She likes both with P(B1B2)=.3P(B_1 B_2)=.3. The probability she likes at least one book is P(B1∪B2)=.5+.4−.3=.6P(B_1 \cup B_2) =.5 +.4 -.3 =.6. The probability she likes neither is P(B1cB2c)=1−.6=.4P(B_1^c B_2^c) = 1 -.6 =.4.

  • Proposition 4.4 (Inclusion–Exclusion Identity): For a finite sequence of nn events, the probability of their union is given by the inclusion-exclusion formula: P(⋃i=1nEi)=∑i=1nP(Ei)−∑i1<i2P(Ei1Ei2)+⋯+(−1)n+1P(E1E2⋯En)P(\bigcup_{i=1}^{n} E_i) = \sum_{i=1}^{n} P(E_i) - \sum_{i_1<i_2} P(E_{i_1} E_{i_2}) + \cdots + (-1)^{n+1}P(E_1E_2 \cdots E_n) \quad . This formula alternates between summing the probabilities taken rr at a time, where rr ranges from 1 to nn 46.

  • Inclusion–Exclusion Inequalities: Based on Proposition 4.4, partial sums provide bounds on the union probability: P(⋃i=1nEi)≤∑i=1nP(Ei)(4.1)P(\bigcup_{i=1}^{n}E_i) \le \sum_{i=1}^{n} P(E_i) \quad (4.1) P(⋃i=1nEi)≥∑i=1nP(Ei)−∑j<iP(EiEj)(4.2)P(\bigcup_{i=1}^{n}E_i) \ge \sum_{i=1}^{n} P(E_i) - \sum_{j<i} P(E_iE_j) \quad (4.2) The first term gives an upper bound, the first two terms give a lower bound, and so on 47.

3.4 Probability in equally likely outcomes

When the sample space SS is finite, it is often natural to assume all outcomes are equally likely.

  • If S={1,2,…,N}S = \{1, 2, \ldots, N\} and all outcomes are equally likely, then the probability of any single outcome {i}\{i\} is P({i})=1/NP(\{i\}) = 1/N 48.
  • For any event EE: P(E)=number of outcomes in Enumber of outcomes in SP(E) = \frac{\text{number of outcomes in } E}{\text{number of outcomes in } S} \quad .

Example: If two dice are rolled, the sample space size is N=36N=36. The event that the sum is 7 has 6 outcomes: {(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)}\{(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)\}. The probability is 6/36=1/66/36 = 1/6 49.

This concept extends to combinations and selections, where the probability is calculated by taking the ratio of favorable combinations to the total number of combinations, assuming all combinations are equally likely.

Example: If kk balls are randomly drawn from an urn containing nn balls, the probability the special ball is chosen is k/nk/n 50.

This section introduces foundational concepts in probability theory, including sample spaces, events, and the probability axioms, supplemented by examples illustrating surprising probabilistic outcomes and the principle of inclusion-exclusion (Proposition 4.4).

3.5 Surprising results in probability

Probability examples often yield results that seem counter-intuitive upon first encounter.

3.6 The Birthday Problem

The probability that no two people out of nn share a birthday (ignoring February 29th) is calculated assuming 365n365^n total outcomes. The desired probability is given by: P(no match)=⋯(365−n+1)nP(\text{no match}) = \frac{ \cdots(365 - n + 1)}{ ^n} . It is a surprising result that when n≥23n \geq 23, this probability is less than one-half (1/21/2). This means that with 23 or more people, the probability that at least two share a birthday exceeds 1/21/2.

Tip: The initial surprise stems from focusing on the individual probability of a match (1/3651/365 for any pair) rather than the large number of potential pairs within the group. For n=23n=23, there are (232)=253\binom{23}{2} = 253 different pairs.

3.7 Card ordering probability

When a deck of 52 cards is shuffled and turned up until the first ace appears, the probability that the card immediately following the first ace is any specific card (e.g., the ace of spades or the two of clubs) is 152\frac{1}{52} 53.

This is demonstrated by fixing the position of the first ace and observing the card immediately following it. If we consider the orderings of the other 51 cards and insert the ace of spades such that it follows the first ace, there are !! such orderings. Since the total number of outcomes is !!, the probability is !!=152\frac{!}{!} = \frac{1}{52}. A detailed analysis confirms that every card in the deck is equally likely to be the one following the first ace 52 54.

3.8 Applying probability to counting problems

Probability concepts can be used to quickly solve combinatorial problems, often by leveraging the Principle of Inclusion-Exclusion (Proposition 4.4).

3.9 Using inclusion-exclusion for set unions

If a member is selected randomly from a club with NN total members, the probability P(C)P(C) that the member belongs to a subset CC is number of members in CN\frac{\text{number of members in } C}{N}.

For three sets TT (Tennis), SS (Squash), and BB (Badminton), the probability that a member plays at least one sport, P(T∪S∪B)P(T \cup S \cup B), is calculated using the Inclusion-Exclusion Principle (Proposition 4.4): P(T∪S∪B)=P(T)+P(S)+P(B)−P(TS)−P(TB)−P(SB)+P(TSB)P(T \cup S \cup B) = P(T) + P(S) + P(B) - P(TS) - P(TB) - P(SB) + P(TSB) Given the counts: ∣T∣=36|T|=36, ∣S∣=28|S|=28, ∣B∣=18|B|=18, ∣TS∣=22|TS|=22, ∣TB∣=12|TB|=12, ∣SB∣=9|SB|=9, and ∣TSB∣=4|TSB|=4: ∣T∪S∪B∣N=36+28+18−22−12−9+4N=43N\frac{|T \cup S \cup B|}{N} = \frac{36 + 28 + 18 - 22 - 12 - 9 + 4}{N} = \frac{43}{N} Therefore, 43 members play at least one of the three sports 55.

3.10 The matching problem (Derangements)

This classic problem asks for the probability that none of NN men select their own hat after the hats are mixed and randomly distributed. Let EiE_i be the event that the ii-th man selects his own hat.

The probability that at least one man selects his own hat is P(⋃i=1NEi)P\left(\bigcup_{i=1}^{N} E_i\right), calculated using the Principle of Inclusion-Exclusion (Proposition 4.4): P(⋃i=1NEi)=∑i=1NP(Ei)−∑i1<i2P(Ei1Ei2)+⋯+(−1)N+1P(E1E2⋯EN)P\left(\bigcup_{i=1}^{N} E_i\right) = \sum_{i=1}^{N} P(E_i) - \sum_{i_1<i_2} P(E_{i_1} E_{i_2}) + \cdots + (-1)^{N+1}P(E_1 E_2 \cdots E_N) The total number of outcomes (permutations of hats) is N!N!.

For an intersection of nn events, Ei1Ei2⋯EinE_{i_1} E_{i_2} \cdots E_{i_n}, which means nn specific men selected their own hats, the remaining N−nN-n men can select hats in (N−n)!(N-n)! ways. Thus, P(Ei1Ei2⋯Ein)=(N−n)!N!P(E_{i_1} E_{i_2} \cdots E_{i_n}) = \frac{(N - n)!}{N!} The number of terms in the sum involving nn intersections is (Nn)\binom{N}{n}. Therefore, ∑i1<i2⋯<inP(Ei1Ei2⋯Ein)=(Nn)(N−n)!N!=N!n!(N−n)!(N−n)!N!=1n!\sum_{i_1<i_2\cdots<i_n} P(E_{i_1} E_{i_2} \cdots E_{i_n}) = \binom{N}{n} \frac{(N - n)!}{N!} = \frac{N!}{n!(N-n)!} \frac{(N - n)!}{N!} = \frac{1}{n!} Substituting this back into the Inclusion-Exclusion formula yields the probability of at least one match: P(⋃i=1NEi)=1−12!+13!−⋯+(−1)N+11N!P\left(\bigcup_{i=1}^{N} E_i\right) = 1 - \frac{1}{2!} + \frac{1}{3!} - \cdots + (-1)^{N+1} \frac{1}{N!} The probability that none of the men selects his own hat (a derangement) is the complement: P(no match)=1−P(⋃i=1NEi)=1−(1−12!+13!−⋯+(−1)N+11N!)P(\text{no match}) = 1 - P\left(\bigcup_{i=1}^{N} E_i\right) = 1 - \left(1 - \frac{1}{2!} + \frac{1}{3!} - \cdots + (-1)^{N+1} \frac{1}{N!}\right) P(no match)=1−12!+13!−14!+⋯+(−1)N1N!P(\text{no match}) = 1 - \frac{1}{2!} + \frac{1}{3!} - \frac{1}{4!} + \cdots + (-1)^{N} \frac{1}{N!} As N→∞N \to \infty, this expression converges to 1/e1/e, where e≈2.718e \approx 2.718 56.

4. Axioms of probability and conditional probability (part 2)

This section details advanced applications of probability axioms, including calculating run probabilities in sequences, establishing the continuity property of probability measures, and interpreting probability as a subjective degree of belief.

4.1 Probability calculations using the Principle of Inclusion-Exclusion

The Principle of Inclusion-Exclusion (Proposition 4.4) is critical for finding the probability of the union of non-mutually exclusive events. This principle generalizes the formula for the union of two events, P(A∪B)=P(A)+P(B)−P(AB)P(A \cup B) = P(A) + P(B) - P(AB).

The generalized formula for the union of nn events A1,A2,…,AnA_1, A_2, \ldots, A_n is: P(⋃i=1nAi)=∑i=1nP(Ai)−∑i<jP(AiAj)+∑i<j<kP(AiAjAk)+⋯+(−1)n+1P(A1⋯An)P\left(\bigcup_{i=1}^{n} A_i\right) = \sum_{i=1}^{n} P(A_i) - \sum_{i<j} P(A_i A_j) + \sum_{i<j<k} P(A_i A_j A_k) + \cdots + (-1)^{n+1}P(A_1 \cdots A_n)

Example: Calculating the probability that 10 married couples seated randomly at a round table have no wife sitting next to her husband requires finding 1−P(⋃i=110Ei)1 - P(\bigcup_{i=1}^{10} E_i), where EiE_i is the event that the ii-th couple sits together. The probability P(Ei1Ei2⋯Ein)P(E_{i_1} E_{i_2} \cdots E_{i_n}) involves arrangements around a round table, where 2n(20−n−1)!2n(20 - n - 1)! arrangements result in nn specified couples sitting together out of a total of 19!19! arrangements. The resulting probability that at least one couple sits together is approximately 0.66050.6605, leading to a desired probability of approximately 0.33950.3395 57.

4.2 Determining the probability of runs in sequences

When considering sequences of nn wins (W) and mm losses (L), where all (n+mn)\binom{n+m}{n} orderings are equally likely, it is possible to calculate the probability of having exactly rr runs of wins.

A run of wins is a consecutive sequence of Ws. To have exactly rr runs of wins of specific sizes x1,x2,…,xrx_1, x_2, \ldots, x_r (where ∑xi=n\sum x_i = n), these runs must be separated by losses. The losses must satisfy y1+y2+⋯+yr+1=my_1 + y_2 + \cdots + y_{r+1} = m, where y1≥0y_1 \ge 0, yr+1≥0y_{r+1} \ge 0, and yi>0y_i > 0 for i=2,…,ri=2, \ldots, r (losses separating the runs of wins).

The number of outcomes resulting in exactly rr runs of wins is given by the product of the number of ways to partition the nn wins into rr positive integer parts ((n−1r−1)\binom{n-1}{r-1}) and the number of ways to place the mm losses around these runs ((m+1r)\binom{m+1}{r}) 58. Number of outcomes with r runs=(m+1r)(n−1r−1),r≥1\text{Number of outcomes with } r \text{ runs} = \binom{m+1}{r} \binom{n-1}{r-1}, \quad r \ge 1

The probability of having exactly rr runs of wins is: P(r runs of wins)=(m+1r)(n−1r−1)(m+nn)P(\text{r runs of wins}) = \frac{\binom{m+1}{r} \binom{n-1}{r-1}}{\binom{m+n}{n}}

Tip: A highly alternating sequence (e.g., WLWLWL...) will result in a high number of runs, making the observed sequence unlikely if the probability of winning is truly constant. Conversely, a highly clumped sequence (e.g., WWWWLLLL) will result in very few runs, which is also unlikely under constant probability assumptions.

4.3 Continuity of probability as a set function

Probability functions exhibit continuity properties when dealing with infinite sequences of events.

Limits of Sequences of Events

  • Increasing Sequence: If {En,n≥1}\{E_n, n \ge 1\} is increasing (E1⊆E2⊆⋯E_1 \subseteq E_2 \subseteq \cdots), the limit is defined as the union: lim⁡n→∞En=⋃i=1∞Ei\lim_{n\to\infty} E_n = \bigcup_{i=1}^{\infty} E_i
  • Decreasing Sequence: If {En,n≥1}\{E_n, n \ge 1\} is decreasing (E1⊇E2⊇⋯E_1 \supseteq E_2 \supseteq \cdots), the limit is defined as the intersection: lim⁡n→∞En=⋂i=1∞Ei\lim_{n\to\infty} E_n = \bigcap_{i=1}^{\infty} E_i

Proposition 6.1: Continuity Theorem

If {En,n≥1}\{E_n, n \ge 1\} is either an increasing or a decreasing sequence of events, then the limit of their probabilities equals the probability of the limit event: lim⁡n→∞P(En)=P(lim⁡n→∞En)\lim_{n\to\infty} P(E_n) = P\left(\lim_{n\to\infty} E_n\right) This is proven by decomposing the sequence into mutually exclusive events FiF_i whose union forms the limit event 59 60.

Example: This property is vital in showing that certain infinitely repeated processes result in zero probability for specific outcomes. For instance, in a scenario involving drawing balls from an urn at discrete time intervals approaching t=12t=12 P.M., the probability that a specific ball remains in the urn at 1212 P.M. is shown to be the limit of the probability it hasn't been withdrawn after nn steps, which evaluates to zero by showing the product ∏n=1∞9n9n+1\prod_{n=1}^{\infty} \frac{9n}{9n+1} diverges to zero 61 62.

4.4 Interpretation of Probability as Belief

Beyond long-run frequencies, probability can be interpreted as a personal or subjective measure of an individual's degree of belief in the occurrence of an event.

  • Statements like "The probability that Oswald acted alone is 0.80.8 (80 percent)" reflect the speaker's certainty level.
  • Logically consistent subjective probabilities must adhere to the standard axioms of probability. If an individual believes event AA is 70 percent likely and event BB is 10 percent likely, and AA and BB are mutually exclusive, they should logically believe A∪BA \cup B is 70%+10%=80%70\% + 10\% = 80\% likely 63.
  • However, individuals may state inconsistent subjective probabilities that violate the axioms, highlighting the difference between an idealized consistent belief system and actual human judgment.

4.5 Summary of Core Concepts (Axioms and Derived Results)

The mathematical foundation rests on three axioms 64: (i) 0≤P(A)≤10 \le P(A) \le 1 (ii) P(S)=1P(S) = 1 (Probability of the sample space is 1) (iii) For mutually exclusive events Ai,i≥1A_i, i \ge 1: P(⋃i=1∞Ai)=∑i=1∞P(Ai)P\left(\bigcup_{i=1}^{\infty} A_i\right) = \sum_{i=1}^{\infty} P(A_i)

Derived results include:

  • Complement Rule: P(Ac)=1−P(A)P(A^c) = 1 - P(A)
  • Union Rule (Two Events): P(A∪B)=P(A)+P(B)−P(AB)P(A \cup B) = P(A) + P(B) - P(AB)

If the sample space SS is finite and outcomes are equally likely, the probability is calculated based on set sizes: P(A)=∣A∣∣S∣P(A) = \frac{|A|}{|S|} where ∣E∣|E| is the number of outcomes in event EE 65.

5. Random variables and core expectation properties (part 1)

This section introduces discrete random variables, the concept of expected value, variance, and examines several common discrete probability distributions.

5.1 Discrete random variables and expected value

A random variable XX is a function that assigns a real number to each outcome in the sample space SS. If the sample space is countable, XX is a discrete random variable. The set of possible values taken on by XX is denoted by SX={x1,x2,… }S_X = \{x_1, x_2, \dots \}.

The probability mass function (PMF) of XX, denoted by pX(x)p_X(x), specifies the probability that XX takes on the value xx: pX(x)=P(X=x),for x∈SXp_X(x) = P(X=x), \quad \text{for } x \in S_X The PMF must satisfy two conditions:

  1. pX(x)≥0p_X(x) \ge 0 for all x∈SXx \in S_X.
  2. ∑x∈SXpX(x)=1\sum_{x \in S_X} p_X(x) = 1.

The cumulative distribution function (CDF) of XX, denoted by FX(x)F_X(x), is the probability that XX is less than or equal to a specific value xx: FX(x)=P(X≤x)=∑y≤x,y∈SXpX(y)F_X(x) = P(X \le x) = \sum_{y \le x, y \in S_X} p_X(y) For a discrete random variable, the CDF is a step function.

The expected value (or expectation) of a discrete random variable XX, denoted E[X]E[X], is the weighted average of the possible values of XX, where the weights are the corresponding probabilities. E[X=∑x∈SXxpX(x)E[X = \sum_{x \in S_X} x p_X(x)

Tip: The expected value represents the long-run average outcome if the experiment were repeated many times. It is not necessarily one of the possible values XX can take.

5.2 Expectation of a function of a random variable

If g(X)g(X) is a function of a discrete random variable XX, then the expected value of g(X)g(X) is calculated using the PMF of XX: E[g(X)]=∑x∈SXg(x)pX(x)E[g(X)] = \sum_{x \in S_X} g(x) p_X(x)

A crucial property related to this is the Law of the Unconscious Statistician (LOTUS).

Example: If XX is the outcome of a single die roll, E[X=3.5E[X = 3.5. The expectation of X2X^2 is E[X2=∑i=16i2⋅16=1+4+9+16+25+366=916≈15.17E[X^2 = \sum_{i=1}^6 i^2 \cdot \frac{1}{6} = \frac{1+4+9+16+25+36}{6} = \frac{91}{6} \approx 15.17 [No page reference provided for these specific examples, but concepts align with foundational material implied by context.

5.3 Properties of expectation

The expectation operator E[⋅]E[\cdot] possesses several linearity properties:

  1. Expectation of a constant: For any constant cc: E[c=cE[c = c
  2. Constant multiple rule: For any constant cc and random variable XX: E[cX=cE[X]E[cX = cE[X]
  3. Additivity: For any two random variables XX and YY: E[X+Y=E[X+E[Y]E[X+Y = E[X + E[Y]
  4. Linearity combined: For constants aa and bb, and random variables XX and YY: E[aX+bY=aE[X+bE[Y]E[aX + bY = aE[X + bE[Y]

These properties hold regardless of whether XX and YY are independent [No page reference provided, but these are core properties usually introduced alongside E[X]E[X].

5.4 Variance and standard deviation

The variance of a random variable XX, denoted Var(X)\text{Var}(X) or σ2\sigma^2, measures the spread or dispersion of the distribution around its mean E[X]E[X]. It is defined as the expected value of the squared difference between XX and its mean: Var(X)=E[(X−E[X])2]\text{Var}(X) = E[(X - E[X])^2]

A more computationally convenient formula for the variance is: Var(X)=E[X2−(E[X])2\text{Var}(X) = E[X^2 - (E[X])^2

The standard deviation of XX, denoted σX\sigma_X or simply σ\sigma, is the square root of the variance: σX=Var(X)\sigma_X = \sqrt{\text{Var}(X)}

Properties of Variance

The variance operation also has specific properties, particularly concerning constants and scaling:

  1. Variance of a constant: For any constant cc: Var(c)=0\text{Var}(c) = 0
  2. Variance scaling: For any constant cc and random variable XX: Var(cX)=c2Var(X)\text{Var}(cX) = c^2 \text{Var}(X)
  3. Variance shift: For any constant cc and random variable XX: Var(X+c)=Var(X)\text{Var}(X+c) = \text{Var}(X)

Note: Unlike the expectation operator, variance is not linear. In general, Var(X+Y)≠Var(X)+Var(Y)\text{Var}(X+Y) \ne \text{Var}(X) + \text{Var}(Y) unless XX and YY are independent.

5.5 Common discrete distributions

The text introduces several fundamental discrete probability distributions based on the context of probability problems (e.g., sampling, sequences of trials).

5.6 Bernoulli distribution

A Bernoulli random variable XX models the outcome of a single trial with only two possible outcomes: success (value 1) or failure (value 0). Let pp be the probability of success. P(X=1)=pP(X=1) = p P(X=0)=1−p=qP(X=0) = 1-p = q The PMF is pX(x)=px(1−p)1−xp_X(x) = p^x (1-p)^{1-x} for x∈{0,1}x \in \{0, 1\}.

  • Expectation: E[X=pE[X = p
  • Variance: Var(X)=p(1−p)\text{Var}(X) = p(1-p)

5.7 Binomial distribution

The Binomial distribution describes the number of successes, XX, in a fixed number, nn, of independent Bernoulli trials, each having success probability pp. X∼Binomial(n,p)X \sim \text{Binomial}(n, p) The PMF is: P(X=k)=pX(k)=(nk)pk(1−p)n−k,k=0,1,…,nP(X=k) = p_X(k) = \binom{n}{k} p^k (1-p)^{n-k}, \quad k = 0, 1, \dots, n

  • Expectation: E[X=npE[X = np
  • Variance: Var(X)=np(1−p)\text{Var}(X) = np(1-p)

5.8 Poisson distribution

The Poisson distribution models the number of times an event occurs in a fixed interval of time or space, provided these events occur with a known constant mean rate, λ\lambda, and independently of the time since the last event. X∼Poisson(λ)X \sim \text{Poisson}(\lambda) P(X=k)=pX(k)=e−λλkk!,k=0,1,2,…P(X=k) = p_X(k) = \frac{e^{-\lambda} \lambda^k}{k!}, \quad k = 0, 1, 2, \dots

  • Expectation: E[X=λE[X = \lambda
  • Variance: Var(X)=λ\text{Var}(X) = \lambda

Tip: For the Poisson distribution, the mean equals the variance (E[X=Var(X)=λE[X = \text{Var}(X) = \lambda).

5.9 Geometric distribution

The Geometric distribution describes the number of independent Bernoulli trials, XX, needed to get the first success. Let pp be the probability of success on any trial. X∼Geometric(p)X \sim \text{Geometric}(p) The PMF (counting the number of trials kk, including the success): P(X=k)=(1−p)k−1p,k=1,2,3,…P(X=k) = (1-p)^{k-1} p, \quad k = 1, 2, 3, \dots

  • Expectation: E[X=1pE[X = \frac{1}{p}
  • Variance: Var(X)=1−pp2\text{Var}(X) = \frac{1-p}{p^2}

Note: Some texts define the Geometric distribution as the number of failures before the first success (Y=X−1Y=X-1). If YY is the number of failures, E[Y=(1−p)/pE[Y = (1-p)/p and Var(Y)=(1−p)/p2\text{Var}(Y) = (1-p)/p^2.

5.10 Hypergeometric distribution

The Hypergeometric distribution models the number of successes, XX, in nn draws without replacement from a finite population of size NN containing KK successes and N−KN-K failures. X∼Hypergeometric(N,K,n)X \sim \text{Hypergeometric}(N, K, n) P(X=k)=(Kk)(N−Kn−k)(Nn),where max⁡(0,n−(N−K))≤k≤min⁡(n,K)P(X=k) = \frac{\binom{K}{k} \binom{N-K}{n-k}}{\binom{N}{n}}, \quad \text{where } \max(0, n-(N-K)) \le k \le \min(n, K)

  • Expectation: E[X=nKNE[X = n \frac{K}{N}
  • Variance: Var(X)=nKNN−KNN−nN−1\text{Var}(X) = n \frac{K}{N} \frac{N-K}{N} \frac{N-n}{N-1}

The term N−nN−1\frac{N-n}{N-1} is the finite population correction factor, which accounts for the dependence between successive draws when sampling without replacement. If nn is small relative to NN, this factor approaches 1, and the variance approaches the Binomial variance np(1−p)np(1-p) where p=K/Np=K/N. [Concepts covering distributions and expectations are foundational for Chapter 4, pages 69-82 contextually refer to prior chapters' exercises but define the core concepts for the upcoming material.

This section (covering material from Chapter 4, Part 1 of 6) introduces the concept of discrete random variables and fundamental probabilistic measures like expected value and variance, although the provided pages focus primarily on advanced applications of conditional probability (Bayes's Theorem and related concepts).

5.11 Reassessing probabilities using Bayes's formula

Bayes's formula provides a framework for updating prior probabilities based on new evidence. If HH is a hypothesis and EE is new evidence, the updated probability P(H∣E)P(H|E) is calculated using the prior P(H)P(H) and the likelihoods of observing EE under both HH and its complement HcH^c.

The general form of Bayes's formula (Equation 3.1 in the text) is: P(H∣E)=P(E∣H)P(H)P(E∣H)P(H)+P(E∣Hc)P(Hc)P(H|E) = \frac{P(E|H)P(H)}{P(E|H)P(H) + P(E|H^c)P(H^c)} where P(Hc)=1−P(H)P(H^c) = 1 - P(H).

Tip: The probability of the evidence P(E)P(E) is calculated using the Law of Total Probability, often by conditioning on the hypothesis HH and its complement HcH^c: P(E)=P(E∣H)P(H)+P(E∣Hc)P(Hc)P(E) = P(E|H)P(H) + P(E|H^c)P(H^c).

Application in Medical Context (Example 3e) In a medical scenario, if a doctor initially assesses a 60 percent certainty (P(D)=0.6P(D) = 0.6) that a patient (who is diabetic) has a disease, and a test EE comes back positive. The test never yields a positive result if the patient is healthy (P(E∣Dc)=0.3P(E|D^c) = 0.3 for diabetics without the disease, and P(E∣D)=1P(E|D) = 1). The updated probability is: P(D∣E)=1(0.6)1(0.6)+(0.3)(0.4)=0.60.72≈0.833P(D|E) = \frac{1(0.6)}{1(0.6) + (0.3)(0.4)} = \frac{0.6}{0.72} \approx 0.833 Since 0.833>0.800.833 > 0.80, the doctor recommends surgery.

Application in Criminal Investigation (Example 3f) If an inspector is 60 percent convinced of guilt (P(G)=0.6P(G) = 0.6) and new evidence CC (possessing a certain characteristic) is found, where 20 percent of the population has CC. Assuming P(C∣Gc)=0.2P(C|G^c) = 0.2 and P(C∣G)=1P(C|G) = 1: P(G∣C)=1(0.6)1(0.6)+(0.2)(0.4)=0.60.6+0.08≈0.882P(G|C) = \frac{1(0.6)}{1(0.6) + (0.2)(0.4)} = \frac{0.6}{0.6 + 0.08} \approx 0.882 The inspector should be approximately 88.2 percent certain of guilt 84.

5.12 Evidence support and the odds ratio

New evidence EE supports a hypothesis HH if P(H∣E)>P(H)P(H|E) > P(H). This occurs if and only if the probability of observing the evidence given the hypothesis is true is greater than the probability of observing the evidence given the hypothesis is false: P(E∣H)>P(E∣Hc)P(E|H) > P(E|H^c) 85.

The relationship between prior and posterior probability can be expressed more compactly using the concept of odds:

Definition: Odds The odds of an event AA are defined as the ratio of its probability to the probability of its complement: Odds(A)=P(A)P(Ac)=P(A)1−P(A)\text{Odds}(A) = \frac{P(A)}{P(A^c)} = \frac{P(A)}{1 - P(A)} Odds indicate how much more likely event AA is than its non-occurrence. If odds are α\alpha, it is often stated as "α\alpha to 1" in favor of the hypothesis.

Odds Form of Bayes's Theorem (Equation 3.3) When new evidence EE is introduced, the new odds are the old odds multiplied by the likelihood ratio: P(H∣E)P(Hc∣E)=P(H)P(Hc)⋅P(E∣H)P(E∣Hc)\frac{P(H|E)}{P(H^c|E)} = \frac{P(H)}{P(H^c)} \cdot \frac{P(E|H)}{P(E|H^c)} The new odds of HH equal the old odds of HH multiplied by the ratio of the conditional probability of the new evidence given HH is true to the conditional probability given HH is false.

Example: If P(A)=2/3P(A) = 2/3, the odds are 2:12:1 in favor of AA. In Example 3i (Coin Selection): An urn has two Type A coins (P(A)=2/3P(A)=2/3) and one Type B coin (P(B)=1/3P(B)=1/3). Type A yields heads with P(heads∣A)=1/4P(heads|A)=1/4, and Type B with P(heads∣B)=3/4P(heads|B)=3/4. The new odds are: P(A∣heads)P(B∣heads)=P(A)P(B)⋅P(heads∣A)P(heads∣B)=2/31/3⋅1/43/4=2⋅13=23\frac{P(A|\text{heads})}{P(B|\text{heads})} = \frac{P(A)}{P(B)} \cdot \frac{P(\text{heads}|A)}{P(\text{heads}|B)} = \frac{2/3}{1/3} \cdot \frac{1/4}{3/4} = 2 \cdot \frac{1}{3} = \frac{2}{3} If the odds are 2/3:12/3: 1, then the new probability P(A∣heads)P(A|\text{heads}) is found by setting P(A∣heads)=αP(B∣heads)P(A|\text{heads}) = \alpha P(B|\text{heads}) where α=2/3\alpha=2/3, and since P(A∣heads)+P(B∣heads)=1P(A|\text{heads}) + P(B|\text{heads}) = 1, we get P(A∣heads)=2/31+2/3=2/35/3=2/5P(A|\text{heads}) = \frac{2/3}{1 + 2/3} = \frac{2/3}{5/3} = 2/5 87.

5.13 Generalizing the Law of Total Probability

When considering a partition of the sample space SS by a set of mutually exclusive and exhaustive events F1,F2,…,FnF_1, F_2, \dots, F_n (meaning exactly one FiF_i must occur, ⋃i=1nFi=S\bigcup_{i=1}^n F_i = S), the probability of any event EE can be calculated by conditioning on this partition (Equation 3.4).

P(E)=∑i=1nP(EFi)=∑i=1nP(E∣Fi)P(Fi)P(E) = \sum_{i=1}^{n} P(E F_i) = \sum_{i=1}^{n} P(E|F_i)P(F_i) This shows that P(E)P(E) is a weighted average of the conditional probabilities P(E∣Fi)P(E|F_i), where the weights are the probabilities P(Fi)P(F_i) 88.

5.14 Probabilities in Sequential/Urn Problems

Certain problems involving sequential molecular removal (or card drawing) where mixing is assumed can be solved elegantly using conditioning principles, even without direct combinatorial counting.

Example using sequential removal (Example 3h): Consider Urn 1 with nn red molecules and Urn 2 with nn blue molecules. Molecules are removed from Urn 1, and a molecule from Urn 2 replaces it until all molecules are removed (total 2n2n removals). The probability P(R)P(R) that the final molecule removed from Urn 1 is red:

  1. Focus on one specific red molecule. The probability P(Rj)P(R_j) that molecule jj is the final one removed is found by considering the sequence of removals up to the point where Urn 2 empties (nn removals).
  2. The probability that this specific molecule remains in Urn 1 after the first nn steps (when Urn 2 is empty) is (1−1n)n\left(1 - \frac{1}{n}\right)^n.
  3. Given it remains, the conditional probability that it is the final molecule among the remaining ones is 1/n1/n (by symmetry).
  4. Thus, for any single red molecule jj: P(Rj)=(1−1n)n⋅1nP(R_j) = \left(1 - \frac{1}{n}\right)^n \cdot \frac{1}{n}
  5. Since the events RjR_j (for j=1j=1 to nn) are mutually exclusive, the total probability that the final molecule is red is: P(R)=∑j=1nP(Rj)=n⋅(1−1n)nP(R) = \sum_{j=1}^{n} P(R_j) = n \cdot \left(1 - \frac{1}{n}\right)^n As nn becomes large, this approaches e−1e^{-1} 86.

6. Random variables and core expectation properties (part 2)

This section covers the introduction of discrete random variables, the calculation and interpretation of expected value and variance (though detailed variance calculation might be in Part 3), and detailed exploration of several fundamental discrete probability distributions, building upon concepts from conditional probability and Bayes' formula covered previously.

6.1 Review of Conditional Probability and Bayes' Formula Applications

The preceding material concluded with extensive examples applying Bayes' formula (Proposition 3.1), which updates the probability of hypotheses (FjF_j) given observed evidence (EE): P(Fj∣E)=P(E∣Fj)P(Fj)∑i=1nP(E∣Fi)P(Fi)(3.5)P(F_j|E) = \frac{P(E|F_j)P(F_j)}{\sum_{i=1}^{n} P(E|F_i)P(F_i)} \quad \text{(3.5)} Examples illustrated how this formula refines beliefs based on new information:

  • Missing Plane Example (Example 3k): Updating the probability of a plane's location given an unsuccessful search in one region. The posterior probability for the searched region decreases, while probabilities for other regions increase.
  • Red/Black Card Problem (Example 3l): Given a randomly drawn card shows red on top, the probability the other side is black is 1/31/3, correcting the intuitive but incorrect guess of 1/21/2. This highlights the need to account for all equally likely underlying outcomes (the sides of the cards) 90.
  • Two Children Gender Problem (Example 3m): Demonstrates that solving conditional probability problems involving gender requires explicit assumptions about the selection process (which child is seen by the mother) beyond just the probabilities of gender combinations 91.
  • Flashlight Lifespan (Example 3n): Calculated the overall probability of lasting over 100 hours by conditioning on type (FjF_j), and then used Bayes' formula to find the posterior probability that a light was of type jj given it lasted over 100 hours (AA) 92.

Tip: Bayes' formula is crucial for interpreting data. The updated probability P(Fj∣E)P(F_j|E) reflects how much the evidence EE supports the hypothesis FjF_j relative to other hypotheses, adjusting the prior probability P(Fj)P(F_j) 89.

6.2 Introduction to Independent Events

The concept of independence is introduced as a special case where conditional probability does not change the likelihood: EE is independent of FF if P(E∣F)=P(E)P(E|F) = P(E). This is mathematically equivalent to: P(EF)=P(E)P(F)(4.1)P(EF) = P(E)P(F) \quad \text{(4.1)} This relationship is symmetric, meaning if EE is independent of FF, then FF is independent of EE. Events that are not independent are dependent 94.

  • Examples of Independence: Drawing an Ace (E) and drawing a Spade (F) from a deck are independent, as P(EF)=1/52P(EF) = 1/52, while P(E)P(F)=(4/52)(13/52)=1/52P(E)P(F) = (4/52)(13/52) = 1/52.
  • Examples of Dependence: For two dice rolls, the event that the sum is 6 (E1E_1) is dependent on the event that the first die is 4 (FF), because P(E1F)=1/36P(E_1F) = 1/36, but P(E1)P(F)=(5/36)(1/6)=5/216P(E_1)P(F) = (5/36)(1/6) = 5/216 95.

6.3 Properties and Extensions of Independence

  • If EE and FF are independent, then EE and the complement FcF^c are also independent (Proposition 4.1).
  • Independence of two pairs does not guarantee independence of the combined events. If EE is independent of FF and EE is independent of GG, EE is not necessarily independent of FGFG.

Independence for Three or More Events: Three events E,F,GE, F, G are independent if and only if all joint probabilities equal the product of individual probabilities, including all pairwise combinations: P(EFG)=P(E)P(F)P(G)P(EF)=P(E)P(F)P(EG)=P(E)P(G)P(FG)=P(F)P(G)\begin{aligned} P(EFG) &= P(E)P(F)P(G) \\ P(EF) &= P(E)P(F) \\ P(EG) &= P(E)P(G) \\ P(FG) &= P(F)P(G) \end{aligned} This definition extends to any finite or infinite set of events, where every finite subset must satisfy the product rule for independence 96.

Example: If an infinite sequence of independent trials (success probability pp) is performed, the probability of exactly kk successes in nn trials follows the Binomial distribution formula: P{exactly k successes}=(nk)pk(1−p)n−kP\{\text{exactly k successes}\} = \binom{n}{k} p^k (1 - p)^{n-k}

6.4 Independence in Sequences of Trials (Gambling Problems)

When a probabilistic experiment is composed of independent subexperiments, called trials, events defined solely by the outcomes of specific trials are independent 97.

  • Parallel System (Example 4g): For nn independent components with success probabilities pip_i, the probability the system functions (at least one component functions) is: P{system functions}=1−∏i=1n(1−pi)P\{\text{system functions}\} = 1 - \prod_{i=1}^{n} (1 - p_i) 98.
  • Competition between Events (Example 4h): If two mutually exclusive events EE and FF occur in independent trials, the probability that EE occurs before FF is P(E)P(E)+P(F)\frac{P(E)}{P(E) + P(F)}.
    • In the dice roll example, the probability of rolling a 5 (4/36) before a 7 (6/36) is 4/(4+6)=4/10=2/54/(4+6) = 4/10 = 2/5 99.

6.5 The Problem of Points (Historical Context)

This historical problem, which catalyzed the foundation of probability theory via correspondence between Pascal and Fermat in 1654, seeks to divide stakes based on partial scores (nn required successes vs. mm required failures) when a game is interrupted 100.

Fermat's solution showed that the probability Pn,mP_{n,m} of nn successes occurring before mm failures (where success probability is pp) is equivalent to the probability of getting at least nn successes in the first m+n−1m+n-1 trials: Pn,m=∑k=nm+n−1(m+n−1k)pk(1−p)m+n−1−kP_{n,m} = \sum_{k=n}^{m+n-1} \binom{m + n - 1}{k} p^k (1 - p)^{m+n-1-k}.

6.6 Gambler's Ruin Problem

This problem analyzes the probability of one gambler winning all the money in a sequence of independent bets where fortunes change by one unit per bet 101 102.

Let PiP_i be the probability that Gambler A wins, starting with ii units, against Gambler B who starts with N−iN-i units. If the probability of A winning a single bet is pp (and losing is q=1−pq=1-p), PiP_i satisfies the difference equation derived from conditioning on the first flip: Pi=pPi+1+qPi−1for i=1,2,…,N−1P_i = pP_{i+1} + qP_{i-1} \quad \text{for } i = 1, 2, \dots, N-1 With boundary conditions P0=0P_0 = 0 and PN=1P_N = 1.

The solution PiP_i depends on whether p=q=1/2p = q = 1/2:

  1. Fair Game (p=1/2p = 1/2): Pi=iNP_i = \frac{i}{N}
  2. Unfair Game (p≠1/2p \neq 1/2): Pi=1−(q/p)i1−(q/p)NP_i = \frac{1 - (q/p)^i}{1 - (q/p)^N}

Crucially, Pi+Qi=1P_i + Q_i = 1, confirming that the probability of the game continuing indefinitely (fortune never reaching 0 or NN) is zero.

Example: If A starts with i=5i=5 and B starts with N−i=10N-i=10 (N=15N=15), and the game is fair (p=1/2p=1/2), A's probability of winning is P5=5/15=1/3P_5 = 5/15 = 1/3. If p=0.6p=0.6 (q/p=2/3q/p = 2/3), P5P_5 jumps significantly to approximately 0.870.87 104.

This section, covering the latter part of Chapter 4's material, applies probability concepts like the gambler's ruin problem to sequential testing scenarios and introduces the probabilistic method for existence proofs, alongside the formal verification that conditional probabilities adhere to the axioms of probability.

6.7 Application of Gambler's Ruin to Sequential Drug Testing

The gambler's ruin framework is applicable when comparing outcomes of sequential trials, such as deciding between two drugs with unknown cure rates, P1P_1 and P2P_2.

Consider a test where pairs of patients receive Drug 1 and Drug 2, respectively. Define the outcome for the jthj^{th} pair: Xj={1if patient receiving drug 1 is cured0otherwiseX_j = \begin{cases} 1 & \text{if patient receiving drug 1 is cured} \\ 0 & \text{otherwise} \end{cases} Yj={1if patient receiving drug 2 is cured0otherwiseY_j = \begin{cases} 1 & \text{if patient receiving drug 2 is cured} \\ 0 & \text{otherwise} \end{cases}

The test stops at pair NN, the first instance where the cumulative difference in cures, Dn=(X1+⋯+Xn)−(Y1+⋯+Yn)D_n = (X_1 + \dots + X_n) - (Y_1 + \dots + Y_n), reaches a predetermined positive integer MM (asserting P1>P2P_1 > P_2) or −M-M (asserting P2>P1P_2 > P_1).

When only considering pairs where the cumulative difference changes:

  • The difference increases by 1 (Drug 1 cures, Drug 2 fails) with probability: P=P1(1−P2)P1(1−P2)+(1−P1)P2P = \frac{P_1(1 - P_2)}{P_1(1 - P_2) + (1 - P_1)P_2}
  • The difference decreases by 1 (Drug 1 fails, Drug 2 cures) with probability 1−P1 - P: 1−P=(1−P1)P2P1(1−P2)+(1−P1)P21 - P = \frac{(1 - P_1)P_2}{P_1(1 - P_2) + (1 - P_1)P_2}

The probability that the test asserts P2>P1P_2 > P_1 is equivalent to the probability that a gambler with a unit win probability PP loses MM units before gaining MM units. Using the gambler's ruin formula (Equation 4.5, setting i=Mi=M and N=2MN=2M), this probability is: P{test asserts that P2>P1}=1−1−(1−PP)M1−(1−PP)2M=11+(1−PP)MP\{\text{test asserts that } P_2 > P_1\} = 1 - \frac{1 - \left(\frac{1-P}{P}\right)^M}{1 - \left(\frac{1-P}{P}\right)^{2M}} = \frac{1}{1 + \left(\frac{1-P}{P}\right)^M} where γ=1−PP=P2(1−P1)P1(1−P2)\gamma = \frac{1 - P}{P} = \frac{P_2(1 - P_1)}{P_1(1 - P_2)} 105.

Tip: The sensitivity of the test (how quickly the probability of incorrect assertion decreases) is heavily dependent on the parameter MM. As MM increases, the probability of an incorrect decision rapidly diminishes.

6.8 Probabilistic Method for Existence Proofs

The probabilistic method involves introducing randomness into a deterministic problem statement to show that a desired configuration (or coloring, structure, etc.) must exist if the probability of achieving it is greater than zero.

Application to Graph Coloring

This method is illustrated by determining if a complete graph with nn vertices, where every edge is colored red or blue independently with probability 1/21/2, can avoid having any set of kk vertices whose (k2)\binom{k}{2} connecting edges are all the same color 106.

Let EiE_i be the event that the ithi^{th} set of kk vertices has all connecting edges the same color. The total number of edges connecting kk vertices is (k2)=k(k−1)2\binom{k}{2} = \frac{k(k-1)}{2}. Since each edge is independently red or blue (probability 1/21/2 for each color), the probability that all edges for a specific set of kk vertices share the same color is: P(Ei)=2⋅(12)(k2)=(12)(k2)−1P(E_i) = 2 \cdot \left(\frac{1}{2}\right)^{\binom{k}{2}} = \left(\frac{1}{2}\right)^{\binom{k}{2} - 1}

Using Boole's inequality (which states P(⋃Ei)≤∑P(Ei)P(\bigcup E_i) \le \sum P(E_i)), the probability that at least one set of kk vertices is monochromatic is bounded by: P(⋃iEi)≤(nk)⋅P(Ei)=(nk)(12)(k2)−1P\left(\bigcup_i E_i\right) \le \binom{n}{k} \cdot P(E_i) = \binom{n}{k} \left(\frac{1}{2}\right)^{\binom{k}{2}-1}

If this upper bound is less than 1, specifically if: (nk)<2(k2)−1\binom{n}{k} < 2^{\binom{k}{2}-1} then P(⋃iEi)<1P(\bigcup_i E_i) < 1. This means there is a positive probability that no set of kk vertices has all monochromatic connecting edges. A positive probability guarantees that at least one valid coloring scheme exists.

Example: The probabilistic method confirms the existence of Ramsey numbers by providing a bound, though it does not constructively yield the required coloring scheme 107.

6.9 Conditional Probability Axioms

Conditional probabilities, P(⋅∣F)P(\cdot|F), satisfy the fundamental axioms of probability, as proven by Proposition 5.1.

Proposition 5.1: Given an event FF with P(F)>0P(F) > 0:

  1. Non-negativity and Boundedness: 0≤P(E∣F)≤10 \le P(E|F) \le 1 This holds because P(E∣F)=P(EF)P(F)P(E|F) = \frac{P(EF)}{P(F)}, and since EF⊆FEF \subseteq F, we have P(EF)≤P(F)P(EF) \le P(F).
  2. Normalization: P(S∣F)=1P(S|F) = 1 This follows because P(S∣F)=P(SF)P(F)=P(F)P(F)=1P(S|F) = \frac{P(SF)}{P(F)} = \frac{P(F)}{P(F)} = 1.
  3. Countable Additivity for Mutually Exclusive Events: If EiE_i are mutually exclusive events (EiEj=∅E_i E_j = \emptyset for i≠ji \neq j), then: P(⋃i=1∞Ei∣F)=∑i=1∞P(Ei∣F)P\left(\bigcup_{i=1}^\infty E_i | F\right) = \sum_{i=1}^\infty P(E_i|F) This relies on the fact that (⋃Ei)F=⋃(EiF)\left(\bigcup E_i\right)F = \bigcup (E_iF) and EiFEjF=∅E_iF E_jF = \emptyset 108.

7. Random variables and core expectation properties (part 3)

This section continues the exploration of conditional probability, focusing on how conditional probabilities themselves form a probability function and introducing the concept of conditional independence through various complex examples.

7.1 Conditional Probability as a Probability Function

The conditional probability measure, defined as Q(E)=P(E∣F)Q(E) = P(E|F), where FF is a fixed event, behaves exactly like a standard probability function on the events of the sample space SS.

This means that the standard probability axioms apply to Q(E)Q(E):

  • For any event EE, Q(E)≥0Q(E) \ge 0.
  • Q(S)=1Q(S) = 1.
  • For mutually exclusive events E1E_1 and E2E_2, Q(E1∪E2)=Q(E1)+Q(E2)Q(E_1 \cup E_2) = Q(E_1) + Q(E_2).

The Law of Total Probability, when conditioned on FF, mirrors its standard form: Q(E1)=Q(E1∣E2)Q(E2)+Q(E1∣E2c)Q(E2c)(5.1)Q(E_1) = Q(E_1|E_2)Q(E_2) + Q(E_1|E_2^c)Q(E_2^c) \quad (5.1) Translating this back into standard conditional probability notation using the definition Q(E)=P(E∣F)Q(E) = P(E|F) and Q(E1∣E2)=P(E1∣E2F)Q(E_1|E_2) = P(E_1|E_2F): P(E1∣F)=P(E1∣E2F)P(E2∣F)+P(E1∣E2cF)P(E2c∣F)P(E_1|F) = P(E_1|E_2F)P(E_2|F) + P(E_1|E_2^c F)P(E_2^c|F)

Tip: Understanding that P(⋅∣F)P(\cdot|F) defines a valid probability measure on the reduced sample space FF is key to applying known probability laws (like the Law of Total Probability or inclusion-exclusion) in a conditional setting.

Illustrative Examples of Conditional Probability

Several examples demonstrate how conditioning updates probabilities or how complex sequences of events are analyzed using the conditional framework:

  • Example 5a (Accident Prone Policyholders): This calculates the probability of an accident in year 2, given an accident in year 1, by conditioning on whether the policyholder is accident-prone (AA) or not (AcA^c). This requires updating the prior probability of being accident-prone given the first accident, P(A∣A1)P(A|A_1), using Bayes' formula implicitly, which is then used in the Law of Total Probability form for P(A2∣A1)P(A_2|A_1): P(A2∣A1)=P(A2∣AA1)P(A∣A1)+P(A2∣AcA1)P(Ac∣A1)P(A_2|A_1) = P(A_2|AA_1)P(A|A_1) + P(A_2|A^cA_1)P(A^c|A_1) If P(A)=3/10P(A) = 3/10 and P(A1)=0.26P(A_1) = 0.26, then P(A∣A1)=P(A1∣A)P(A)P(A1)=(0.4)(0.3)0.26=6/13P(A|A_1) = \frac{P(A_1|A)P(A)}{P(A_1)} = \frac{(0.4)(0.3)}{0.26} = 6/13 109.

  • Example 5c (Run Theory): This calculates the probability P(E)P(E) that a run of nn successes occurs before a run of mm failures in independent Bernoulli trials. This is solved by setting up and solving a system of linear equations derived from conditioning on the outcome of the first trial (HH) and subsequent trials. The final probability P(E)P(E) is given by: P(E)=pn−1(1−qm)pn−1+qm−1−pn−1qm−1(5.7)P(E) = \frac{p^{n-1}(1 - q^m)}{p^{n-1} + q^{m-1} - p^{n-1}q^{m-1}} \quad (5.7) The probability that a run of mm failures precedes a run of nn successes is obtained by swapping p↔qp \leftrightarrow q and n↔mn \leftrightarrow m 111.

  • Example 5d (The Matching Problem): This determines the probability PnP_n of no matches when nn men select nn hats randomly. Conditioning on whether the first man matches yields the recurrence relation: Pn=n−1nPn−1+1nPn−2(5.10)P_n = \frac{n-1}{n} P_{n-1} + \frac{1}{n} P_{n-2} \quad (5.10) With initial conditions P1=0P_1 = 0 and P2=1/2P_2 = 1/2, the solution involves an alternating sum, which converges to 1/e1/e for large nn: Pn=12!−13!+14!−⋯+(−1)nn!P_n = \frac{1}{2!} - \frac{1}{3!} + \frac{1}{4!} - \cdots + \frac{(-1)^n}{n!} The probability of exactly kk matches is 1k!Pn−k\frac{1}{k!} P_{n-k} 113.

7.2 Conditional Independence

A crucial concept extends the idea of independence to conditional settings.

Events E1E_1 and E2E_2 are conditionally independent given FF if knowing FF occurred does not change the conditional probability of E1E_1 based on knowledge of E2E_2: P(E1∣E2F)=P(E1∣F)(5.11)P(E_1|E_2F) = P(E_1|F) \quad (5.11) Equivalently, this means the joint conditional probability factors: P(E1E2∣F)=P(E1∣F)P(E2∣F)(5.12)P(E_1E_2|F) = P(E_1|F)P(E_2|F) \quad (5.12)

Tip: Conditional independence (E1E_1 and E2E_2 independent given FF) is not the same as unconditional independence (E1E_1 and E2E_2 independent). Events can be dependent overall but independent once the underlying cause or context (FF) is known. For instance, observing the outcome of the first toss (FF) makes the outcome of the second toss independent of the first.

Sequential Updating and Conditional Independence

The concept of conditional independence is vital for sequential updating of probabilities (Bayesian updating).

If we have hypotheses HiH_i with prior probabilities P(Hi)P(H_i), and evidence EE is received, the posterior probability P(Hi∣E)P(H_i|E) is given by Bayes' formula: P(Hi∣E)=P(E∣Hi)P(Hi)∑jP(E∣Hj)P(Hj)(5.13)P(H_i|E) = \frac{P(E|H_i)P(H_i)}{\sum_j P(E|H_j)P(H_j)} \quad (5.13)

If we receive evidence sequentially, first E1E_1 and then E2E_2, the posterior probability P(Hi∣E1E2)P(H_i|E_1E_2) can be calculated using E2E_2 and the updated prior P(Hi∣E1)P(H_i|E_1) if and only if E1E_1 and E2E_2 are conditionally independent given HiH_i for all ii: P(E1E2∣Hi)=P(E1∣Hi)P(E2∣Hi)P(E_1E_2|H_i) = P(E_1|H_i)P(E_2|H_i) When this condition holds, sequential updating is simplified: the new posterior probability depends only on the previous posterior probability and the likelihood of the new evidence given the hypothesis, not on the detailed history of all prior evidence 115.

  • Example 5e (Laplace's Rule of Succession): Illustrates conditional independence. If a coin selected from a box has a probability i/ki/k of landing heads, and the first nn flips are heads (FnF_n), the probability that the (n+1)(n+1)st flip is also heads, P(H∣Fn)P(H|F_n), simplifies because coin outcomes are conditionally independent given the specific coin chosen (CiC_i): P(H∣Fn)≈n+1n+2for large kP(H|F_n) \approx \frac{n+1}{n+2} \quad \text{for large } k

7.3 Summary of Core Conditional Probability Identities

The following identities, introduced or reinforced in this section, are essential for solving conditional probability problems 116:

  • Definition of Conditional Probability: P(E∣F)=P(EF)P(F)P(E|F) = \frac{P(EF)}{P(F)}
  • Multiplication Rule of Probability (General Form): P(E1E2⋯En)=P(E1)P(E2∣E1)⋯P(En∣E1E2⋯En−1)P(E_1E_2 \cdots E_n) = P(E_1)P(E_2|E_1) \cdots P(E_n|E_1 E_2 \cdots E_{n-1})
  • Law of Total Probability (Conditioning on FF): P(E)=P(E∣F)P(F)+P(E∣Fc)P(Fc)P(E) = P(E|F)P(F) + P(E|F^c)P(F^c)
  • Odds Update: The ratio of posterior odds to prior odds when evidence EE is obtained is the likelihood ratio: P(H∣E)P(Hc∣E)=P(H)P(Hc)P(E∣H)P(E∣Hc)\frac{P(H|E)}{P(H^c|E)} = \frac{P(H)}{P(H^c)} \frac{P(E|H)}{P(E|H^c)}
  • Bayes' Formula (for exhaustive, mutually exclusive events FiF_i): P(Fj∣E)=P(E∣Fj)P(Fj)∑i=1nP(E∣Fi)P(Fi)P(F_j|E) = \frac{P(E|F_j)P(F_j)}{\sum_{i=1}^n P(E|F_i)P(F_i)}
  • Independence: EE and FF are independent if P(EF)=P(E)P(F)P(EF) = P(E)P(F), which is equivalent to P(E∣F)=P(E)P(E|F) = P(E) or P(F∣E)=P(F)P(F|E) = P(F).

This section summarizes concepts related to discrete random variables, including their expected value, variance, and the definitions and properties of several core discrete probability distributions, covering material typical of Chapter 4.

7.4 Discrete random variables and expected value

A discrete random variable XX is one whose set of possible values is finite or countably infinite.

The expected value (or mean) of a discrete random variable XX, denoted E[X]E[X] or μX\mu_X, is the weighted average of the possible values, where the weights are the corresponding probabilities. If XX can take values x1,x2,x3,…x_1, x_2, x_3, \dots with probabilities P(X=xi)=p(xi)P(X=x_i) = p(x_i), then: E[X=∑ixip(xi)E[X = \sum_{i} x_i p(x_i).

7.5 Common discrete distributions

This part of the study guide focuses on summarizing key discrete distributions based on the context provided by the chapter exercises, although the formal definitions are often derived in preceding sections.

7.6 Bernoulli distribution

A Bernoulli trial is a single experiment with two outcomes: success (S) or failure (F). If XX is a random variable indicating success (X=1X=1) or failure (X=0X=0), and the probability of success is pp:

  • Probability Mass Function (PMF): p=pp = p and p=1−pp = 1-p .
  • Expected Value: E[X=pE[X = p.
  • Variance: Var(X)=p(1−p)\text{Var}(X) = p(1-p).

7.7 Binomial distribution

The Binomial distribution describes the number of successes in a fixed number (nn) of independent Bernoulli trials, each with success probability pp. Let XX be the number of successes.

  • X∼Binomial(n,p)X \sim \text{Binomial}(n, p).
  • PMF: P(X=k)=(nk)pk(1−p)n−kP(X=k) = \binom{n}{k} p^k (1-p)^{n-k} for k=0,1,…,nk = 0, 1, \dots, n.
  • Expected Value: E[X=npE[X = np.
  • Variance: Var(X)=np(1−p)\text{Var}(X) = np(1-p).

7.8 Poisson distribution

The Poisson distribution often models the number of events occurring in a fixed interval of time or space, given an average rate λ\lambda (lambda).

  • X∼Poisson(λ)X \sim \text{Poisson}(\lambda).
  • PMF: P(X=k)=e−λλkk!P(X=k) = \frac{e^{-\lambda} \lambda^k}{k!} for k=0,1,2,…k = 0, 1, 2, \dots.
  • Expected Value: E[X=λE[X = \lambda.
  • Variance: Var(X)=λ\text{Var}(X) = \lambda.

7.9 Geometric distribution

The Geometric distribution models the number of independent Bernoulli trials needed until the first success occurs. If pp is the success probability, let XX be the trial number of the first success.

  • PMF: P(X=k)=(1−p)k−1pP(X=k) = (1-p)^{k-1} p for k=1,2,3,…k = 1, 2, 3, \dots.
  • Expected Value: E[X=1/pE[X = 1/p.
  • Variance: Var(X)=1−pp2\text{Var}(X) = \frac{1-p}{p^2}.

Tip: Be careful to distinguish between the Geometric distribution counting the number of trials (X≥1X \geq 1) and a variant counting the number of failures before the first success (Y=X−1Y=X-1, where Y≥0Y \geq 0).

7.10 Hypergeometric distribution

This distribution models the number of successes in nn draws without replacement from a finite population of size NN containing KK successes. Let XX be the number of successes drawn.

  • X∼Hypergeometric(N,K,n)X \sim \text{Hypergeometric}(N, K, n).
  • PMF: P(X=k)=(Kk)(N−Kn−k)(Nn)P(X=k) = \frac{\binom{K}{k} \binom{N-K}{n-k}}{\binom{N}{n}} for max⁡(0,n−(N−K))≤k≤min⁡(n,K)\max(0, n - (N-K)) \le k \le \min(n, K).

7.11 Properties of Expectation

The expected value operator E[⋅]E[\cdot] possesses several linearity and transformation properties essential for calculations. Let XX and YY be random variables, and let cc and dd be constants.

7.12 Linearity of Expectation

  1. Constant Multiple Rule: The expected value of a constant times a random variable is the constant times the expected value of the random variable: E[cX=cE[X]E[c X = c E[X]
  2. Sum Rule: The expected value of a sum of random variables is the sum of their expected values (this holds regardless of independence): E[X+Y=E[X+E[Y]E[X + Y = E[X + E[Y]
  3. General Linearity: Combining the above rules: E[cX+dY=cE[X+dE[Y]E[c X + d Y = c E[X + d E[Y].

Tip: Linearity of expectation is one of the most powerful tools, as it does not require the variables XX and YY to be independent, unlike variance properties involving cross-terms.

7.13 Expectation of a Function of a Random Variable

If Y=g(X)Y = g(X), where g(⋅)g(\cdot) is some function, the expected value of YY is calculated using the PMF of XX: E[g(X)]=∑ig(xi)p(xi)E[g(X)] = \sum_{i} g(x_i) p(x_i).

If Y=g(X,W)Y = g(X, W), where XX and WW are discrete random variables with joint PMF p(x,w)p(x, w): E[g(X,W)]=∑w∑xg(x,w)p(x,w)E[g(X, W)] = \sum_{w} \sum_{x} g(x, w) p(x, w).

7.14 Expectation and Independence

If XX and YY are independent random variables, then the expectation of their product is the product of their expectations: E[XY=E[XE[Y(If X and Y are independent)E[X Y = E[X E[Y \quad \text{(If } X \text{ and } Y \text{ are independent)} 125 126.

7.15 Variance and Covariance Properties

The variance measures the spread of a random variable around its mean. It is defined using expectation: Var(X)=E[(X−E[X])2=E[X2−(E[X])2\text{Var}(X) = E[(X - E[X])^2 = E[X^2 - (E[X])^2.

7.16 Variance Properties

  1. Constant Multiple Rule: Var(cX)=c2Var(X)\text{Var}(c X) = c^2 \text{Var}(X)
  2. Shift Invariance: Shifting a random variable by a constant does not change its variance: Var(X+c)=Var(X)\text{Var}(X + c) = \text{Var}(X)

7.17 Variance of Sums (Involving Independence)

If XX and YY are independent: Var(X+Y)=Var(X)+Var(Y)\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y)

If XX and YY are not independent, the formula includes the covariance term, Cov(X,Y)=E[XY−E[X]E[Y]\text{Cov}(X, Y) = E[XY - E[X]E[Y]: Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y)\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y) + 2 \text{Cov}(X, Y) 127.

Tip: If XX and YY are independent, Cov(X,Y)=0\text{Cov}(X, Y) = 0, which simplifies the general variance formula back to the sum of individual variances.

7.18 Example Application (Problem 3.57 Context)

Consider a stock price movement where the price changes by +1+1 (Up, probability pp) or −1-1 (Down, probability 1−p1-p) on each day, independently. Let XiX_i be the change on day ii. E[Xi=p+(1−p)(−1)=2p−1E[X_i = p + (1-p)(-1) = 2p - 1. If the price change after nn days is Sn=∑i=1nXiS_n = \sum_{i=1}^n X_i, then by linearity: E[Sn=∑i=1nE[Xi=n(2p−1)E[S_n = \sum_{i=1}^n E[X_i = n(2p - 1) Since the XiX_i's are independent, the variance of the sum is the sum of variances: Var(Xi)=E[Xi2−(E[Xi])2=(p2+(1−p)(−1)2)−(2p−1)2=1−(2p−1)2=4p(1−p)\text{Var}(X_i) = E[X_i^2 - (E[X_i])^2 = (p ^2 + (1-p)(-1)^2) - (2p-1)^2 = 1 - (2p-1)^2 = 4p(1-p) 1. Var(Sn)=∑i=1nVar(Xi)=n⋅4p(1−p)\text{Var}(S_n) = \sum_{i=1}^n \text{Var}(X_i) = n \cdot 4p(1-p) 122.

8. Random variables and core expectation properties (part 4)

This section introduces the fundamental concepts of random variables, focusing on discrete random variables, the definition and properties of expected value, and the expectation of a function of a random variable, bridging into common discrete distributions.

8.1 Random variables

A random variable (XX or YY) is defined as a real-valued function defined on the sample space of an experiment. It is used when we are primarily interested in a numerical summary of the outcome rather than the outcome itself.

Example: Tossing 3 fair coins; YY (the number of heads) is a random variable taking values {0,1,2,3}\{0, 1, 2, 3\} with known probabilities 132.

If the possible outcomes of the random variable are countable, it is known as a discrete random variable.

Example: In drawing 3 balls from 20 numbered balls, XX (the largest number selected) is a random variable taking values {3,4,…,20}\{3, 4, \ldots, 20\} 133.

8.2 Cumulative Distribution Function (CDF)

For any random variable XX, the cumulative distribution function (CDF), denoted F(x)F(x), is defined as: F(x)=P{X≤x},−∞<x<∞F(x) = P\{X \leq x\}, \quad -\infty < x < \infty The CDF specifies the probability that the random variable is less than or equal to a given value xx. Key properties of the CDF:

  • F(x)F(x) is a nondecreasing function of xx (if a≤ba \leq b, then F(a)≤F(b)F(a) \leq F(b)).

8.3 Discrete random variables and probability mass function (PMF)

A random variable XX is discrete if it can take on at most a countable number of possible values.

The probability mass function (PMF) of a discrete random variable XX, denoted p(a)p(a), is defined as: p(a)=P{X=a}p(a) = P\{X = a\} The PMF must satisfy two conditions:

  1. p(x)≥0p(x) \geq 0 for all xx.
  2. The sum of probabilities over all possible values must equal 1: ∑i=1∞p(xi)=1\sum_{i=1}^{\infty} p(x_i) = 1 The PMF is positive for at most a countable number of values 138.

The CDF for a discrete random variable can be expressed using the PMF by summing over all values less than or equal to aa: F(a)=∑all x≤ap(x)F(a) = \sum_{\text{all } x \leq a} p(x) If the possible values x1<x2<x3<⋯x_1 < x_2 < x_3 < \cdots, the CDF is a step function, where the size of the jump at xix_i is p(xi)p(x_i).

Example: If a random variable XX has p=1/4,p=1/2,p=1/8,p=1/8p = 1/4, p = 1/2, p = 1/8, p = 1/8, its CDF F(a)F(a) is 1/41/4 for 1≤a<21 \leq a < 2, and 3/43/4 for 2≤a<32 \leq a < 3 4 140.

8.4 Expected value

The expected value or expectation of a discrete random variable XX, denoted E[X]E[X], is the weighted average of its possible values, where the weights are the corresponding probabilities defined by the PMF: E[X=∑x:p(x)>0xp(x)E[X = \sum_{x:p(x)>0} x p(x) This concept is analogous to the center of gravity of a distribution of mass143.

Example: If a fair die roll XX has p(i)=1/6p(i) = 1/6 for i=1,…,6i=1, \ldots, 6, the expected value is E[X=7/2E[X = 7/2.

Indicator Variables: If II is an indicator variable for event AA (I=1I=1 if AA occurs, I=0I=0 otherwise), its expected value is equal to the probability of AA occurring: E[I=P(A)E[I = P(A) 141.

8.5 Expectation of a function of a random variable

If gg is a real-valued function, the expected value of g(X)g(X), denoted E[g(X)]E[g(X)], can be calculated in two equivalent ways:

  1. Two-step process: Determine the PMF of Y=g(X)Y = g(X) and then calculate E[Y]E[Y].
  2. Direct Calculation (Proposition 4.1): If XX takes values xix_i with probabilities p(xi)p(x_i), then: E[g(X)]=∑ig(xi)p(xi)E[g(X)] = \sum_{i} g(x_i) p(x_i)

This proposition states that E[g(X)]E[g(X)] is the weighted average of the values g(x)g(x), weighted by the probability that XX assumes xx.

Tip: Proposition 4.1 is generally more efficient than deriving the PMF of g(X)g(X) first. For example, E[X2]E[X^2] can be computed directly using the PMF of XX.

Example: If XX has P{X=−1}=.2P\{X = -1\}=.2, P{X=0}=.5P\{X = 0\}=.5, P{X=1}=.3P\{X = 1\}=.3, then E[X2=(−1)2(0.2)+2(0.5)+2(0.3)=0.5E[X^2 = (-1)^2(0.2) + ^2(0.5) + ^2(0.3) = 0.5. Note that E[X2≠(E[X])2E[X^2 \neq (E[X])^2 1 144.

This section also introduces optimization based on expected profit, showing that stocking s∗+1s^* + 1 units maximizes expected profit if s∗s^* is the largest integer satisfying: ∑i=0sp(i)<bb+ℓ\sum_{i=0}^{s} p(i) < \frac{b}{b + \ell} where bb is profit per unit sold and ℓ\ell is loss per unsold unit, assuming XX is the number ordered 145.

This section focuses on properties of expectation, introducing the concept of variance as a measure of spread, and presenting an alternative formula for calculating variance.

8.6 Linearity of expectation property

A key consequence of the expectation properties (Proposition 4.1, likely introduced previously) is the linearity property for expectations involving constants.

For any constants aa and bb, and a random variable XX: E[aX+b=aE[X+bE[aX + b = aE[X + b

The proof relies on the definition of expected value for a discrete random variable with probability mass function p(x)p(x): E[aX+b=∑x:p(x)>0(ax+b)p(x)E[aX + b = \sum_{x:p(x)>0} (ax + b)p(x) =a∑x:p(x)>0xp(x)+b∑x:p(x)>0p(x)= a \sum_{x:p(x)>0} xp(x) + b \sum_{x:p(x)>0} p(x) =aE[X+b= aE[X + b 1. =aE[X+b = aE[X + b \text{ }.

The expected value E[X]E[X] is also known as the mean or the first moment of XX. The quantity E[Xn]E[X^n] for n≥1n \geq 1 is called the nnth moment of XX, calculated as: E[Xn=∑x:p(x)>0xnp(x) E[X^n = \sum_{x:p(x)>0} x^np(x) \text{ }.

8.7 Introduction to variance

While E[X]E[X] provides the weighted average of possible values, it does not describe the variation or spread of those values. For example, random variables WW (always 0), YY (−1-1 or 11 with probability 1/21/2 each), and ZZ (−100-100 or 100100 with probability 1/21/2 each) all have an expectation of 0, but their values are spread differently 147.

A useful measure of variation should reflect how far XX tends to be from its mean, μ=E[X]\mu = E[X]. While E[∣X−μ∣]E[|X - \mu|] is conceptually sound, the quantity based on the square of the difference is mathematically more tractable and is conventionally used: the expectation of the square of the difference between XX and its mean.

8.8 Definition and calculation of variance

The variance of a random variable XX with mean μ\mu is formally defined as: Var(X)=E[(X−μ)2 \text{Var}(X) = E[(X - \mu)^2 \text{ }.

Alternative Variance Formula

An alternative and often more convenient formula for calculating variance is derived by expanding the definition: Var(X)=E[(X−μ)2]\text{Var}(X) = E[(X - \mu)^2] =∑x(x−μ)2p(x)= \sum_x (x - \mu)^2 p(x) =∑x(x2−2μx+μ2)p(x)= \sum_x (x^2 - 2\mu x + \mu^2)p(x) =∑xx2p(x)−2μ∑xxp(x)+μ2∑xp(x)= \sum_x x^2p(x) - 2\mu \sum_x xp(x) + \mu^2 \sum_x p(x) =E[X2−2μ2+μ2= E[X^2 - 2\mu^2 + \mu^2 =E[X2−μ2= E[X^2 - \mu^2

Thus, the primary computational formula is: Var(X)=E[X2−(E[X])2 \text{Var}(X) = E[X^2 - (E[X])^2 \text{ }. In words, the variance of XX equals the expected value of X2X^2 minus the square of its expected value.

Tip: This computational formula, Var(X)=E[X2−(E[X])2\text{Var}(X) = E[X^2 - (E[X])^2, is generally the easiest method for calculating variance in practice.

Example Calculation

To calculate Var(X)\text{Var}(X) when XX is the outcome of rolling a fair die:

  1. We know E[X=72E[X = \frac{7}{2}.
  2. Calculate E[X2]E[X^2]: E[X2=16(12+22+32+42+52+62)=16=916 E[X^2 = \frac{1}{6}(1^2 + 2^2 + 3^2 + 4^2 + 5^2 + 6^2) = \frac{1}{6} = \frac{91}{6} \text{ }91.
  3. Calculate Var(X)\text{Var}(X): Var(X)=E[X2−(E[X])2=916−(72)2=916−494\text{Var}(X) = E[X^2 - (E[X])^2 = \frac{91}{6} - \left(\frac{7}{2}\right)^2 = \frac{91}{6} - \frac{49}{4} Var(X)=18212−14712=3512 \text{Var}(X) = \frac{182}{12} - \frac{147}{12} = \frac{35}{12} \text{ }.

8.9 Variance property for linear transformations

Similar to expectation, variance also behaves predictably under linear transformations. For any constants aa and bb: Var(aX+b)=a2Var(X) \text{Var}(aX + b) = a^2\text{Var}(X) \text{ } 148.

Note on Utility Maximization (Contextual Background): Although this subsection focuses on moments, context from the preceding section (page 146) established that when making decisions under uncertainty involving consequences (CiC_i) with assigned utilities u(Ci)u(C_i), the preferred action is the one that maximizes the expected utility of its consequence, given by ∑piu(Ci)\sum p_i u(C_i). This concept links probability theory to decision theory by valuing uncertain outcomes based on subjective utility 146.

9. Random variables and core expectation properties (part 5)

This section focuses on introducing specific discrete probability distributions—Bernoulli, Binomial, Poisson, Geometric, and Hypergeometric—along with calculating the expected value and variance for the Binomial distribution, and exploring properties related to variance.

9.1 Properties of Variance and Standard Deviation

The variance has several useful properties relating to linear transformations of a random variable XX. If XX is a random variable with expected value μ=E[X]\mu = E[X] and variance Var(X)\text{Var}(X): Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2 \text{Var}(X) This derivation is shown by: Var(aX+b)=E[(aX+b−E[aX+b])2\text{Var}(aX + b) = E[(aX + b - E[aX + b])^2 Since E[aX+b=aμ+bE[aX + b = a\mu + b: Var(aX+b)=E[(aX+b−aμ−b)2=E[(a(X−μ))2=E[a2(X−μ)2=a2E[(X−μ)2=a2Var(X)\text{Var}(aX + b) = E[(aX + b - a\mu - b)^2 = E[(a(X - \mu))^2 = E[a^2(X - \mu)^2 = a^2 E[(X - \mu)^2 = a^2 \text{Var}(X) The square root of the variance is defined as the standard deviation, denoted by SD(X)\text{SD}(X): SD(X)=Var(X)\text{SD}(X) = \sqrt{\text{Var}(X)} The variance is conceptually analogous to the moment of inertia in mechanics, while the mean is analogous to the center of gravity of a mass distribution.

9.2 The Bernoulli and Binomial Random Variables

Discrete random variables are often classified by their probability mass functions (PMFs).

9.3 Bernoulli distribution

A trial classified as either a success or failure defines a Bernoulli random variable XX, where X=1X=1 for success and X=0X=0 for failure. If pp is the probability of success (0≤p≤10 \le p \le 1), the PMF is: p=P{X=0}=1−pp = P\{X = 0\} = 1 - p . p=P{X=1}=pp = P\{X = 1\} = p 1.

9.4 Binomial distribution

A random variable XX representing the number of successes in nn independent trials, where each trial has success probability pp, is a binomial random variable with parameters (n,p)(n, p). A Bernoulli random variable is a special case where n=1n=1.

The PMF for a binomial random variable is: p(i)=P{X=i}=(ni)pi(1−p)n−i,i=0,1,…,np(i) = P\{X = i\} = \binom{n}{i} p^i (1 - p)^{n-i}, \quad i = 0, 1, \dots, n The sum of these probabilities equals 1 due to the binomial theorem: ∑i=0np(i)=[p+(1−p)]n=1\sum_{i=0}^{n} p(i) = [p + (1 - p)]^n = 1 149.

Example: If five fair coins are flipped (n=5,p=1/2n=5, p=1/2), the probability of getting exactly 2 heads is P{X=2}=(52)(1/2)2(1/2)3=10/32P\{X=2\} = \binom{5}{2} (1/2)^2 (1/2)^3 = 10/32 150.

9.5 Properties of Binomial Random Variables

If XX is binomial with parameters (n,p)(n, p), its expected value and variance are: E[X=npE[X = np Var(X)=np(1−p)\text{Var}(X) = np(1 - p) These moments are derived using the identity (ni)=ni(n−1i−1)\binom{n}{i} = \frac{n}{i} \binom{n-1}{i-1} 154.

Proposition 6.1 (Mode of the Binomial Distribution): If X∼Binomial(n,p)X \sim \text{Binomial}(n, p) with 0<p<10 < p < 1, P{X=k}P\{X = k\} increases monotonically and then decreases monotonically as kk goes from 00 to nn. The largest value occurs when kk is the largest integer less than or equal to (n+1)p(n + 1)p.

Tip: To prove this, examine the ratio P{X=k}P{X=k−1}\frac{P\{X = k\}}{P\{X = k - 1\}}. This ratio is greater than 1 if and only if k≤(n+1)pk \le (n+1)p 155.

9.6 Computing the Binomial Distribution Function

The cumulative distribution function (CDF) for X∼Binomial(n,p)X \sim \text{Binomial}(n, p) is: P{X≤i}=∑k=0i(nk)pk(1−p)n−k,i=0,1,…,nP\{X \le i\} = \sum_{k=0}^{i} \binom{n}{k} p^k (1 - p)^{n-k}, \quad i = 0, 1, \dots, n This computation is efficiently done using the recursive relationship derived from Proposition 6.1: P{X=k+1}=p1−pn−kk+1P{X=k}P\{X = k + 1\} = \frac{p}{1 - p} \frac{n - k}{k + 1} P\{X = k\}

9.7 The Poisson Random Variable

A random variable XX taking values 0,1,2,…0, 1, 2, \dots is a Poisson random variable with parameter λ>0\lambda > 0 if its PMF is: p(i)=P{X=i}=e−λλii!,i=0,1,2,…p(i) = P\{X = i\} = \frac{e^{-\lambda} \lambda^i}{i!}, \quad i = 0, 1, 2, \dots This distribution arises in many applications, such as counting rare events.

9.8 Poisson Approximation to the Binomial Distribution

The Poisson distribution serves as an excellent approximation for the binomial distribution Binomial(n,p)\text{Binomial}(n, p) when nn is large and pp is small, such that λ=np\lambda = np is of moderate size 158. For large nn and moderate λ\lambda: P{X=i}≈e−λλii!P\{X = i\} \approx \frac{e^{-\lambda} \lambda^i}{i!} Examples of phenomena that often follow this distribution include the number of misprints on a page, the number of wrongful telephone calls dialed in a day, or the number of α\alpha-particles discharged from radioactive material in a fixed time 159.

9.9 Expected Value and Variance of the Poisson Distribution

For a Poisson random variable XX with parameter λ\lambda: E[X=λE[X = \lambda Var(X)=λ\text{Var}(X) = \lambda This result aligns with the binomial approximation, where Var(X)≈np(1−p)≈λ(1−p)≈λ\text{Var}(X) \approx np(1-p) \approx \lambda(1-p) \approx \lambda since pp is small.

The calculation for the variance uses E[X2]E[X^2]: E[X2=∑i=0∞i2e−λλii!=λ(λ+1)E[X^2 = \sum_{i=0}^{\infty} i^2 \frac{e^{-\lambda} \lambda^i}{i!} = \lambda(\lambda + 1) Thus, Var(X)=E[X2−(E[X])2=λ(λ+1)−λ2=λ\text{Var}(X) = E[X^2 - (E[X])^2 = \lambda(\lambda + 1) - \lambda^2 = \lambda 161.

Example: If the number of typographical errors on a page follows Poisson with λ=1/2\lambda = 1/2, the probability of at least one error is P{X≥1}=1−P{X=0}=1−e−1/2≈0.393P\{X \ge 1\} = 1 - P\{X=0\} = 1 - e^{-1/2} \approx 0.393 160.

9.10 The Poisson Paradigm

The Poisson distribution can often approximate the count of events even when trials are weakly dependent, provided all individual event probabilities are small.

Poisson Paradigm: If nn events occur, with pip_i being the probability that event ii occurs, and all pip_i are small and the trials are independent or weakly dependent, then the total number of occurrences approximately follows a Poisson distribution with mean ∑i=1npi\sum_{i=1}^{n} p_i 163.

Example (Birthday Problem Approximation): To approximate the probability that among nn people, no two share a birthday, we consider (n2)\binom{n}{2} trials, where success is a pair sharing a birthday, P(success)=1/365P(\text{success}) = 1/365. The number of matches NN is approximately Poisson with λ=(n2)/365=n(n−1)/730\lambda = \binom{n}{2} / 365 = n(n-1)/730. P{no matches}=P{N=0}≈exp⁡{−λ}P\{\text{no matches}\} = P\{N=0\} \approx \exp\{-\lambda\} 162.

This section focuses on deriving recursive formulas for runs of successes, illustrating with an example, and then deriving the Poisson probability distribution from fundamental assumptions about event occurrences over time intervals.

9.11 Recursive calculation for runs of length k

The text details a method to calculate the probability of having at least one run of kk consecutive successes (e.g., heads in coin flips) in nn independent trials, using recursion based on the location of the first failure (tail).

Let AnA_n be the event that there is a string of kk consecutive heads in nn flips, and let Pn=P(An)P_n = P(A_n). The events FjF_j (the first tail appears on flip jj, for j=1,…,kj=1, \dots, k) and HH (the first kk flips are all heads) are mutually exclusive and exhaustive. The probability PnP_n can be found by conditioning: P(An)=∑j=1kP(An∣Fj)P(Fj)+P(An∣H)P(H)P(A_n) = \sum_{j=1}^{k} P(A_n|F_j)P(F_j) + P(A_n|H)P(H)

Conditional probabilities and recursion

If the first tail appears on flip jj (where j<kj < k), those jj flips are "wasted" regarding the run of kk heads, so the probability of success in the remaining n−jn-j flips is Pn−jP_{n-j}. Thus, P(An∣Fj)=Pn−jP(A_n|F_j) = P_{n-j}. If the first kk flips are all heads, then P(An∣H)=1P(A_n|H) = 1.

The probabilities of the conditioning events are:

  • P(Fj)=pj−1(1−p)P(F_j) = p^{j-1}(1-p), for j<kj < k (where pp is the probability of success/head).
  • P(H)=pkP(H) = p^k.

Substituting these into the total probability equation yields the recursive formula for PnP_n: Pn=∑j=1kPn−jpj−1(1−p)+pkP_n = \sum_{j=1}^{k} P_{n-j} p^{j-1}(1-p) + p^k

This recursion is used with initial conditions Pj=0P_j = 0 for j<kj < k, and Pk=pkP_k = p^k.

Example: For k=2k=2 (run of 2 consecutive heads) and a fair coin (p=1/2p=1/2) flipped n=4n=4 times:

  • Initial conditions: P1=0P_1 = 0, P2=(1/2)2=1/4P_2 = (1/2)^2 = 1/4.
  • For P3P_3: P3=P2(1/2)(1−1/2)+P1(1/2)2+(1/2)2P_3 = P_2(1/2)(1-1/2) + P_1(1/2)^2 + (1/2)^2 P3=(1/4)(1/2)+0+1/4=1/8+2/8=3/8P_3 = (1/4)(1/2) + 0 + 1/4 = 1/8 + 2/8 = 3/8
  • For P4P_4: P4=P3(1/2)+P2(1/2)2+(1/2)2P_4 = P_3(1/2) + P_2(1/2)^2 + (1/2)^2 P4=(3/8)(1/2)+(1/4)(1/4)+1/4=3/16+1/16+4/16=8/16=1/2P_4 = (3/8)(1/2) + (1/4)(1/4) + 1/4 = 3/16 + 1/16 + 4/16 = 8/16 = 1/2 The result P4=1/2P_4 = 1/2 is confirmed by counting the 8 outcomes out of 24=162^4=16 total outcomes that contain 'hh' 166.

9.12 Assumptions leading to the Poisson process

The Poisson probability distribution models the number of "events" occurring randomly over a fixed interval of time (or space). This derivation relies on three key assumptions regarding events occurring in a small interval of length hh:

  1. The probability of exactly 1 event occurring in an interval of length hh is λh+o(h)\lambda h + o(h), where λ\lambda is a positive constant, and o(h)o(h) represents a function such that lim⁡h→0f(h)/h=0\lim_{h\to 0} f(h)/h = 0 (e.g., h2h^2 is o(h)o(h), but hh is not).
  2. The probability of 2 or more events occurring in an interval of length hh is o(h)o(h).
  3. The occurrences of events in any set of nn nonoverlapping intervals are independent.

Assumptions 1 and 2 imply that for small hh, the probability of one event is approximately λh\lambda h, while the probability of zero or multiple events is negligible compared to hh. Assumption 3 ensures that these occurrences are statistically independent across disjoint regions.

9.13 Deriving the Poisson distribution formula

To find the probability P{N(t)=k}P\{N(t) = k\}, where N(t)N(t) is the number of events in an interval of length tt, the interval [0,t][0, t] is divided into nn nonoverlapping subintervals, each of length t/nt/n.

The event {N(t)=k}\{N(t) = k\} can be decomposed into two mutually exclusive events AA and BB:

  • AA: Exactly kk of the nn subintervals contain exactly 1 event, and the remaining n−kn-k subintervals contain 0 events.
  • BB: N(t)=kN(t)=k and at least one subinterval contains 2 or more events.

The derivation shows that P(B)P(B) tends to zero as n→∞n \to \infty: P(B)≤∑i=1nP{ith subinterval contains 2 or more events}=∑i=1no(t/n)=n⋅o(t/n)P(B) \le \sum_{i=1}^{n} P\{\text{ith subinterval contains 2 or more events}\} = \sum_{i=1}^{n} o(t/n) = n \cdot o(t/n) Since lim⁡n→∞o(t/n)/(t/n)=0\lim_{n\to\infty} o(t/n)/(t/n) = 0, it follows that P(B)→0P(B) \to 0 as n→∞n \to \infty.

For event AA, we first determine P{0 events occur in an interval of length h}P\{\text{0 events occur in an interval of length } h\}: P{0 events}=1−[λh+o(h)+o(h)]=1−λh−o(h)P\{\text{0 events}\} = 1 - [\lambda h + o(h) + o(h)] = 1 - \lambda h - o(h) (The sum of two o(h)o(h) functions is also o(h)o(h)).

Due to independence (Assumption 3), the probability of event AA (choosing kk subintervals to have 1 event and n−kn-k to have 0 events) is: P(A)=(nk)[λtn+o(tn)]k[1−(λtn)−o(tn)]n−kP(A) = \binom{n}{k} \left[ \lambda \frac{t}{n} + o\left(\frac{t}{n}\right) \right]^k \left[ 1 - \left(\lambda \frac{t}{n}\right) - o\left(\frac{t}{n}\right) \right]^{n-k}

As n→∞n \to \infty, similar to the convergence shown for the binomial approximation, the terms yield: lim⁡n→∞[λtn+o(tn)]k[1−λtn−o(tn)]n−k→(λt)kk!e−λt\lim_{n\to\infty} \left[ \lambda \frac{t}{n} + o\left(\frac{t}{n}\right) \right]^k \left[ 1 - \frac{\lambda t}{n} - o\left(\frac{t}{n}\right) \right]^{n-k} \to \frac{(\lambda t)^k}{k!} e^{-\lambda t}

By taking the limit n→∞n \to \infty for Equation (7.2), P{N(t)=k}=P(A)+P(B)P\{N(t) = k\} = P(A) + P(B), and since P(B)→0P(B) \to 0, we arrive at the Poisson probability mass function: P{N(t)=k}=e−λt(λt)kk!,k=0,1,2,…P\{N(t) = k\}= \frac{e^{-\lambda t} (\lambda t)^k}{k!}, \quad k = 0, 1, 2, \dots The parameter for this Poisson random variable is λt\lambda t 167 168.

10. Random variables and core expectation properties (part 6)

This final segment of Chapter 4 focuses on concluding the Poisson distribution analysis and introducing two additional fundamental discrete probability distributions: the Geometric and the Negative Binomial random variables, along with calculations for the Geometric distribution's expected value and variance.

10.1 Poisson Process time until the next event

If events occur according to a Poisson process with rate λ\lambda per unit time, where the number of events N(t)N(t) in a fixed interval of length tt is Poisson distributed with mean λt\lambda t (Equation 7.5, derived from assumptions 1, 2, and 3), we can analyze the time until the next event.

The time XX (in units of time) until the next event occurs has a cumulative distribution function (CDF): F(t)=P{X≤t}=1−P{X>t}F(t) = P\{X \le t\} = 1 - P\{X > t\} Since X>tX > t if and only if no events occur within the next tt units of time, we have: P{X>t}=P{N(t)=0}=e−λtP\{X > t\} = P\{N(t) = 0\} = e^{-\lambda t} Therefore, the CDF of XX is: F(t)=1−e−λt,t≥0F(t) = 1 - e^{-\lambda t}, \quad t \ge 0 This means the time until the next event follows an exponential distribution, which is intrinsically linked to the Poisson process 169.

Example: If earthquakes occur at a rate of λ=2\lambda = 2 per week (Example 7e), the probability that at least 3 occur in the next 2 weeks is calculated using N∼PoissonN \sim \text{Poisson} 4: P{N≥3}=1−P{N=0}−P{N=1}−P{N=2}P\{N \ge 3\} = 1 - P\{N = 0\} - P\{N = 1\} - P\{N = 2\}. P{N≥3}=1−e−4−4e−4−422e−4=1−13e−4P\{N \ge 3\} = 1 - e^{-4} - 4e^{-4} - \frac{4^2}{2}e^{-4} = 1 - 13e^{-4} 2.

10.2 Computing Poisson probabilities

For a Poisson random variable XX with parameter λ\lambda, the ratio of successive probabilities can be computed recursively using the relation: P{X=i+1}P{X=i}=λi+1(7.6)\frac{P\{X = i + 1\}}{P\{X = i\}} = \frac{\lambda}{i + 1} \quad (7.6) This allows successive probabilities to be computed starting from P{X=0}=e−λP\{X = 0\} = e^{-\lambda}: P{X=1}=λP{X=0}P\{X = 1\} = \lambda P\{X = 0\} P{X=2}=λ2P{X=1}P\{X = 2\} = \frac{\lambda}{2} P\{X = 1\} P{X=i+1}=λi+1P{X=i}P\{X = i + 1\} = \frac{\lambda}{i + 1} P\{X = i\} This method is useful for computing cumulative probabilities, such as P{X≤k}P\{X \le k\}.

10.3 The geometric random variable

A geometric random variable XX with parameter pp (where 0<p<10 < p < 1) models the number of independent Bernoulli trials required until the first success occurs.

The probability mass function (PMF) is: P{X=n}=(1−p)n−1p,n=1,2,3,…(8.1)P\{X = n\} = (1 - p)^{n-1}p, \quad n = 1, 2, 3, \dots \quad (8.1) This formula arises because X=nX=n requires n−1n-1 initial failures (each with probability 1−p1-p) followed by one success (with probability pp), assuming independent trials.

Since ∑n=1∞P{X=n}=1\sum_{n=1}^{\infty} P\{X=n\} = 1, a success is guaranteed to occur eventually.

A key property relates to the probability of requiring at least kk trials: P{X≥k}=(1−p)k−1P\{X \ge k\} = (1 - p)^{k-1} This is equivalent to the probability that the first k−1k-1 trials are all failures.

Tip: In contexts where balls are drawn with replacement from an urn containing MM black balls and NN white balls, the probability of success (drawing a black ball) is p=MM+Np = \frac{M}{M+N}, and XX follows a geometric distribution 170.

10.4 Expected value and variance of the geometric distribution

If XX is a geometric random variable with parameter pp, its expected value E[X]E[X] and variance Var(X)\text{Var}(X) are derived as follows. Let q=1−pq = 1 - p.

Expected Value E[X]E[X]

The expected value is calculated using the definition E[X=∑i=1∞iP{X=i}E[X = \sum_{i=1}^{\infty} i P\{X=i\}: E[X=∑i=1∞iqi−1pE[X = \sum_{i=1}^{\infty} i q^{i-1}p Through algebraic manipulation involving splitting the sum and using the definition of E[X]E[X] again, the result is derived: E[X=1pE[X = \frac{1}{p} \quad 171.

Example: The expected number of rolls of a fair die required to obtain the value 1 is 1/(1/6)=61 / (1/6) = 6 rolls.

Variance Var(X)\text{Var}(X)

To find the variance, Var(X)=E[X2−(E[X])2\text{Var}(X) = E[X^2 - (E[X])^2, we first compute E[X2]E[X^2]: E[X2=∑i=1∞i2qi−1pE[X^2 = \sum_{i=1}^{\infty} i^2 q^{i-1}p Using a similar recursive derivation based on E[X]E[X]: pE[X2=2qE[X+1pE[X^2 = 2q E[X + 1 Substituting E[X=1/pE[X = 1/p: E[X2=2qp2+1p=2q+pp2=q+1p2E[X^2 = \frac{2q}{p^2} + \frac{1}{p} = \frac{2q + p}{p^2} = \frac{q+1}{p^2} Finally, the variance is: Var(X)=E[X2−(E[X])2=q+1p2−(1p)2=q+1−1p2=qp2\text{Var}(X) = E[X^2 - (E[X])^2 = \frac{q+1}{p^2} - \left(\frac{1}{p}\right)^2 = \frac{q+1 - 1}{p^2} = \frac{q}{p^2} Substituting q=1−pq=1-p: Var(X)=1−pp2\text{Var}(X) = \frac{1-p}{p^2} \quad .

10.5 The negative binomial random variable

The Negative Binomial Random Variable XX models the number of trials required to accumulate a fixed total of rr successes, where each independent trial has a probability pp of success (0<p<10 < p < 1).

The PMF for X=nX=n (where n≥rn \ge r) is given by: P{X=n}=(n−1r−1)pr(1−p)n−r(8.2)P\{X = n\} = \binom{n-1}{r-1} p^r (1 - p)^{n-r} \quad (8.2) \quad . This distribution requires that the rthr^{\text{th}} success occurs exactly on the nthn^{\text{th}} trial. This necessitates two conditions:

  1. There must be exactly r−1r-1 successes in the first n−1n-1 trials. The probability of this is: (n−1r−1)pr−1(1−p)(n−1)−(r−1)=(n−1r−1)pr−1(1−p)n−r\binom{n-1}{r-1} p^{r-1} (1 - p)^{(n-1) - (r-1)} = \binom{n-1}{r-1} p^{r-1} (1 - p)^{n-r}
  2. The nthn^{\text{th}} trial must be a success (probability pp). Multiplying these yields Equation (8.2) 172.

11. Continuous random variables and joint distributions (part 1)

This section summary covers discrete probability distributions introduced previously and begins the study of continuous random variables, focusing on expectations of sums of random variables and properties of the Cumulative Distribution Function (CDF).

11.1 Negative binomial random variable (Review/Context)

The negative binomial random variable, XX, with parameters (r,p)(r, p), represents the number of trials required to obtain rr successes, where each trial has a success probability pp. The probability mass function (PMF) is: P{X=n}=(n−1r−1)pr(1−p)n−r,n=r,r+1,…P\{X = n\}= \binom{n-1}{r-1} p^r(1-p)^{n-r}, \quad n = r, r+1, \dots.

A geometric random variable is a special case of the negative binomial where r=1r=1.

Tip: The number of trials required for rr successes can be modeled as the sum of rr independent geometric random variables, Y1+Y2+⋯+YrY_1 + Y_2 + \dots + Y_r, where YiY_i is the number of trials for the ii-th success after the (i−1)(i-1)-th success 173.

Expectation and Variance for Negative Binomial (r,p)(r, p): If XX is negative binomial with parameters (r,p)(r, p), its expected value and variance are:

  • Expected Value: E[X=rpE[X = \frac{r}{p}.
  • Variance: Var(X)=r(1−p)p2\text{Var}(X) = \frac{r(1-p)}{p^2} 174.

Example: The expected value of the number of times one must throw a die (success p=1/6p=1/6) until the outcome '1' occurs 4 times (r=4r=4) is E[X=4/(1/6)=24E[X = 4 / (1/6) = 24. The variance is Var(X)=4(5/6)(1/6)2=120\text{Var}(X) = \frac{4(5/6)}{(1/6)^2} = 120.

11.2 Hypergeometric random variable (Review/Context)

The hypergeometric random variable, XX, models the number of white balls selected when drawing nn balls without replacement from an urn containing NN balls, mm of which are white. The PMF is: P{X=i}=(mi)(N−mn−i)(Nn),i=0,1,…,nP\{X = i\}= \frac{\binom{m}{i}\binom{N - m}{n - i}}{\binom{N}{n}}, \quad i = 0, 1, \dots, n 175.

Expected Value and Variance for Hypergeometric (n,N,m)(n, N, m): The expected number of white balls selected is: E[X=nmNE[X = \frac{nm}{N} 177.

The variance is: Var(X)=nmN(1−mN)(1−n−1N−1)\text{Var}(X) = \frac{nm}{N}\left(1 - \frac{m}{N}\right)\left(1 - \frac{n-1}{N-1}\right).

Letting p=m/Np = m/N, the variance can be written as: Var(X)=np(1−p)(1−n−1N−1)\text{Var}(X) = np(1 - p)\left(\frac{1 - n - 1}{N - 1}\right).

Connection to Binomial: When NN is large relative to nn, the term N−nN−1\frac{N - n}{N - 1} approaches 1, and the variance approximates the binomial variance, Var(X)≈np(1−p)\text{Var}(X) \approx np(1-p).

11.3 Zeta (Zipf) distribution (Review/Context)

A random variable XX has a zeta (or Zipf) distribution if its PMF is: P{X=k}=Ckα+1,k=1,2,…P\{X = k\}= \frac{C}{k^{\alpha+1}}, \quad k = 1, 2, \dots. where α>0\alpha > 0, and CC is the normalizing constant: C=[∑k=1∞1kα+1]−1C = \left[ \sum_{k=1}^{\infty} \frac{1}{k^{\alpha+1}} \right]^{-1} 178. The summation defining CC relates to the Riemann zeta function, ζ(s)=∑k=1∞k−s\zeta(s) = \sum_{k=1}^{\infty} k^{-s}.

11.4 Expected value of sums of random variables

A fundamental property is that the expected value of a sum of random variables equals the sum of their expectations, provided the sample space SS is finite or countably infinite 179.

Proposition 9.1 (Expectation in terms of sample space): For a random variable XX defined on sample space SS with probability measure p(s)=P({s})p(s) = P(\{s\}): E[X=∑s∈SX(s)p(s)E[X = \sum_{s \in S} X(s) p(s) 180.

Corollary 9.2 (Linearity of Expectation): For random variables X1,X2,…,XnX_1, X_2, \dots, X_n: E\left[ \sum_{i=1}^n X_i \right = \sum_{i=1}^n E[X_i].

Example: For nn fair dice rolls, X=∑i=1nXiX = \sum_{i=1}^n X_i, where XiX_i is the result of die ii. Since E[Xi=7/2E[X_i = 7/2, the total expected sum is E[X=3.5nE[X = 3.5n 181.

The linearity of expectation holds even if the random variables are dependent, as demonstrated by the expected value of the hypergeometric distribution (which models dependent trials) resulting in E[X=np=nm/NE[X = np = nm/N.

11.5 Variance of sums of random variables (In context)

The variance calculation for the sum X=∑i=1nXiX = \sum_{i=1}^n X_i requires computing E[X2]E[X^2] and accounting for cross-products E[XiXj]E[X_i X_j].

For indicator variables Xi∈{0,1}X_i \in \{0, 1\}, E[Xi2=E[Xi=piE[X_i^2 = E[X_i = p_i. E[X2=∑i=1nE[Xi2+∑i=1n∑j≠iE[XiXj=∑ipi+∑i≠jP{Xi=1,Xj=1}E[X^2 = \sum_{i=1}^n E[X_i^2 + \sum_{i=1}^n \sum_{j \neq i} E[X_i X_j = \sum_{i} p_i + \sum_{i \neq j} P\{X_i=1, X_j=1\} 182.

  • Binomial Case (Independent XiX_i): E[XiXj=p2E[X_i X_j = p^2 for i≠ji \neq j. This yields Var(X)=np(1−p)\text{Var}(X) = np(1-p).
  • Hypergeometric Case (Dependent XiX_i): P{Xi=1,Xj=1}=mNm−1N−1P\{X_i=1, X_j=1\} = \frac{m}{N} \frac{m-1}{N-1} for i≠ji \neq j. This leads to the variance factor (1−n−1N−1)\left(1 - \frac{n-1}{N-1}\right) multiplying the binomial variance, resulting in the finite population correction factor.

11.6 Properties of the Cumulative Distribution Function (CDF)

For any random variable XX, the distribution function F(x)F(x) is defined as F(x)=P{X≤x}F(x) = P\{X \le x\}.

Key Properties of the CDF F(x)F(x):

  1. FF is nondecreasing: If a<ba < b, then F(a)≤F(b)F(a) \le F(b).
  2. lim⁡b→∞F(b)=1\lim_{b\to\infty} F(b) = 1.
  3. lim⁡b→−∞F(b)=0\lim_{b\to-\infty} F(b) = 0.
  4. FF is right continuous. That is, if bnb_n is a decreasing sequence converging to bb, lim⁡n→∞F(bn)=F(b)\lim_{n\to\infty} F(b_n) = F(b) 183.

Calculating Probabilities using the CDF:

  • For a<ba < b: P{a<X≤b}=F(b)−F(a)P\{a < X \le b\} = F(b) - F(a). This follows because {X≤b}={X≤a}∪{a<X≤b}\{X \le b\} = \{X \le a\} \cup \{a < X \le b\}.
  • Probability of strict inequality: P{X<b}=lim⁡n→∞F(b−1n)P\{X < b\} = \lim_{n\to\infty} F\left(b - \frac{1}{n}\right). Note that P{X<b}P\{X < b\} does not necessarily equal F(b)F(b), as F(b)F(b) includes the probability that XX equals bb 184.

Example: Given a piecewise CDF F(x)F(x), we can compute specific probabilities. For instance, P{a<X≤b}=F(b)−F(a)P\{a < X \le b\} = F(b) - F(a). If XX is discrete, P{X=b}=F(b)−lim⁡n→∞F(b−1/n)P\{X = b\} = F(b) - \lim_{n\to\infty} F(b - 1/n) 185.

This section introduces continuous random variables, their fundamental properties, and common continuous distributions, setting the stage for understanding joint distributions.

11.7 Discrete random variables review (Context)

Although the focus shifts to continuous variables, a review of discrete concepts provides context for expectation and variance definitions.

A random variable XX is discrete if its set of possible values is finite or countably infinite. The function p(x)=P{X=x}p(x) = P\{X = x\} is the probability mass function (PMF) of XX.

Expectation and Variance for Discrete Variables

The expected value of XX, E[X]E[X], also called the mean or expectation, is defined as: E[X=∑x:p(x)>0xp(x)E[X = \sum_{x:p(x)>0} x p(x)

For a function gg, the expected value of g(X)g(X) is: E[g(X)]=∑x:p(x)>0g(x)p(x)E[g(X)] = \sum_{x:p(x)>0} g(x)p(x)

The variance of XX, Var(X)\text{Var}(X), measures the spread of values and is defined as: Var(X)=E[(X−E[X])2]\text{Var}(X) = E[(X - E[X])^2]

A useful identity for variance calculation is: Var(X)=E[X2−(E[X])2\text{Var}(X) = E[X^2 - (E[X])^2

The square root of the variance, Var(X)\sqrt{\text{Var}(X)}, is the standard deviation of XX.

An important property of expectation is linearity: the expected value of a sum of random variables equals the sum of their expected values: E\left[\sum_{i=1}^{n} X_i\right = \sum_{i=1}^{n} E[X_i].

Common Discrete Distributions (Summary of Means and Variances)

The document lists several important discrete distributions along with their defining characteristics, PMFs, means, and variances.

  • Binomial (n,p)(n, p): Number of successes in nn independent trials.
    • E[X=npE[X = np
    • Var(X)=np(1−p)\text{Var}(X) = np(1-p).
  • Poisson (λ)(\lambda): Number of successful trials when trials are numerous and success probability is small.
    • E[X=Var(X)=λE[X = \text{Var}(X) = \lambda 186.
  • Geometric (p)(p): Trial number of the first success (i=1,2,…i=1, 2, \ldots).
    • E[X=1pE[X = \frac{1}{p}
    • Var(X)=1−pp2\text{Var}(X) = \frac{1-p}{p^2}.
  • Negative Binomial (r,p)(r, p): Trial number of the rr-th success (i≥ri \ge r).
    • E[X=rpE[X = \frac{r}{p}
    • Var(X)=r(1−p)p2\text{Var}(X) = \frac{r(1-p)}{p^2}.
  • Hypergeometric (n,N,m)(n, N, m): Number of successes when drawing nn items without replacement from NN total items containing mm successes (white balls). With p=m/Np = m/N:
    • Var(X)=N−nN−1np(1−p)\text{Var}(X) = \frac{N-n}{N-1} np(1-p) 187.

11.8 Continuous Random Variables Introduction (Pages 186-192 Context)

The provided pages primarily list problems, but the topic description mentions that Chapter 5 covers the introduction to continuous random variables, including Uniform, Normal, Exponential, Gamma, Beta, and Cauchy distributions, along with their PDF, expectation, and variance. Since the specific definitions of these continuous distributions are not fully detailed in the provided text snippets (which focus on discrete review and problems), this section relies on the framework established by the definitions of expectation and variance for discrete variables, which serve as analogues for continuous variables using integration instead of summation.

Tip: For continuous random variables XX, the probability mass function p(x)p(x) is replaced by the probability density function (PDF), f(x)f(x), and the sum ∑\sum is replaced by the integral ∫\int.

For a continuous random variable XX with PDF f(x)f(x):

  1. Expectation: E[X=∫−∞∞xf(x)dxE[X = \int_{-\infty}^{\infty} x f(x) dx.
  2. Expected value of a function: E[g(X)]=∫−∞∞g(x)f(x)dxE[g(X)] = \int_{-\infty}^{\infty} g(x) f(x) dx.
  3. Variance: Var(X)=E[X2−(E[X])2\text{Var}(X) = E[X^2 - (E[X])^2, where E[X2=∫−∞∞x2f(x)dxE[X^2 = \int_{-\infty}^{\infty} x^2 f(x) dx.

11.9 Functions of Random Variables and Cumulative Distribution Functions (Contextual Material)

While detailed coverage of continuous distributions is deferred, the text references problem 4.17 concerning a given cumulative distribution function (CDF), F(b)F(b), for a variable XX. This illustrates how probabilities are calculated using the CDF.

If XX is a random variable with CDF F(b)F(b):

  • The probability P{a<X≤b}P\{a < X \le b\} is given by F(b)−F(a)F(b) - F(a).
  • For a discrete variable, P{X=i}=F(i)−F(i−)P\{X=i\} = F(i) - F(i^-), where F(i−)F(i^-) is the limit of F(b)F(b) as bb approaches ii from the left (i.e., F(i−1)F(i-1) if ii is an integer).

Example: From Problem 4.17 (a): To find P{X=1}P\{X=1\}, where the CDF jumps from F=0F =0 to F=1/4F =1/4 : P{X=1}=F−lim⁡b→1−F(b)=14−0=14P\{X=1\} = F - \lim_{b \to 1^-} F(b) = \frac{1}{4} - 0 = \frac{1}{4} 189 1.

11.10 Joint Distributions (Introduction Context)

Chapter 6 introduces joint distributions for discrete and continuous variables. The fundamental concepts applied to single variables (like expectation and independence) generalize to multivariate settings.

For two random variables XX and YY, the joint PMF is denoted p(x,y)p(x, y) (discrete) or joint PDF f(x,y)f(x, y) (continuous).

Independence

Two random variables XX and YY are independent if, for all xx and yy:

  • (Discrete): p(x,y)=pX(x)pY(y)p(x, y) = p_X(x) p_Y(y).
  • (Continuous): f(x,y)=fX(x)fY(y)f(x, y) = f_X(x) f_Y(y).

The problems section (e.g., 4.13, 4.25, 4.43) requires applying definitions of probability under the assumption of independence between trials or variables 188 190.

12. Continuous random variables and joint distributions (part 2)

This section summarizes the foundational concepts of continuous random variables, their probability density functions, expectation, variance, and introduces specific named distributions, as detailed in Chapter 5, focusing on the mathematical tools derived from pages 193 to 206.

12.1 Introduction to continuous random variables

A continuous random variable XX is one whose set of possible values is uncountable, such as the time a train arrives or the lifetime of a transistor.

Probability Density Function (PDF): For a continuous random variable XX, the probability that XX falls into a set BB of real numbers is found by integrating its PDF, f(x)f(x), over that set BB: P{X∈B}=∫Bf(x)dx(1.1) P\{X \in B\}= \int_{B} f(x) dx \quad (1.1) \text{ }.

Properties of the PDF f(x)f(x):

  1. f(x)f(x) must be non-negative for all real xx.
  2. The total probability must equal 1: 1=P{X∈(−∞,∞)}=∫−∞∞f(x)dx 1 = P\{X \in (-\infty, \infty)\}= \int_{-\infty}^{\infty} f(x) dx \text{ }.

Probability Calculation: The probability that XX lies between two values aa and bb is: P{a≤X≤b}=∫abf(x)dx(1.2) P\{a \le X \le b\}= \int_{a}^{b} f(x) dx \quad (1.2) \text{ } 201.

Zero Probability for Single Points: For any continuous random variable XX, the probability of assuming any specific value aa is zero: P{X=a}=∫aaf(x)dx=0 P\{X = a\}= \int_{a}^{a} f(x) dx = 0 \text{ }.

Cumulative Distribution Function (CDF): The CDF, F(a)F(a), is related to the PDF by integration: F(a)=P{X≤a}=∫−∞af(x)dx F(a) = P\{X \le a\}= \int_{-\infty}^{a} f(x) dx \text{ }. Conversely, the density function is the derivative of the CDF: ddaF(a)=f(a) \frac{d}{da} F(a) = f(a) \text{ }.

Tip: The PDF, f(a)f(a), provides a measure of how likely the random variable XX is to fall near the point aa. For small ϵ\epsilon, P{a−ϵ2≤X≤a+ϵ2}≈ϵf(a)P\left\{a - \frac{\epsilon}{2} \le X \le a + \frac{\epsilon}{2}\right\} \approx \epsilon f(a).

Example of PDF determination: If f(x)=C(4x−2x2)f(x) = C(4x - 2x^2) for 0<x<20 < x < 2 and 0 otherwise, CC is found by setting the total integral to 1, yielding C=3/8C = 3/8 202.

Transformation of Variables (Example): If XX has PDF fX(x)f_X(x) and Y=2XY = 2X, the PDF of YY is fY(a)=12fX(a/2)f_Y(a) = \frac{1}{2} f_X(a/2) 204.

12.2 Expectation and variance of continuous random variables

The expected value of a continuous random variable XX with PDF f(x)f(x) is the continuous analog of the discrete summation formula: E[X=∫−∞∞xf(x)dx E[X = \int_{-\infty}^{\infty} xf(x) dx \text{ } 205.

Expected Value of a Function of X: For any real-valued function gg, the expected value E[g(X)]E[g(X)] is calculated as: E[g(X)]=∫−∞∞g(x)f(x)dx E[g(X)] = \int_{-\infty}^{\infty} g(x)f(x) dx \text{ }.

Example: If XX is uniform on , so f(x)=1f(x) = 1 for 0≤x≤10 \le x \le 1, then E[eX=∫01exdx=e−1E[e^X = \int_{0}^{1} e^x dx = e - 1 1.

Lemma relating Expectation and Survival Function: For a non-negative random variable YY: E[Y=∫0∞P{Y>y}dy E[Y = \int_{0}^{\infty} P\{Y > y\}dy \text{ }.

The variance, Var(X)\text{Var}(X), for a continuous variable is analogous to the discrete case, relying on E[X]E[X] and E[X2]E[X^2]: Var(X)=E[X2−(E[X])2 [Based on general principles of variance, E[X2=∫−∞∞x2f(x)dx] \text{Var}(X) = E[X^2 - (E[X])^2 \text{ [Based on general principles of variance, } E[X^2 = \int_{-\infty}^{\infty} x^2 f(x) dx \text{]} \text{ } 206.

12.3 Distributions and Properties (Contextualized from Problem Set Review)

While Chapter 5 only introduces general continuous RVs, the preceding review section references specific distributions and properties relevant to continuous analysis:

  • Transformations: For a non-negative random variable NN, E[N=∑i=1∞P{N≥i}E[N = \sum_{i=1}^{\infty} P\{N \ge i\} 195.
  • Exponential/Poisson Relationship Context: If the number of events in time follows a Poisson distribution with rate λ\lambda, and each event is "counted" independently with probability pp, the number of counted events is Poisson with rate λp\lambda p.
  • Memoryless Property Context: If XX is geometric (discrete analog), P{X=n+k∣X>n}=P{X=k}P\{X = n + k|X > n\}= P\{X = k\}. This property is central to the continuous Exponential distribution as well 197.

This section continues the study of continuous random variables by detailing properties of expectation and variance, and then introduces the Uniform distribution along with illustrative examples of geometrical probability.

12.4 Expectation and variance properties for continuous random variables

The expectation of a non-negative function g(X)g(X) of a continuous random variable XX with PDF f(x)f(x) can be calculated using the area under the survival function: E[g(X)]=∫0∞P{g(X)>y}dyE[g(X)] = \int_0^\infty P\{g(X) > y\} dy This formula is proven by interchanging the order of integration in the double integral representation of the expectation involving f(x)f(x).

The expectation operator satisfies linearity properties, summarized in Corollary 2.1: E[aX+b=aE[X+bE[aX + b = aE[X + b The proof for continuous random variables mirrors the discrete case, replacing summation with integration and PMF with PDF.

The variance of a continuous random variable XX with mean μ=E[X]\mu = E[X] is defined identically to the discrete case: Var(X)=E[(X−μ)2]\text{Var}(X) = E[(X - \mu)^2] The computational shortcut formula is also analogous: Var(X)=E[X2−(E[X])2\text{Var}(X) = E[X^2 - (E[X])^2 The variance also adheres to a linearity property for constants aa and bb: Var(aX+b)=a2Var(X)\text{Var}(aX + b) = a^2\text{Var}(X)

Tip: Remember that calculating E[X2]E[X^2] requires integrating x2f(x)x^2 f(x) over the support of XX.

Examples illustrating expectation properties

  • Example 2c (Expected length of a split stick): If a stick of length 1 is split at a point U∼Uniform(0,1)U \sim \text{Uniform}(0, 1), the expected length of the piece containing a fixed point pp (0≤p≤10 \le p \le 1) is E[Lp(U)]=12+p(1−p)E[L_p(U)] = \frac{1}{2} + p(1 - p). This expected length is maximized when pp is the midpoint (p=1/2p = 1/2) 207.

  • Example 2d (Minimizing expected cost): For an appointment where travel time XX has PDF ff, and costs are cc if early by ss minutes and kk if late by ss minutes, the optimal departure time t∗t^* (minutes before the appointment) minimizes the expected cost E[Ct(X)]E[C_t(X)] when the CDF F(t∗)F(t^*) satisfies: F(t∗)=kk+cF(t^*) = \frac{k}{k + c} 208.

  • Example 2e (Variance calculation): If XX has PDF f(x)=2xf(x) = 2x for 0<x<10 < x < 1 (as implicitly defined by the preceding context, leading to E[X]=2/3E[X]=2/3), then E[X2=∫01x2(2x)dx=1/2E[X^2 = \int_0^1 x^2 (2x) dx = 1/2. The variance is: Var(X)=12−(23)2=12−49=9−818=118\text{Var}(X) = \frac{1}{2} - \left(\frac{2}{3}\right)^2 = \frac{1}{2} - \frac{4}{9} = \frac{9 - 8}{18} = \frac{1}{18}.

12.5 The Uniform Random Variable

A continuous random variable XX is uniformly distributed over the interval (α,β)(\alpha, \beta) if its probability density function (PDF) is constant over that interval: f(x)={1β−αα<x<β0otherwise(3.2)f(x) = \begin{cases} \frac{1}{\beta - \alpha} & \alpha < x < \beta \\ 0 & \text{otherwise} \end{cases} \quad (3.2) This function satisfies ∫−∞∞f(x)dx=1\int_{-\infty}^\infty f(x) dx = 1. For any subinterval (a,b)(a, b) within (α,β)(\alpha, \beta), the probability P{a≤X≤b}P\{a \le X \le b\} equals the length of the subinterval divided by the total length: P{a≤X≤b}=b−aβ−αP\{a \le X \le b\} = \frac{b - a}{\beta - \alpha} 209.

The cumulative distribution function (CDF) F(a)F(a) for X∼Uniform(α,β)X \sim \text{Uniform}(\alpha, \beta) is: F(a)={0a≤αa−αβ−αα<a<β1a≥βF(a) = \begin{cases} 0 & a \le \alpha \\ \frac{a - \alpha}{\beta - \alpha} & \alpha < a < \beta \\ 1 & a \ge \beta \end{cases}.

Moments and Calculations for Uniform Distribution

For X∼Uniform(α,β)X \sim \text{Uniform}(\alpha, \beta):

  1. Expected Value (E[X]E[X]): The expected value is the midpoint of the interval: E[X=α+β2E[X = \frac{\alpha + \beta}{2} This is calculated as ∫αβx(1β−α)dx=β2−α22(β−α)\int_\alpha^\beta x \left(\frac{1}{\beta - \alpha}\right) dx = \frac{\beta^2 - \alpha^2}{2(\beta - \alpha)} 210.

  2. Variance (Var(X)\text{Var}(X)): The variance is the square of the interval length divided by 12: Var(X)=(β−α)212\text{Var}(X) = \frac{(\beta - \alpha)^2}{12} This is derived from E[X2=β3−α33(β−α)=β2+αβ+α23E[X^2 = \frac{\beta^3 - \alpha^3}{3(\beta - \alpha)} = \frac{\beta^2 + \alpha\beta + \alpha^2}{3}.

Example: If X∼Uniform(0,10)X \sim \text{Uniform}(0, 10), then P{X<3}=∫03110dx=310P\{X < 3\} = \int_0^3 \frac{1}{10} dx = \frac{3}{10}.

Geometrical Probability and Bertrand's Paradox

Geometrical probability often relies on defining a random variable (like distance or angle) that is uniformly distributed over a specific range.

Bertrand's Paradox: This illustrates that defining "random" in a geometric setting can lead to different results depending on the chosen method of randomization. The question asks for the probability that a random chord in a circle has a length greater than the side of an inscribed equilateral triangle. Let rr be the radius. The side length of the inscribed equilateral triangle is 3r\sqrt{3}r. The chord length is greater than this side if its distance DD from the center is less than r/2r/2.

Two formulations yield different probabilities:

  1. Method 1 (Uniform Distance): Assume the distance DD from the center is uniformly distributed over [0,r][0, r]. P{D<r2}=r/2r=12P\left\{D < \frac{r}{2}\right\} = \frac{r/2}{r} = \frac{1}{2}.
  2. Method 2 (Uniform Angle): Consider the angle θ\theta between the chord and a tangent through one endpoint. θ\theta is uniformly distributed over [0∘,180∘][0^\circ, 180^\circ]. The condition is met when 60∘<θ<120∘60^\circ < \theta < 120^\circ. P{60<θ<120}=120−60180=60180=13P\{60 < \theta < 120\} = \frac{120 - 60}{180} = \frac{60}{180} = \frac{1}{3} 212.

Example: In a bus arrival scenario where arrival time XX is Uniform(0, 30) minutes past 7:00 A.M., the passenger waits less than 5 minutes if they arrive between 7:10 and 7:15 (10 < X < 15) or between 7:25 and 7:30 (25 < X < 30). The probability is 530+530=16+16=26=13\frac{5}{30} + \frac{5}{30} = \frac{1}{6} + \frac{1}{6} = \frac{2}{6} = \frac{1}{3} 211.

13. Continuous random variables and joint distributions (part 3)

This section summarizes key continuous probability distributions—Normal and Exponential—along with their properties, the connection between the Normal distribution and the Binomial distribution, and the introduction to the Gamma distribution and hazard rate functions.

13.1 The normal random variable

A random variable XX is normally distributed with parameters μ\mu (mean) and σ2\sigma^2 (variance) if its probability density function (PDF) is: f(x)=12πσ2e−(x−μ)2/(2σ2)−∞<x<∞f(x) = \frac{1}{\sqrt{2\pi\sigma^2}} e^{-(x-\mu)^2 / (2\sigma^2)} \quad -\infty < x < \infty The PDF results in a bell-shaped curve symmetric about μ\mu 213. The requirement that f(x)f(x) is a valid PDF is shown by proving 12πσ2∫−∞∞e−(x−μ)2/(2σ2)dx=1\frac{1}{\sqrt{2\pi\sigma^2}} \int_{-\infty}^{\infty} e^{-(x-\mu)^2/(2\sigma^2)} dx = 1.

Properties of Linear Transformation: If XX is normally distributed with parameters μ\mu and σ2\sigma^2, then Y=aX+bY = aX + b is normally distributed with parameters aμ+ba\mu + b and a2σ2a^2\sigma^2 214.

Standard Normal Variable: If X∼N(μ,σ2)X \sim N(\mu, \sigma^2), then Z=(X−μ)/σZ = (X - \mu)/\sigma is a standard normal random variable, Z∼N(0,1)Z \sim N(0, 1).

Mean and Variance: For a normal random variable X∼N(μ,σ2)X \sim N(\mu, \sigma^2), the mean and variance are:

  • E[X=μE[X = \mu
  • Var(X)=σ2\text{Var}(X) = \sigma^2 This is demonstrated by calculating E[Z=0E[Z = 0 and Var(Z)=1\text{Var}(Z) = 1 for the standard normal variable ZZ.

Cumulative Distribution Function (Φ(x)\Phi(x)): The cumulative distribution function (CDF) of a standard normal variable ZZ is denoted by Φ(x)\Phi(x): Φ(x)=12π∫−∞xe−y2/2dy\Phi(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{x} e^{-y^2/2} dy The CDF for any normal variable XX with parameters μ\mu and σ2\sigma^2 is: FX(a)=P{X≤a}=Φ(a−μσ)F_X(a) = P\{X \le a\} = \Phi\left(\frac{a - \mu}{\sigma}\right) The symmetry property of the standard normal density allows us to use the relation: Φ(−x)=1−Φ(x)\Phi(-x) = 1 - \Phi(x).

Tip: Table 5.1 provides values for Φ(x)\Phi(x) for non-negative xx. For negative arguments, always use the symmetry relationship Φ(−x)=1−Φ(x)\Phi(-x) = 1 - \Phi(x) 215.

Applications and Grading "On the Curve": The normal distribution is used widely in empirical phenomena like human height and measurement errors. It also forms the basis for grading "on the curve," where grades are assigned based on standard deviations from the mean μ\mu. For example, a grade A corresponds to scores greater than μ+σ\mu + \sigma, covering approximately 16% of the class 217 218.

13.2 Normal approximation to the binomial distribution

The DeMoivre–Laplace limit theorem states that for large nn, a binomial random variable Sn∼Binomial(n,p)S_n \sim \text{Binomial}(n, p) is approximately distributed as a normal random variable with the same mean (npnp) and variance (np(1−p)\sqrt{np(1-p)}).

Formally, the standardized variable converges to the standard normal CDF as n→∞n \to \infty: P{a≤Sn−npnp(1−p)≤b}→Φ(b)−Φ(a)as n→∞P\left\{a \le \frac{S_n - np}{\sqrt{np(1-p)}} \le b\right\} \to \Phi(b) - \Phi(a) \quad \text{as } n \to \infty This approximation is generally good when np(1−p)≥10np(1-p) \ge 10 219.

Continuity Correction: When approximating a discrete distribution (Binomial) with a continuous distribution (Normal), the continuity correction must be applied. The probability P{X=i}P\{X = i\} is approximated by P{i−1/2<X<i+1/2}P\{i - 1/2 < X < i + 1/2\}.

Example: To find P{X=20}P\{X = 20\} for X∼Binomial(40,0.5)X \sim \text{Binomial}(40, 0.5), we calculate P{19.5≤X<20.5}P\{19.5 \le X < 20.5\} using the normal approximation with mean np=20np=20 and standard deviation np(1−p)=10\sqrt{np(1-p)} = \sqrt{10} 220.

The normal approximation can also be used for the hypergeometric distribution when the population size NN and the number of successes 0.52N0.52N are large relative to the sample size nn 222.

13.3 Exponential random variables

A continuous random variable XX is exponentially distributed with parameter λ>0\lambda > 0 if its PDF is: f(x)={λe−λxif x≥00if x<0f(x) = \begin{cases} \lambda e^{-\lambda x} & \text{if } x \ge 0 \\ 0 & \text{if } x < 0 \end{cases} The CDF is F(a)=P{X≤a}=1−e−λaF(a) = P\{X \le a\} = 1 - e^{-\lambda a} for a≥0a \ge 0 223.

Moments: For an exponential random variable X∼Exp(λ)X \sim \text{Exp}(\lambda):

  • E[Xn=nλE[Xn−1]E[X^n = \frac{n}{\lambda} E[X^{n-1}], leading to E[X=1λE[X = \frac{1}{\lambda}.
  • Var(X)=E[X2−(E[X])2=2λ2−(1λ)2=1λ2\text{Var}(X) = E[X^2 - (E[X])^2 = \frac{2}{\lambda^2} - \left(\frac{1}{\lambda}\right)^2 = \frac{1}{\lambda^2}. The mean is the reciprocal of the rate parameter λ\lambda, and the variance is the mean squared 224.

Memoryless Property: The exponential distribution is unique in possessing the memoryless property: P{X>s+t∣X>t}=P{X>s}for all s,t≥0P\{X > s + t \mid X > t\} = P\{X > s\} \quad \text{for all } s, t \ge 0 This means the probability of future survival is independent of how long the item has already survived. This property is equivalent to F(s+t)=F(s)F(t)F(s+t) = F(s)F(t), where F(x)=P{X>x}F(x) = P\{X > x\}, whose only right-continuous solution is F(x)=e−λxF(x) = e^{-\lambda x}, confirming the distribution is exponential 225.

Tip: If the lifetime distribution is not exponential, the relevant probability for future survival depends on the current age tt via conditional probability: P{lifetime>t+s∣lifetime>t}=1−F(t+s)1−F(t)P\{\text{lifetime} > t+s \mid \text{lifetime} > t\} = \frac{1 - F(t+s)}{1 - F(t)}.

Hazard Rate Function λ(t)\lambda(t): The hazard rate function, or failure rate function, is defined as: λ(t)=f(t)1−F(t)\lambda(t) = \frac{f(t)}{1 - F(t)} λ(t)\lambda(t) represents the conditional probability intensity that an item of age tt will fail in the next infinitesimal time interval dtdt. For the exponential distribution, λ(t)\lambda(t) is constant and equal to the rate parameter λ\lambda. The hazard rate function uniquely determines the distribution F(t)F(t): F(t)=1−exp⁡{−∫0tλ(u)du}F(t) = 1 - \exp\left\{ - \int_0^t \lambda(u) du \right\} 228.

Laplace Distribution: A variation is the Laplace distribution, defined by f(x)=12λe−λ∣x∣f(x) = \frac{1}{2\lambda} e^{-\lambda|x|} for −∞<x<∞-\infty < x < \infty. It can be viewed as a random variable equally likely to be positive or negative, whose absolute value is exponentially distributed with parameter λ\lambda 226.

13.4 The Gamma Distribution

A random variable XX has a gamma distribution with parameters (α,λ)(\alpha, \lambda), where λ>0\lambda > 0 and α>0\alpha > 0, if its density function is: f(x)={λe−λx(λx)α−1Γ(α)x≥00x<0f(x) = \begin{cases} \frac{\lambda e^{-\lambda x}(\lambda x)^{\alpha-1}}{\Gamma(\alpha)} & x \ge 0 \\ 0 & x < 0 \end{cases} where Γ(α)\Gamma(\alpha) is the gamma function, defined as Γ(α)=∫0∞e−yyα−1dy\Gamma(\alpha) = \int_0^\infty e^{-y} y^{\alpha-1} dy.

Properties of the Gamma Function: The gamma function satisfies the recurrence relation Γ(α)=(α−1)Γ(α−1)\Gamma(\alpha) = (\alpha - 1)\Gamma(\alpha - 1). For positive integral values α=n\alpha = n, Γ(n)=(n−1)!\Gamma(n) = (n-1)!, since Γ=1\Gamma = 1 1.

Application: When α=n\alpha = n (a positive integer), the gamma distribution describes the time TnT_n one has to wait until a total of nn events has occurred, assuming events occur randomly according to the axioms governing the exponential distribution (Section 4.7). Specifically, P{Tn≤t}=P{N(t)≥n}P\{T_n \le t\} = P\{N(t) \ge n\}, where N(t)N(t) is the Poisson count process 230.

This section continues the study of specific continuous random variables by detailing the derivation of the density function for the waiting time until the nn-th event in a Poisson process (Gamma distribution), and introducing the Weibull and Cauchy distributions, including an example derivation for the Cauchy distribution's relationship with the uniform distribution.

13.5 Gamma distribution derivation and properties

The density function for TnT_n, the time of the nn-th event in a Poisson process with rate λ\lambda, is derived from the fact that Tn≤tT_n \le t if and only if the number of events in [0,t][0, t] is greater than or equal to nn. Since the number of events in [0,t][0, t] follows a Poisson distribution with parameter λt\lambda t, the probability is given by: P(Tn≤t)=∑j=n∞e−λt(λt)jj!P(T_n \le t) = \sum_{j=n}^{\infty} \frac{e^{-\lambda t}(\lambda t)^j}{j!} Differentiating this cumulative distribution function yields the density function f(t)f(t): f(t)=ddt(∑j=n∞e−λt(λt)jj!)=λe−λt(λt)n−1(n−1)!f(t) = \frac{d}{dt} \left( \sum_{j=n}^{\infty} \frac{e^{-\lambda t}(\lambda t)^j}{j!} \right) = \lambda e^{-\lambda t} \frac{(\lambda t)^{n-1}}{(n - 1)!} Hence, TnT_n has the gamma distribution with parameters (α=n,λ)(\alpha=n, \lambda). This is often known as the nn-Erlang distribution. When n=1n=1, this reduces to the exponential distribution.

Tip: The χn2\chi^2_n (chi-squared) distribution with nn degrees of freedom is a special case of the gamma distribution with parameters α=n/2\alpha = n/2 and λ=1/2\lambda = 1/2. It frequently appears as the distribution of error in nn-dimensional space when coordinate errors are normally distributed.

Expected Value and Variance of the Gamma Distribution For a gamma random variable XX with parameters α\alpha and λ\lambda:

  • The expected value is calculated using the integral definition: E[X=1Γ(α)∫0∞λxe−λx(λx)α−1dx=αλE[X = \frac{1}{\Gamma(\alpha)} \int_{0}^{\infty} \lambda x e^{-\lambda x} (\lambda x)^{\alpha-1} dx = \frac{\alpha}{\lambda} This relies on the definition of the Gamma function and Equation (6.1) (not provided here, but related to integral properties).
  • The variance is found by first calculating E[X2]E[X^2]: Var(X)=αλ2\text{Var}(X) = \frac{\alpha}{\lambda^2} The calculation details for E[X2]E[X^2] are left as an exercise.

13.6 The Weibull Distribution

The Weibull distribution is highly valued in engineering, particularly in analyzing fatigue data and modeling the lifetime of objects where the "weakest link" model applies (failure occurs when any component fails) 231.

The cumulative distribution function (CDF) for a Weibull random variable with parameters ν\nu, α\alpha, and β\beta is: F(x)={0x≤ν1−exp⁡{−(x−να)β}x>νF(x) = \begin{cases} 0 & x \le \nu \\ 1 - \exp \left\{ -\left(\frac{x - \nu}{\alpha}\right)^\beta \right\} & x > \nu \end{cases} The corresponding probability density function (PDF) obtained by differentiation is: f(x)={0x≤νβα(x−να)β−1exp⁡{−(x−να)β}x>νf(x) = \begin{cases} 0 & x \le \nu \\ \frac{\beta}{\alpha} \left(\frac{x - \nu}{\alpha}\right)^{\beta-1} \exp \left\{ -\left(\frac{x - \nu}{\alpha}\right)^\beta \right\} & x > \nu \end{cases}.

13.7 The Cauchy Distribution

A random variable XX has a Cauchy distribution parameterized by θ\theta (where −∞<θ<∞-\infty < \theta < \infty) if its density function is: f(x)=1π11+(x−θ)2,−∞<x<∞f(x) = \frac{1}{\pi} \frac{1}{1 + (x - \theta)^2}, \quad -\infty < x < \infty.

Example: Deriving the Cauchy distribution from a physical setup involving uniform angular distribution. Consider a narrow-beam flashlight spun around its center, one unit distance from the x-axis. The point XX where the beam intersects the x-axis is determined by the angle θ\theta between the flashlight and the y-axis, which is uniformly distributed between −π/2-\pi/2 and π/2\pi/2.

From the geometry (illustrated in Figure 5.7), X=tan⁡θX = \tan \theta. The CDF of XX is: F(x)=P{X≤x}=P{tan⁡θ≤x}=P{θ≤arctan⁡x}F(x) = P\{X \le x\} = P\{\tan \theta \le x\} = P\{\theta \le \arctan x\} Since θ\theta is uniform on (−π/2,π/2)(-\pi/2, \pi/2), P(θ≤a)=a−(−π/2)π/2−(−π/2)=a+π/2πP(\theta \le a) = \frac{a - (-\pi/2)}{\pi/2 - (-\pi/2)} = \frac{a + \pi/2}{\pi}. Substituting a=arctan⁡xa = \arctan x: F(x)=arctan⁡x+π/2π=12+1πarctan⁡xF(x) = \frac{\arctan x + \pi/2}{\pi} = \frac{1}{2} + \frac{1}{\pi} \arctan x 232.

14. Continuous random variables and joint distributions (part 4)

This section of the study guide focuses on the final details of various continuous distributions introduced in Chapter 5, properties of functions of random variables, and the foundational definitions for joint distributions covered in Chapter 6, specifically relating to joint cumulative distribution functions for both continuous and discrete variables [233-248.

14.1 Beta distribution specifics and relationship to the Gamma function

The Beta distribution models phenomena whose possible values lie in the interval after appropriate scaling. Its probability density function (PDF) is defined by : f(x)={1B(a,b)xa−1(1−x)b−10<x<10otherwisef(x) = \begin{cases} \frac{1}{B(a, b)}x^{a-1}(1 - x)^{b-1} & 0 < x < 1 \\ 0 & \text{otherwise} \end{cases} where B(a,b)B(a, b) is the Beta function: B(a,b)=∫01xa−1(1−x)b−1dxB(a, b) = \int_{0}^{1} x^{a-1}(1 - x)^{b-1} dx The Beta function is related to the Gamma function by: B(a,b)=Γ(a)Γ(b)Γ(a+b) B(a, b) = \frac{\Gamma(a)\Gamma(b)}{\Gamma(a + b)} \quad \text{ }.

Properties of the Beta Distribution:

  • Symmetry: If a=ba = b, the density is symmetric about 12\frac{1}{2}.
  • Skewness: The density is skewed to the left when b>ab > a, and skewed to the right when a>ba > b 233.
  • Mean and Variance: E[X=aa+bE[X = \frac{a}{a + b} Var(X)=ab(a+b)2(a+b+1) \text{Var}(X) = \frac{ab}{(a + b)^2(a + b + 1)} \text{ }.

Tip: The Beta distribution generalizes many other distributions on. For instance, when a=1a=1 and b=1b=1, it is the Uniform(0, 1) distribution 1.

14.2 Distribution of a function of a random variable

When XX is a continuous random variable with PDF fXf_X, the distribution of Y=g(X)Y = g(X) can be determined by expressing the event {g(X)≤y}\{g(X) \le y\} in terms of XX 234.

14.3 Transformation using the Inverse Function

If g(x)g(x) is strictly monotonic (increasing or decreasing), differentiable, and has an inverse g−1(y)g^{-1}(y), the PDF of Y=g(X)Y = g(X) is given by the Change of Variables formula (Theorem 7.1): fY(y)={fX[g−1(y)]∣ddyg−1(y)∣if y=g(x) for some x0if y∉range(g) f_Y (y) = \begin{cases} f_X [g^{-1}(y)] \left| \frac{d}{dy} g^{-1}(y) \right| & \text{if } y = g(x) \text{ for some } x \\ 0 & \text{if } y \not\in \text{range}(g) \end{cases} \text{ }.

Example: If XX is uniform on (0,1)(0, 1) and Y=XnY = X^n (where 0<y<10 < y < 1), then g−1(y)=y1/ng^{-1}(y) = y^{1/n} and ddyg−1(y)=1ny1/n−1\frac{d}{dy} g^{-1}(y) = \frac{1}{n} y^{1/n - 1}. Since fX(x)=1f_X(x) = 1 for 0<x<10 < x < 1, the PDF of YY is fY(y)=1⋅1ny1/n−1f_Y(y) = 1 \cdot \frac{1}{n} y^{1/n - 1} for 0<y<10 < y < 1236.

14.4 Transformations for Non-Monotonic Functions

If g(x)g(x) is not strictly monotonic, the probability is found by summing probabilities over the sets where the condition g(X)≤yg(X) \le y holds.

  • For Y=X2Y = X^2 (where XX is continuous with PDF fXf_X): For y≥0y \ge 0: FY(y)=P{X2≤y}=P{−y≤X≤y}=FX(y)−FX(−y)F_Y(y) = P\{X^2 \le y\} = P\{-\sqrt{y} \le X \le \sqrt{y}\} = F_X(\sqrt{y}) - F_X(-\sqrt{y}) Differentiating yields the PDF: fY(y)=12y[fX(y)+fX(−y)] f_Y(y) = \frac{1}{2\sqrt{y}} [f_X(\sqrt{y}) + f_X(-\sqrt{y})] \text{ }.
  • For Y=∣X∣Y = |X| (where XX is continuous with PDF fXf_X): fY(y)=fX(y)+fX(−y) f_Y(y) = f_X(y) + f_X(-y) \text{ } 235.

14.5 Summary of Key Continuous Distributions (Recap and Properties)

The following distributions and concepts are summarized based on properties established across Chapter 5 [237-239.

DistributionPDF f(x)f(x)Mean E[X]E[X]Variance Var(X)\text{Var}(X)Key Property
Uniform on (a,b)(a, b)1b−a\frac{1}{b-a} for a≤x≤ba \le x \le ba+b2\frac{a+b}{2}(b−a)212\frac{(b-a)^2}{12}
Normal (μ,σ2)(\mu, \sigma^2)12πσ2e−(x−μ)2/2σ2\frac{1}{\sqrt{2\pi\sigma^2}} e^{-(x-\mu)^2/2\sigma^2} for all xxμ\muσ2\sigma^2Z=X−μσZ = \frac{X-\mu}{\sigma} is standard normal (mean 0, variance 1)
Exponential (λ)(\lambda)λe−λx\lambda e^{-\lambda x} for x≥0x \ge 01λ\frac{1}{\lambda}1λ2\frac{1}{\lambda^2}Memoryless property: $P{X > s + t
Gamma (α,λ)(\alpha, \lambda)λe−λx(λx)α−1Γ(α)\frac{\lambda e^{-\lambda x}(\lambda x)^{\alpha-1}}{\Gamma(\alpha)} for x≥0x \ge 0αλ\frac{\alpha}{\lambda}αλ2\frac{\alpha}{\lambda^2}Γ(α)=∫0∞e−xxα−1dx\Gamma(\alpha) = \int_0^\infty e^{-x} x^{\alpha-1} dx
Beta (a,b)(a, b)1B(a,b)xa−1(1−x)b−1\frac{1}{B(a, b)}x^{a-1}(1 - x)^{b-1} for 0<x<10 < x < 1aa+b\frac{a}{a+b}ab(a+b)2(a+b+1)\frac{ab}{(a+b)^2(a+b+1)}

14.6 Hazard Rate Function

For a nonnegative continuous random variable XX with CDF F(x)F(x) and PDF f(x)f(x), the hazard rate (or failure rate) function λ(t)\lambda(t) is: λ(t)=f(t)1−F(t),t≥0 \lambda(t) = \frac{f(t)}{1 - F(t)}, \quad t \ge 0 \text{ }. If XX is Exponential(λ\lambda), the hazard rate is constant: λ(t)=λ\lambda(t) = \lambda 238.

14.7 Introduction to Joint Distributions (Chapter 6)

We now transition to considering two or more random variables simultaneously.

14.8 Joint Cumulative Distribution Function (CDF)

For two random variables XX and YY, the joint CDF F(a,b)F(a, b) is defined as: F(a,b)=P{X≤a,Y≤b},−∞<a,b<∞ F(a, b) = P\{X \le a, Y \le b\}, \quad -\infty < a, b < \infty \text{ }.

Marginal Distributions: The individual distributions (marginal distributions) can be derived from the joint CDF: FX(a)=P{X≤a}=lim⁡b→∞F(a,b)=F(a,∞) F_X(a) = P\{X \le a\} = \lim_{b\to\infty} F(a, b) = F(a, \infty) \text{ }. FY(b)=P{Y≤b}=lim⁡a→∞F(a,b)=F(∞,b) F_Y(b) = P\{Y \le b\} = \lim_{a\to\infty} F(a, b) = F(\infty, b) \text{ }.

14.9 Calculating Joint Probabilities from CDF

All joint probability statements can be determined from F(a,b)F(a, b). For instance, the probability that X>aX > a and Y>bY > b is 247: P{X>a,Y>b}=1−FX(a)−FY(b)+F(a,b) P\{X > a, Y > b\} = 1 - F_X(a) - F_Y(b) + F(a, b) \text{ }. A more general formula for the probability within a rectangular region (a1,a2×(b1,b2](a_1, a_2 \times (b_1, b_2] is: P{a1<X≤a2,b1<Y≤b2}=F(a2,b2)+F(a1,b1)−F(a1,b2)−F(a2,b1)if a1<a2,b1<b2 P\{a_1 < X \le a_2, b_1 < Y \le b_2\} = F(a_2, b_2) + F(a_1, b_1) - F(a_1, b_2) - F(a_2, b_1) \quad \text{if } a_1 < a_2, b_1 < b_2 \text{ }.

14.10 Joint Probability Mass Function (PMF) for Discrete Variables

If XX and YY are discrete, the joint PMF p(x,y)p(x, y) is: p(x,y)=P{X=x,Y=y} p(x, y) = P\{X = x, Y = y\} \text{ }. The marginal PMFs are found by summing over the other variable: pX(x)=∑y:p(x,y)>0p(x,y)p_X(x) = \sum_{y: p(x,y)>0} p(x, y) pY(y)=∑x:p(x,y)>0p(x,y) p_Y(y) = \sum_{x: p(x,y)>0} p(x, y) \text{ }.

Example: Selecting 3 balls from an urn containing 3 Red, 4 White, and 5 Blue balls. If XX is the number of red balls and YY is the number of white balls chosen, p(i,j)=P{X=i,Y=j}p(i, j) = P\{X=i, Y=j\} involves combinations, such as p(0,0)=(53)(123)=10220p(0, 0) = \frac{\binom{5}{3}}{\binom{12}{3}} = \frac{10}{220} 248.

This section details the transition from discrete joint distributions to continuous joint distributions, focusing on the definition, properties, and calculation methods involving the joint probability density function (PDF).

14.11 Joint probability mass functions (Review context)

For discrete random variables XX and YY, the joint probability mass function (PMF), denoted p(i,j)=P{X=i,Y=j}p(i, j) = P\{X=i, Y=j\}, is often summarized in a table format (Table 6.1 provides an example) where row sums yield the marginal PMF of XX, P{X=i}P\{X=i\}, and column sums yield the marginal PMF of YY, P{Y=j}P\{Y=j\}.

Example: Example 1b illustrates calculating a joint PMF for the number of boys (BB) and girls (GG) in a randomly chosen family, given the probability distribution of the total number of children. The calculation relies on conditional probability, such as P{B=0,G=1}=P{1 child}P{1 girl∣1 child}P\{B = 0, G = 1\} = P\{\text{1 child}\}P\{\text{1 girl}|\text{1 child}\} 249.

14.12 Defining joint continuous distribution functions

When random variables XX and YY are jointly continuous, there exists a function f(x,y)f(x, y), defined for all real xx and yy, such that the probability that the random vector (X,Y)(X, Y) falls within any set CC in the two-dimensional plane is calculated by a double integral of the joint PDF over CC: P{(X,Y)∈C}=∬(x,y)∈Cf(x,y) dx dy(1.3)P\{(X, Y) \in C\}= \iint_{(x,y)\in C} f(x, y) \, dx \, dy \quad (1.3) The function f(x,y)f(x, y) is the joint probability density function (PDF) of XX and YY.

If AA and BB are sets of real numbers, defining C={(x,y):x∈A,y∈B}C = \{ (x, y) : x \in A, y \in B\}, the probability that XX is in AA and YY is in BB is: P{X∈A,Y∈B}=∫B∫Af(x,y) dx dy(1.4)P\{X \in A, Y \in B\}= \int_B \int_A f(x, y) \, dx \, dy \quad (1.4)

The relationship between the joint CDF, F(a,b)=P{X≤a,Y≤b}F(a, b) = P\{X \le a, Y \le b\}, and the joint PDF f(a,b)f(a, b) is given by the second partial derivative: f(a,b)=∂2∂a∂bF(a,b)f(a, b) = \frac{\partial^2}{\partial a \partial b} F(a, b) wherever the partial derivatives are defined 250.

When dada and dbdb are small, the probability that (X,Y)(X, Y) is near (a,b)(a, b) can be approximated as: P{a<X<a+da,b<Y<b+db}≈f(a,b) da dbP\{a < X < a + da, b < Y < b + db\} \approx f(a, b) \, da \, db This implies that f(a,b)f(a, b) measures the likelihood density around the point (a,b)(a, b).

14.13 Marginal PDFs from the joint PDF

If XX and YY are jointly continuous, they are necessarily individually continuous. Their marginal probability density functions can be derived by integrating the joint PDF over the entire range of the other variable: The marginal PDF of XX is: fX(x)=∫−∞∞f(x,y) dyf_X(x) = \int_{-\infty}^{\infty} f(x, y) \, dy The marginal PDF of YY is: fY(y)=∫−∞∞f(x,y) dxf_Y(y) = \int_{-\infty}^{\infty} f(x, y) \, dx This is analogous to summing up probabilities in the discrete case (finding row/column sums).

14.14 Calculations using the joint PDF

Probabilities involving continuous joint distributions require integration over the specified region CC 251.

Example 1c: If the joint PDF is f(x,y)=2e−xe−2yf(x, y) = 2e^{-x}e^{-2y} for 0<x<∞,0<y<∞0 < x < \infty, 0 < y < \infty, and 00 otherwise:

  • Probability over a rectangular region: P{X>1,Y<1}P\{X > 1, Y < 1\} is found by integrating f(x,y)f(x, y) over the region 1<x<∞1 < x < \infty and 0<y<10 < y < 1. P{X>1,Y<1}=∫01∫1∞2e−xe−2y dx dy=e−1(1−e−2)P\{X > 1, Y < 1\}= \int_0^1 \int_1^{\infty} 2e^{-x}e^{-2y} \, dx \, dy = e^{-1} \left(1 - e^{-2}\right)
  • Probability over a non-rectangular region: P{X<Y}P\{X < Y\} requires integrating over the region where x<yx < y within the support of the distribution (i.e., 0<x<y<∞0 < x < y < \infty). P{X<Y}=∫0∞∫0y2e−xe−2y dx dy=13P\{X < Y\}= \int_0^{\infty} \int_0^y 2e^{-x}e^{-2y} \, dx \, dy = \frac{1}{3}
  • Marginal calculation: P{X<a}P\{X < a\} is calculated by integrating the joint PDF over 0<x<a0 < x < a and 0<y<∞0 < y < \infty. P{X<a}=∫0a∫0∞2e−2ye−x dy dx=∫0ae−x dx=1−e−aP\{X < a\}= \int_0^a \int_0^{\infty} 2e^{-2y}e^{-x} \, dy \, dx = \int_0^a e^{-x} \, dx = 1 - e^{-a}

14.15 Uniform distribution over a region

When a point (X,Y)(X, Y) is chosen randomly within a region SS such that all regions of equal area are equally likely (uniform distribution), the joint PDF is constant cc inside SS and zero outside SS.

Example 1d (Uniform Distribution in a Circle): If (X,Y)(X, Y) is uniformly distributed inside a circle of radius RR centered at the origin, the joint PDF is: f(x,y)={cif x2+y2≤R20if x2+y2>R2f(x, y) = \begin{cases} c & \text{if } x^2 + y^2 \le R^2 \\ 0 & \text{if } x^2 + y^2 > R^2 \end{cases}

  • Determining cc: Since the total probability must equal 1, cc must be the reciprocal of the area of the region. The area of the circle is πR2\pi R^2. c=1Area=1πR2c = \frac{1}{\text{Area}} = \frac{1}{\pi R^2}
  • Marginal Density: Finding the marginal densities fX(x)f_X(x) and fY(y)f_Y(y) requires integrating f(x,y)=1πR2f(x, y) = \frac{1}{\pi R^2} over the appropriate limits defined by the circle's boundary (y=±R2−x2y = \pm \sqrt{R^2 - x^2}), which is more complex than simple rectangular regions.
  • Probability based on distance: If DD is the distance from the origin, D=X2+Y2D = \sqrt{X^2 + Y^2}. The probability P{D≤a}P\{D \le a\} (where a≤Ra \le R) involves integrating the joint PDF over a smaller circle of radius aa. Since the distribution is uniform, this probability is the ratio of the areas: P{D≤a}=Area of circle radius aArea of circle radius R=πa2πR2=a2R2P\{D \le a\} = \frac{\text{Area of circle radius } a}{\text{Area of circle radius } R} = \frac{\pi a^2}{\pi R^2} = \frac{a^2}{R^2}
  • Expected distance: E[D]E[D] would be calculated using the formula E[D = \iint x^2+y^2 \ge 0} \sqrt{x^2 + y^2} f(x, y) \, dx \, dy over the region x2+y2≤R2x^2 + y^2 \le R^2 252.

15. Continuous random variables and joint distributions (part 5)

This section focuses on advanced concepts related to joint distributions, independence of random variables, and the distribution of sums of independent random variables, building upon the definitions of continuous random variables covered previously.

15.1 Joint probability distributions in n-space

The joint cumulative probability distribution function F(a1,a2,…,an)F(a_1, a_2, \ldots, a_n) for nn random variables X1,X2,…,XnX_1, X_2, \ldots, X_n is defined as: F(a1,a2,…,an)=P{X1≤a1,X2≤a2,…,Xn≤an}F(a_1, a_2, \ldots, a_n) = P\{X_1 \le a_1, X_2 \le a_2, \ldots, X_n \le a_n\} If the variables are jointly continuous, there exists a joint probability density function f(x1,x2,…,xn)f(x_1, x_2, \ldots, x_n) such that for any set CC in nn-space: P{(X1,X2,…,Xn)∈C}=∫∫⋯∫(x1,…,xn)∈Cf(x1,…,xn)dx1dx2⋯dxnP\{(X_1, X_2, \ldots, X_n) \in C\}= \int\int\cdots\int_{(x_1,\ldots,x_n)\in C} f (x_1, \ldots, x_n)dx_1dx_2 \cdots dx_n Specifically, for sets A1,A2,…,AnA_1, A_2, \ldots, A_n: P{X1∈A1,X2∈A2,…,Xn∈An}=∫An∫An−1⋯∫A1f(x1,…,xn)dx1dx2⋯dxnP\{X_1 \in A_1, X_2 \in A_2, \ldots, X_n \in A_n\} = \int_{A_n} \int_{A_{n-1}} \cdots \int_{A_1} f (x_1, \ldots, x_n) dx_1dx_2 \cdots dx_n The multinomial distribution is a crucial joint distribution arising from nn independent, identical experiments, each having rr outcomes with probabilities p1,p2,…,prp_1, p_2, \ldots, p_r such that ∑i=1rpi=1\sum_{i=1}^r p_i = 1. If XiX_i is the count of outcome ii, the joint probability mass function is: P{X1=n1,X2=n2,…,Xr=nr}=n!n1!n2!⋯nr!p1n1p2n2⋯prnrP\{X_1 = n_1, X_2 = n_2, \ldots, X_r = n_r\}= \frac{n!}{n_1!n_2! \cdots n_r!}p_1^{n_1} p_2^{n_2} \cdots p_r^{n_r} whenever ∑i=1rni=n\sum_{i=1}^r n_i = n.

Tip: The multinomial distribution reduces to the binomial distribution when r=2r=2. Any sum of a fixed set of Xi′X'_i variables from the multinomial set will follow a binomial distribution with parameters nn and p=∑i∈Npip = \sum_{i\in N} p_i.

15.2 Independent random variables

Random variables XX and YY are independent if, for any sets of real numbers AA and BB: P{X∈A,Y∈B}=P{X∈A}P{Y∈B}P\{X \in A, Y \in B\}= P\{X \in A\}P\{Y \in B\} This is equivalent to the independence of the events EA={X∈A}E_A = \{X \in A\} and FB={Y∈B}F_B = \{Y \in B\} 255.

15.3 Independence conditions for distribution and density/mass functions

For continuous variables, independence is equivalent to: F(a,b)=FX(a)FY(b)for all a,bF(a, b) = F_X(a)F_Y(b) \quad \text{for all } a, b In the discrete case, independence is equivalent to: p(x,y)=pX(x)pY(y)for all x,yp(x, y) = p_X(x)p_Y(y) \quad \text{for all } x, y For jointly continuous random variables, independence is equivalent to: f(x,y)=fX(x)fY(y)for all x,yf(x, y) = f_X(x)f_Y(y) \quad \text{for all } x, y Loosely, independence means knowing the value of one variable does not change the distribution of the other 256.

Proposition 2.1: Continuous (discrete) random variables XX and YY are independent if and only if their joint probability density (mass) function can be expressed as fX,Y(x,y)=h(x)g(y)f_{X,Y} (x, y) = h(x)g(y) over the domain 260.

Example: If f(x,y)=6e−2xe−3yf(x, y) = 6e^{-2x}e^{-3y} for x>0,y>0x > 0, y > 0, the variables are independent (one exponential with rate 2, the other with rate 3). However, if the joint density is non-zero only on a region where the bounds on xx and yy are interdependent (e.g., 0<x+y<10 < x+y < 1), the variables are dependent because the density does not factor 261.

For nn random variables X1,X2,…,XnX_1, X_2, \ldots, X_n, independence means: P{X1∈A1,X2∈A2,…,Xn∈An}=∏i=1nP{Xi∈Ai}P\{X_1 \in A_1, X_2 \in A_2, \ldots, X_n \in A_n\}= \prod_{i=1}^n P\{X_i \in A_i\} This is equivalent to: P{X1≤a1,X2≤a2,…,Xn≤an}=∏i=1nP{Xi≤ai}for all a1,a2,…,anP\{X_1 \le a_1, X_2 \le a_2, \ldots, X_n \le a_n\} = \prod_{i=1}^n P\{X_i \le a_i\} \quad \text{for all } a_1, a_2, \ldots, a_n Independence can be established sequentially: X2X_2 independent of X1X_1, X3X_3 independent of X1,X2X_1, X_2, and so on, up to XnX_n independent of X1,…,Xn−1X_1, \ldots, X_{n-1} 266.

Example (Geometric Probability): If XX and YY are independent uniform (0,60)(0, 60) arrivals (in minutes past noon), the probability that the first arrival waits longer than 10 minutes is 2P{X+10<Y}=25/362P\{X + 10 < Y\} = 25/36 258.

Example (Characterization of Normal Distribution): If XX and YY are independent continuous random variables whose joint density f(x,y)=fX(x)fY(y)f(x, y) = f_X(x)f_Y(y) depends only on x2+y2x^2 + y^2 (rotation invariant), then XX and YY must be normally distributed with mean μ=0\mu=0 and equal variance σ2\sigma^2, meaning they are independent and identically distributed normal random variables 259.

15.4 Sums of independent random variables

When XX and YY are independent continuous random variables with density functions fXf_X and fYf_Y, the cumulative distribution function of W=X+YW = X + Y is given by: FX+Y(a)=∫−∞∞FX(a−y)fY(y)dyF_{X+Y}(a) = \int_{-\infty}^{\infty} F_X(a - y)f_Y(y) dy The probability density function fX+Y(a)f_{X+Y}(a) is found by differentiating FX+Y(a)F_{X+Y}(a), yielding the convolution formula:

15.5 Sum of identically distributed uniform random variables

If XX and YY are independent and uniformly distributed on (0,1)(0, 1), their sum W=X+YW = X+Y has a triangular distribution 267: fX+Y(a)={a0≤a≤12−a1<a<20otherwisef_{X+Y}(a) = \begin{cases} a & 0 \le a \le 1 \\ 2 - a & 1 < a < 2 \\ 0 & \text{otherwise} \end{cases}

For X1,X2,…,XnX_1, X_2, \ldots, X_n independent Uniform(0,1)\text{Uniform}(0, 1) variables, let Sn=X1+…+XnS_n = X_1 + \ldots + X_n. The CDF for 0≤x≤10 \le x \le 1 is proven by induction to be: Fn(x)=P{Sn≤x}=xnn!,0≤x≤1F_n(x) = P\{S_n \le x\} = \frac{x^n}{n!}, \quad 0 \le x \le 1 Using this, the expected number of variables N=min⁡{n:X1+…+Xn>1}N = \min\{n: X_1 + \ldots + X_n > 1\} is E[N=eE[N = e.

15.6 Sums involving Gamma random variables

The Gamma distribution with parameters (t,λ)(t, \lambda) has the density: f(y)=λe−λy(λy)t−1Γ(t),0<y<∞f(y) = \frac{\lambda e^{-\lambda y}(\lambda y)^{t-1}}{\Gamma(t)}, \quad 0 < y < \infty A key property is closure under convolution for a fixed rate λ\lambda: Proposition 3.1: If X∼Gamma(s,λ)X \sim \text{Gamma}(s, \lambda) and Y∼Gamma(t,λ)Y \sim \text{Gamma}(t, \lambda) are independent, then X+Y∼Gamma(s+t,λ)X + Y \sim \text{Gamma}(s+t, \lambda) 269. By induction, the sum of nn independent Gamma variables Xi∼Gamma(ti,λ)X_i \sim \text{Gamma}(t_i, \lambda) is Gamma(∑ti,λ)\text{Gamma}(\sum t_i, \lambda).

Example: Since an exponential random variable with parameter λ\lambda is Gamma(1,λ)\text{Gamma}(1, \lambda), the sum of nn independent exponential variables, each with parameter λ\lambda, is a Gamma random variable with parameters (n,λ)(n, \lambda).

The Chi-squared (χ2\chi^2) distribution with nn degrees of freedom arises from summing squares of independent standard normal variables (Zi∼N(0,1)Z_i \sim N(0, 1)): Y=∑i=1nZi2Y = \sum_{i=1}^n Z_i^2. Since Zi2Z_i^2 is Gamma(1/2,1/2)\text{Gamma}(1/2, 1/2) (derived from n=1n=1 case), the χ2(n)\chi^2(n) distribution is equivalent to the Gamma distribution with parameters (n/2,1/2)(n/2, 1/2) 270. The density function for χ2(n)\chi^2(n) is: fχ2(y)=e−y/2yn/2−12n/2Γ(n/2),y>0f_{\chi^2}(y) = \frac{e^{-y/2} y^{n/2-1}}{2^{n/2}\Gamma(n/2)}, \quad y > 0

This section focuses on the properties of the chi-squared distribution, the summation property of independent normal random variables (Proposition 3.2), and an application using the normal approximation to the binomial distribution.

15.7 Chi-squared distribution properties

The Gamma function, Γ(t)\Gamma(t), is used in defining the chi-squared distribution, particularly when determining values for Γ1(n/2)\Gamma_1(n/2).

  • If nn is an even integer, Γ1(n/2)=(n2−1)!\Gamma_1(n/2) = \left(\frac{n}{2} - 1\right)!.
  • If nn is odd, Γ1(n/2)\Gamma_1(n/2) is found by iteratively using the relationship Γ1(t)=(t−1)Γ1(t−1)\Gamma_1(t) = (t - 1)\Gamma_1(t - 1) until Γ1(12)=π\Gamma_1\left(\frac{1}{2}\right) = \sqrt{\pi} is reached.

    Example: For n=5n=5, Γ1(52)=32Γ1(32)=32⋅12Γ1(12)=34π\Gamma_1\left(\frac{5}{2}\right) = \frac{3}{2} \Gamma_1\left(\frac{3}{2}\right) = \frac{3}{2} \cdot \frac{1}{2} \Gamma_1\left(\frac{1}{2}\right) = \frac{3}{4}\sqrt{\pi}.

The chi-squared distribution is frequently encountered when modeling the squared error in nn-dimensional space, assuming coordinate errors are independent standard normal random variables. It also holds significant importance in statistical analysis.

15.8 Sum of independent normal random variables

Proposition 3.2 establishes a fundamental rule regarding the sum of independent normal random variables.

Proposition 3.2: If XiX_i, for i=1,…,ni = 1, \dots, n, are independent random variables normally distributed with respective parameters μi\mu_i (mean) and σi2\sigma_i^2 (variance), then their sum ∑i=1nXi\sum_{i=1}^{n} X_i is normally distributed with mean ∑i=1nμi\sum_{i=1}^{n} \mu_i and variance ∑i=1nσi2\sum_{i=1}^{n} \sigma_i^2.

The proof relies on Equation (3.2) and demonstrates the case for n=2n=2 before generalizing by induction.

  • Proof Sketch (n=2n=2): The proof begins by considering two independent normal variables, XX (mean 0, variance σ2\sigma^2) and YY (mean 0, variance 1), and deriving the density function of X+YX+Y via convolution. The result shows X+YX+Y is normal with mean 0 and variance 1+σ21 + \sigma^2 271.
  • Generalization (n>2n>2): Assuming the property holds for n−1n-1 variables, the sum ∑i=1nXi\sum_{i=1}^{n} X_i is written as (∑i=1n−1Xi)+Xn\left(\sum_{i=1}^{n-1} X_i\right) + X_n. By the induction hypothesis, the first sum is normal, and applying the n=2n=2 result confirms that the total sum is normal with the summed means and variances.

Tip: This property highlights why the normal distribution is highly useful in modeling sums of random errors—the sum maintains normality.

15.9 Application: Normal approximation for binomial sums

Proposition 3.2 is essential for approximating the distribution of sums of independent binomial variables using the normal distribution, as demonstrated in Example 3c.

Example: A basketball team plays 44 games: 26 against Class A teams (win probability pA=0.4p_A = 0.4) and 18 against Class B teams (win probability pB=0.7p_B = 0.7). Game results are independent. We use the normal approximation for XAX_A (wins vs. A) and XBX_B (wins vs. B).

For XAX_A: E[XA=26(0.4)=10.4E[X_A = 26(0.4) = 10.4 Var(XA)=26(0.4)(0.6)=6.24\text{Var}(X_A) = 26(0.4)(0.6) = 6.24 For XBX_B: E[XB=18(0.7)=12.6E[X_B = 18(0.7) = 12.6 Var(XB)=18(0.7)(0.3)=3.78\text{Var}(X_B) = 18(0.7)(0.3) = 3.78 Since XAX_A and XBX_B are independent, XTotal=XA+XBX_{\text{Total}} = X_A + X_B is approximated by an independent normal random variable with: Mean=E[XA+E[XB=10.4+12.6=23\text{Mean} = E[X_A + E[X_B = 10.4 + 12.6 = 23 Variance=Var(XA)+Var(XB)=6.24+3.78=10.02\text{Variance} = \text{Var}(X_A) + \text{Var}(X_B) = 6.24 + 3.78 = 10.02 The normal approximation suggests XTotal∼N(23,10.02)X_{\text{Total}} \sim N(23, 10.02).

This approximation allows for calculating probabilities like winning 25 games or more using the normal CDF derived from Proposition 3.2 272.

16. Continuous random variables and joint distributions (part 6)

This section covers the distributions of sums of independent random variables for discrete cases (Poisson, Binomial, Geometric) and delves into conditional distributions for both discrete and continuous variables, culminating in the derivation of joint distributions for order statistics and transformations of random variables.

16.1 Sums of Independent Random Variables (Continued)

This part focuses on specific discrete distributions when summing independent variables, building upon earlier results.

16.1.1 Log-normal Random Variables

A random variable YY is lognormal with parameters μ\mu and σ2\sigma^2 if log⁡(Y)\log(Y) is a normal random variable with mean μ\mu and variance σ2\sigma^2. This means Y=eXY = e^X, where X∼N(μ,σ2)X \sim N(\mu, \sigma^2) 273.

Example: In modeling security prices S(n)S(n), the price ratios S(n)/S(n−1)S(n)/S(n-1) are often assumed to be independent and identically distributed lognormal random variables. If log⁡(S/S)\log(S /S ) has mean μ=0.0165\mu = 0.0165 and variance σ2=(0.0730)2\sigma^2 = (0.0730)^2 :

  • The probability the price increases in one week is P{S/S>1}=P{log⁡(S/S)>0}=0.5894P\{S /S > 1\} = P\{\log(S /S ) > 0\} = 0.5894.
  • The probability the price increases over two weeks is (0.5894)2=0.3474(0.5894)^2 = 0.3474.
  • The probability that S/S>1S /S > 1 is calculated by summing the logs, resulting in a normal distribution with mean 2μ=0.03302\mu = 0.0330 and variance 2σ22\sigma^2. This probability is 0.62540.6254.

16.1.2 Sums of Independent Poisson Random Variables

If X∼Poisson(λ1)X \sim \text{Poisson}(\lambda_1) and Y∼Poisson(λ2)Y \sim \text{Poisson}(\lambda_2) are independent, their sum X+YX + Y is a Poisson random variable with parameter λ1+λ2\lambda_1 + \lambda_2. P{X+Y=n}=∑k=0nP{X=k}P{Y=n−k}=e−(λ1+λ2)(λ1+λ2)nn!P\{X + Y = n\}= \sum_{k=0}^{n} P\{X = k\}P\{Y = n - k\} = e^{-(\lambda_1+\lambda_2)} \frac{(\lambda_1 + \lambda_2)^n}{n!} 274.

16.1.3 Sums of Independent Binomial Random Variables

If X∼Binomial(n,p)X \sim \text{Binomial}(n, p) and Y∼Binomial(m,p)Y \sim \text{Binomial}(m, p) are independent, their sum X+YX + Y is a Binomial random variable with parameters (n+m,p)(n + m, p). This is conceptually clear as X+YX+Y represents the total number of successes in (n+m)(n+m) independent trials, each with success probability pp 275.

16.1.4 Sums of Independent Geometric Random Variables

Let X1,…,XnX_1, \ldots, X_n be independent geometric random variables with parameters p1,…,pnp_1, \ldots, p_n. The sum Sn=∑i=1nXiS_n = \sum_{i=1}^n X_i represents the total number of flips needed to obtain nn heads when sequentially flipping coins with varying success probabilities pip_i.

If all pi=pp_i = p, then SnS_n follows a Negative Binomial distribution with PMF: P{Sn=k}=(k−1n−1)pn(1−p)k−n,k≥nP\{S_n = k\}= \binom{k - 1}{n - 1} p^n (1 - p)^{k-n}, \quad k \ge n 276.

If all pip_i are distinct, the PMF for SnS_n is given by Proposition 3.3: P{Sn=k}=∑i=1npiqik−1∏j≠ipjpj−pi,k≥nP\{S_n = k\}= \sum_{i=1}^{n} p_i q_i^{k-1} \prod_{j \ne i} \frac{p_j}{p_j - p_i}, \quad k \ge n where qi=1−piq_i = 1 - p_i 277.

16.2 Conditional Distributions: Discrete Case

The conditional probability mass function (PMF) of XX given Y=yY = y (where pY(y)>0p_Y(y) > 0) is defined analogously to the unconditional case: pX∣Y(x∣y)=p(x,y)pY(y)p_{X|Y} (x|y) = \frac{p(x, y)}{p_Y(y)}.

If XX and YY are independent, pX∣Y(x∣y)=pX(x)p_{X|Y} (x|y) = p_X(x) 278.

Example: Given p(0,0)=0.4p(0, 0) = 0.4, p(0,1)=0.2p(0, 1) = 0.2, p(1,0)=0.1p(1, 0) = 0.1, p(1,1)=0.3p(1, 1) = 0.3, find pX∣Y(x∣1)p_{X|Y} (x|1). First, pY=p(0,1)+p(1,1)=0.2+0.3=0.5p_Y = p(0, 1) + p(1, 1) = 0.2 + 0.3 = 0.5. Then pX∣Y(0∣1)=0.2/0.5=2/5p_{X|Y} (0|1) = 0.2/0.5 = 2/5 and pX∣Y(1∣1)=0.3/0.5=3/5p_{X|Y} (1|1) = 0.3/0.5 = 3/5.

Conditional Distribution given a Sum: If XX and YY are independent Poisson(λ1)\text{Poisson}(\lambda_1) and Poisson(λ2)\text{Poisson}(\lambda_2), the conditional distribution of XX given X+Y=nX + Y = n is Binomial with parameters nn and p=λ1λ1+λ2p = \frac{\lambda_1}{\lambda_1 + \lambda_2}. P{X=k∣X+Y=n}=(nk)(λ1λ1+λ2)k(λ2λ1+λ2)n−kP\{X = k|X + Y = n\}= \binom{n}{k} \left(\frac{\lambda_1}{\lambda_1 + \lambda_2}\right)^k \left(\frac{\lambda_2}{\lambda_1 + \lambda_2}\right)^{n-k} 279.

Conditional Multinomial Distribution: If we have a multinomial distribution for X1,…,XkX_1, \ldots, X_k (counts from nn trials with probabilities p1,…,pkp_1, \ldots, p_k), and we condition on the counts Xr+1,…,XkX_{r+1}, \ldots, X_k summing to mm, the conditional distribution of X1,…,XrX_1, \ldots, X_r is multinomial on n−mn-m trials with new probabilities pi′=pi/Frp'_i = p_i / F_r, where Fr=∑i=1rpiF_r = \sum_{i=1}^r p_i 280.

16.3 Conditional Distributions: Continuous Case

If XX and YY are jointly continuous with PDF f(x,y)f(x, y), the conditional PDF of XX given Y=yY = y (where fY(y)>0f_Y(y) > 0) is: fX∣Y(x∣y)=f(x,y)fY(y)f_{X|Y} (x|y) = \frac{f(x, y)}{f_Y(y)}. This allows defining conditional probabilities P{X∈A∣Y=y}=∫AfX∣Y(x∣y)dxP\{X \in A|Y = y\} = \int_A f_{X|Y} (x|y) dx. If XX and YY are independent, fX∣Y(x∣y)=fX(x)f_{X|Y} (x|y) = f_X(x) 281 282.

16.3.1 Bivariate Normal Distribution

If XX and YY are bivariate normal with parameters μx,μy,σx,σy,ρ\mu_x, \mu_y, \sigma_x, \sigma_y, \rho, the conditional distribution of XX given Y=yY = y is normal with: Mean:μX∣Y=y=μx+ρσxσy(y−μy)\text{Mean}: \quad \mu_{X|Y=y} = \mu_x + \rho \frac{\sigma_x}{\sigma_y} (y - \mu_y) Variance:σX∣Y=y2=σx2(1−ρ2)\text{Variance}: \quad \sigma^2_{X|Y=y} = \sigma^2_x (1 - \rho^2) 283. Similarly for YY given X=xX=x. XX and YY are independent if and only if ρ=0\rho = 0 284.

16.3.2 Conditional Distribution of a Success Probability

If XX (success probability) is Uniform(0,1)\text{Uniform}(0, 1), and given X=xX=x, the number of successes NN in n+mn+m trials is Binomial(n+m,x)\text{Binomial}(n+m, x). The conditional density of XX given N=nN=n is a Beta distribution with parameters (n+1,m+1)(n+1, m+1).

16.4 Order Statistics

Let X1,…,XnX_1, \ldots, X_n be independent and identically distributed (i.i.d.) continuous random variables with common density ff and CDF FF. The order statistics X≤X≤⋯≤X(n)X_{ } \le X_{ } \le \cdots \le X_{(n)} are the ordered values 2 285.

16.4.1 Joint Density of Order Statistics

The joint density function for X,…,X(n)X_{ }, \ldots, X_{(n)} when x1<x2<⋯<xnx_1 < x_2 < \cdots < x_n is: fX,…,X(n)(x1,x2,…,xn)=n!f(x1)f(x2)⋯f(xn)f_{X_{ }, \ldots, X_{(n)}}(x_1, x_2, \ldots, x_n) = n! f(x_1) f(x_2) \cdots f(x_n).

Example: For 3 people distributed randomly (uniformly i.i.d. on (0,1)(0, 1)), the probability that no two people are closer than distance dd (where d≤1/2d \le 1/2) is (1−2d)3(1 - 2d)^3. For nn people, this probability is [1−(n−1)d]n[1 - (n - 1)d]^n for d≤1/(n−1)d \le 1/(n-1) 286.

16.4.2 Density Function of the jj-th Order Statistic

The density function of X(j)X_{(j)} is: fX(j)(x)=n!(j−1)!(n−j)![F(x)]j−1[1−F(x)]n−jf(x)f_{X_{(j)}}(x) = \frac{n!}{(j - 1)!(n - j)!} [F(x)]^{j-1} [1 - F(x)]^{n-j} f(x) 287.

The cumulative distribution function (CDF) of X(j)X_{(j)} is related to the binomial CDF: FX(j)(y)=P{X(j)≤y}=∑k=jn(nk)[F(y)]k[1−F(y)]n−kF_{X_{(j)}}(y) = P\{X_{(j)} \le y\} = \sum_{k=j}^{n} \binom{n}{k} [F(y)]^k [1 - F(y)]^{n-k}.

16.4.3 Joint Density of X(i)X_{(i)} and X(j)X_{(j)}

For i<ji < j, the joint density is: fX(i),X(j)(xi,xj)=n!(i−1)!(j−i−1)!(n−j)![F(xi)]i−1[F(xj)−F(xi)]j−i−1[1−F(xj)]n−jf(xi)f(xj)f_{X_{(i)}, X_{(j)}}(x_i, x_j) = \frac{n!}{(i - 1)!(j - i - 1)!(n - j)!} [F(x_i)]^{i-1} [F(x_j) - F(x_i)]^{j-i-1} [1 - F(x_j)]^{n-j} f(x_i) f(x_j) 288.

16.4.4 Distribution of the Range

The range R=X(n)−XR = X_{(n)} - X_{ }. The CDF is given by integrating the joint density 1: P{R≤a}=n∫−∞∞[F(x1+a)−F(x1)]n−1f(x1)dx1P\{R \le a\}= n \int_{-\infty}^{\infty} [F(x_1 + a) - F(x_1)]^{n-1} f(x_1) dx_1. If Xi∼Uniform(0,1)X_i \sim \text{Uniform}(0, 1), the range RR follows a Beta distribution with parameters (n−1,2)(n - 1, 2) 289.

16.5 Joint Probability Distribution of Functions of Random Variables

Given jointly continuous random variables X1,X2X_1, X_2 with joint PDF fX1,X2f_{X_1, X_2}, we seek the joint density fY1,Y2f_{Y_1, Y_2} where Y1=g1(X1,X2)Y_1 = g_1(X_1, X_2) and Y2=g2(X1,X2)Y_2 = g_2(X_1, X_2). If the transformation is unique (x1=h1(y1,y2)x_1 = h_1(y_1, y_2), x2=h2(y1,y2)x_2 = h_2(y_1, y_2)) and the Jacobian J(x1,x2)J(x_1, x_2) is non-zero: J(x1,x2)=∂g1∂x1∂g2∂x2−∂g1∂x2∂g2∂x1J(x_1, x_2) = \frac{\partial g_1}{\partial x_1} \frac{\partial g_2}{\partial x_2} - \frac{\partial g_1}{\partial x_2} \frac{\partial g_2}{\partial x_1}. Then the joint density is: fY1,Y2(y1,y2)=fX1,X2(x1,x2)∣J(x1,x2)∣−1f_{Y_1, Y_2} (y_1, y_2) = f_{X_1, X_2} (x_1, x_2) |J(x_1, x_2)|^{-1}.

Example (Sum and Difference): If Y1=X1+X2Y_1 = X_1 + X_2 and Y2=X1−X2Y_2 = X_1 - X_2, then ∣J(x1,x2)∣=∣−2∣=2|J(x_1, x_2)| = |-2| = 2. The resulting density is fY1,Y2(y1,y2)=12fX1,X2(y1+y22,y1−y22)f_{Y_1, Y_2} (y_1, y_2) = \frac{1}{2} f_{X_1, X_2} \left(\frac{y_1 + y_2}{2}, \frac{y_1 - y_2}{2}\right). If X1,X2X_1, X_2 are independent standard normal, Y1Y_1 and Y2Y_2 are independent normal with mean 0 and variance 2 290 291.

Example (Polar Coordinates): If XX and YY are independent standard normal (i.e., (X,Y)(X, Y) forms a bivariate normal with ρ=0\rho=0), their polar coordinates R=X2+Y2R = \sqrt{X^2 + Y^2} and Θ=arctan⁡(Y/X)\Theta = \arctan(Y/X) are independent. Θ\Theta is uniformly distributed on (0,2π)(0, 2\pi), and RR follows the Rayleigh distribution with density fR(r)=re−r2/2f_R(r) = r e^{-r^2/2} for r>0r > 0 292.

17. Continuous random variables and joint distributions (part 7)

This final segment focuses on advanced applications of joint distributions, particularly using the Jacobian method to find the distribution of functions of continuous random variables, exemplified by transformations leading to standard normal, gamma, and beta distributions.

17.1 Transforming standard normal variables (Box-Muller transformation derivation)

The section verifies and applies the result derived from the joint distribution of two independent standard normal variables, XX and YY, using polar coordinates (R,Θ)(R, \Theta). If X1X_1 and X2X_2 are independent standard normal variables, their joint density is fX1,X2(x1,x2)=12πe−(x12+x22)/2f_{X_1, X_2}(x_1, x_2) = \frac{1}{2\pi} e^{-(x_1^2 + x_2^2)/2}.

If we transform to polar coordinates D=R2=X12+X22D = R^2 = X_1^2 + X_2^2 and Θ=arctan⁡(X2/X1)\Theta = \arctan(X_2/X_1), the joint density fD,Θ(d,θ)f_{D, \Theta}(d, \theta) is found using the Jacobian of the inverse transformation (X1=Dcos⁡ΘX_1 = \sqrt{D} \cos \Theta, X2=Dsin⁡ΘX_2 = \sqrt{D} \sin \Theta), which is 12d\frac{1}{2\sqrt{d}}. The resulting joint density is: fD,Θ(d,θ)=12e−d/2⋅12π,0<d<∞,0<θ<2πf_{D, \Theta}(d, \theta) = \frac{1}{2} e^{-d/2} \cdot \frac{1}{2\pi}, \quad 0 < d < \infty, 0 < \theta < 2\pi This shows DD and Θ\Theta are independent. The density of DD is fD(d)=12e−d/2f_D(d) = \frac{1}{2} e^{-d/2} for d>0d>0, which is an exponential distribution with parameter λ=1/2\lambda = 1/2. Since D=X12+X22D = X_1^2 + X_2^2, this confirms that DD follows a chi-squared distribution with 2 degrees of freedom, meaning the exponential distribution with rate λ=1/2\lambda=1/2 is equivalent to χ2\chi^2 .

This principle is used to generate independent unit normal random variables (X1,X2X_1, X_2) from two independent uniform random variables, U1,U2∼Uniform(0,1)U_1, U_2 \sim \text{Uniform}(0, 1), known as the Box-Muller method:

  1. R2R^2 is generated from a distribution matching χ2\chi^2 (or Exp(1/2)\text{Exp}(1/2)): R2=−2log⁡U1R^2 = -2 \log U_1 2.
  2. Θ\Theta is generated from a uniform distribution Uniform(0,2π)\text{Uniform}(0, 2\pi): Θ=2πU2\Theta = 2\pi U_2.
  3. The independent standard normal variables are then: X1=−2log⁡U1cos⁡(2πU2)X_1 = \sqrt{-2 \log U_1} \cos(2\pi U_2) X2=−2log⁡U1sin⁡(2πU2)X_2 = \sqrt{-2 \log U_1} \sin(2\pi U_2) 293.

17.2 Joint distribution of functions of random variables (General Jacobian Method)

The method for finding the joint density fY1,…,Yn(y1,…,yn)f_{Y_1, \dots, Y_n}(y_1, \dots, y_n) of Yi=gi(X1,…,Xn)Y_i = g_i(X_1, \dots, X_n) given fX1,…,Xn(x1,…,xn)f_{X_1, \dots, X_n}(x_1, \dots, x_n) requires that the inverse transformation xi=hi(y1,…,yn)x_i = h_i(y_1, \dots, y_n) exists and has continuous partial derivatives. The relationship is: fY1,…,Yn(y1,…,yn)=fX1,…,Xn(x1,…,xn)∣J(x1,…,xn)∣−1(7.3)f_{Y_1,\dots,Y_n} (y_1, \dots, y_n) = f_{X_1,\dots,X_n} (x_1, \dots, x_n) |J(x_1, \dots, x_n)|^{-1} \quad (7.3) where J(x1,…,xn)J(x_1, \dots, x_n) is the determinant of the Jacobian matrix of the transformation gig_i: J(x1,…,xn)=∣∂g1∂x1⋯∂g1∂xn⋮⋱⋮∂gn∂x1⋯∂gn∂xn∣J(x_1, \dots, x_n) = \begin{vmatrix} \frac{\partial g_1}{\partial x_1} & \cdots & \frac{\partial g_1}{\partial x_n} \\ \vdots & \ddots & \vdots \\ \frac{\partial g_n}{\partial x_1} & \cdots & \frac{\partial g_n}{\partial x_n} \end{vmatrix} 295.

Tip: This method is essential for deriving distributions of sums, ratios, or other combinations of random variables, especially when independence is lost through the transformation.

17.2.1 Transformation resulting in independent Gamma and Beta variables

If XX and YY are independent Gamma random variables with parameters (α,λ)(\alpha, \lambda) and (β,λ)(\beta, \lambda) respectively, the joint density fX,Y(x,y)f_{X,Y}(x, y) is calculated. We transform these to U=X+YU = X + Y and V=X/(X+Y)V = X/(X+Y). The inverse transformations are X=UVX = UV and Y=U(1−V)Y = U(1-V). The Jacobian determinant of the inverse transformation is: J(x,y)=∣11y(x+y)2−x(x+y)2∣=−1x+y=−1uJ(x, y) = \begin{vmatrix} 1 & 1 \\ \frac{y}{(x+y)^2} & \frac{-x}{(x+y)^2} \end{vmatrix} = -\frac{1}{x+y} = -\frac{1}{u} The resulting joint density fU,V(u,v)f_{U,V}(u, v) is: fU,V(u,v)=fX,Y(uv,u(1−v))∣J∣−1=λα+βΓ(α)Γ(β)e−λu(uv)α−1(u(1−v))β−1⋅uf_{U,V}(u, v) = f_{X,Y}(uv, u(1-v)) |J|^{-1} = \frac{\lambda^{\alpha+\beta}}{\Gamma(\alpha)\Gamma(\beta)} e^{-\lambda u} (uv)^{\alpha-1} (u(1-v))^{\beta-1} \cdot u This simplifies to: fU,V(u,v)=λα+βΓ(α+β)uα+β−11B(α,β)vα−1(1−v)β−1f_{U,V}(u, v) = \frac{\lambda^{\alpha+\beta}}{\Gamma(\alpha+\beta)} u^{\alpha+\beta-1} \frac{1}{B(\alpha, \beta)} v^{\alpha-1}(1-v)^{\beta-1} This confirms that:

  1. U=X+YU = X + Y follows a Gamma(α+β,λ)\text{Gamma}(\alpha + \beta, \lambda) distribution.
  2. V=X/(X+Y)V = X/(X+Y) follows a Beta(α,β)\text{Beta}(\alpha, \beta) distribution.
  3. Crucially, UU and VV are independent.

This result implies that if one worker completes nn exponential jobs and another completes mm exponential jobs (all independent with rate λ\lambda), the proportion of the total time taken by the first worker, X/(X+Y)X/(X+Y), is independent of the total time X+YX+Y and follows a Beta(n,m)\text{Beta}(n, m) distribution 294.

17.2.2 Sums of independent exponential variables (Order Statistics relation)

If X1,…,XnX_1, \dots, X_n are independent exponential random variables with rate λ\lambda, and we define Yi=X1+⋯+XiY_i = X_1 + \dots + X_i for i=1,…,ni=1, \dots, n. The Jacobian for the transformation YiY_i to XiX_i is J=1J=1. The inverse transformations are: X1=Y1X_1 = Y_1, X2=Y2−Y1X_2 = Y_2 - Y_1, …\dots, Xi=Yi−Yi−1X_i = Y_i - Y_{i-1}. The joint density fY1,…,Yn(y1,…,yn)f_{Y_1, \dots, Y_n}(y_1, \dots, y_n) is found by substituting these into the product of the individual exponential densities: f_{Y_1,\dots,Y_n} (y_1, y_2, \dots, y_n) = \lambda^n \exp \left( -\lambda \left[ y_1 + \sum_{i=2}^{n} (y_i - y_{i-1}) \right \right) fY1,…,Yn(y1,y2,…,yn)=λne−λyn,for 0<y1<y2<⋯<ynf_{Y_1,\dots,Y_n} (y_1, y_2, \dots, y_n) = \lambda^n e^{-\lambda y_n}, \quad \text{for } 0 < y_1 < y_2 < \cdots < y_n 296.

To find the marginal density fYn(yn)f_{Y_n}(y_n), we integrate out Y1,Y2,…,Yn−1Y_1, Y_2, \dots, Y_{n-1} sequentially: fYn(yn)=λnynn−1e−λyn/(n−1)!for yn>0f_{Y_n}(y_n) = \lambda^n y_n^{n-1} e^{-\lambda y_n} / (n-1)! \quad \text{for } y_n > 0 This shows that Yn=X1+⋯+XnY_n = X_1 + \dots + X_n is a Gamma random variable with parameters nn and λ\lambda, confirming results derived elsewhere.

17.3 Exchangeable random variables

Random variables X1,X2,…,XnX_1, X_2, \dots, X_n are exchangeable if their joint distribution remains the same regardless of the order in which the variables are observed. Mathematically, for any permutation i1,…,ini_1, \dots, i_n of 1,…,n1, \dots, n: P{Xi1≤x1,Xi2≤x2,…,Xin≤xn}=P{X1≤x1,X2≤x2,…,Xn≤xn}P\{X_{i_1} \le x_1, X_{i_2} \le x_2, \dots, X_{i_n} \le x_n\}= P\{X_1 \le x_1, X_2 \le x_2, \dots, X_n \le x_n\}.

For discrete random variables, exchangeability requires that the joint probability mass function p(x1,x2,…,xn)=P{X1=x1,…,Xn=xn}p(x_1, x_2, \dots, x_n) = P\{X_1 = x_1, \dots, X_n = x_n\} is a symmetric function of the vector (x1,…,xn)(x_1, \dots, x_n).

Example: If balls are drawn without replacement from an urn containing nn balls (kk special), and Xi=1X_i=1 if the ii-th ball is special, then X1,…,XnX_1, \dots, X_n are exchangeable 297.

18. Advanced expectation properties, limit theorems, and additional topics (part 1)

This section begins the coverage of advanced concepts including properties of exchangeable random variables, detailed descriptions of joint distributions, and introductory explorations into limit theorems and stochastic processes found in Chapters 6, 7, 8, and 9, focusing primarily on the properties of exchangeable variables and fundamental definitions of joint distributions provided on pages 298-309.

18.1 Exchangeable Random Variables and Examples

Exchangeable random variables share the property that the joint distribution of any finite subset remains unchanged under permutation of the indices.

Joint Probability Mass Function (PMF) for Exchangeable Binary Variables (Drawing without replacement): If X1,X2,…,XnX_1, X_2, \ldots, X_n are indicators corresponding to drawing balls from an urn containing kk special balls and n−kn-k non-special balls without replacement, their joint PMF is given by: p(x1,…,xn)=k!(n−k)!n!where ∑i=1nxi=k and xi∈{0,1}p(x_1, \ldots, x_n) = \frac{k!(n - k)!}{n!} \quad \text{where } \sum_{i=1}^n x_i = k \text{ and } x_i \in \{0, 1\} This is derived from the symmetry resulting from the sampling process, where any specific sequence with kk ones and n−kn-k zeros has the same probability, determined by the product of conditional probabilities, e.g., kn⋅k−1n−1⋅n−kn−2⋯\frac{k}{n} \cdot \frac{k-1}{n-1} \cdot \frac{n-k}{n-2} \cdots.

Tip: Exchangeability implies that marginal distributions are identical, i.e., P{Xi=x}P\{X_i = x\} is the same for all ii. For discrete exchangeable variables XX and YY, P{X=x}=∑yP{X=x,Y=y}=∑yP{X=y,Y=x}=P{Y=x}P\{X = x\} = \sum_y P\{X=x, Y=y\} = \sum_y P\{X=y, Y=x\} = P\{Y=x\}.

Example: Waiting Times for Successes (Polya's Urn Model): If YiY_i denotes the number of additional draws required after the (i−1)(i-1)-th success to obtain the ii-th success (for kk total successes), then Y1,Y2,…,YkY_1, Y_2, \ldots, Y_k are exchangeable. This result implies that the waiting time for the first ace from a deck has the same distribution as the additional wait time between aces 298.

Polya's Urn Model (Continuous Reinforcement): An urn starts with nn red and mm blue balls. A ball is drawn, noted, replaced along with another ball of the same color. If Xi=1X_i=1 if the ii-th ball is red, then X1,X2,…,XkX_1, X_2, \ldots, X_k are exchangeable. For any sequence x1,…,xkx_1, \ldots, x_k containing rr ones (red) and k−rk-r zeros (blue), the joint PMF is: P{X1=x1,…,Xk=xk}=n(n+1)⋯(n+r−1)m(m+1)⋯(m+k−r−1)(n+m)⋯(n+m+k−1)P\{X_1 = x_1, \ldots, X_k = x_k\} = \frac{n(n + 1) \cdots (n + r - 1)m(m + 1) \cdots (m + k - r - 1)}{(n + m) \cdots (n + m + k - 1)} A corollary is that P{Xi=red}=nn+mP\{X_i = \text{red}\} = \frac{n}{n+m} for any ii 299.

Exchangeability for Continuous Variables (Order Statistics Transformation): If X1,…,XnX_1, \ldots, X_n are independent uniform (0,1)(0, 1) random variables, and X,…,X(n)X_{ }, \ldots, X_{(n)} are their order statistics, the spacings defined by Y1=XY_1 = X_{ } and Yi=X(i)−X(i−1)Y_i = X_{(i)} - X_{(i-1)} for i=2,…,ni=2, \ldots, n are exchangeable. The joint density function for Y1,…,YnY_1, \ldots, Y_n is: fY1,…,Yn(y1,y2,…,yn)=n!if 0<yi<1 for all i, and ∑i=1nyi<1f_{Y_1, \ldots, Y_n} (y_1, y_2, \ldots, y_n) = n! \quad \text{if } 0 < y_i < 1 \text{ for all } i, \text{ and } \sum_{i=1}^n y_i < 1 This is symmetric in y1,…,yny_1, \ldots, y_n, confirming exchangeability.

18.2 Fundamentals of Joint Distributions

This section reviews the foundational definitions for pairs of random variables (X,Y)(X, Y) to.

Joint Cumulative Distribution Function (CDF): For any pair (X,Y)(X, Y): F(x,y)=P{X≤x,Y≤y},−∞<x,y<∞F(x, y) = P\{X \le x, Y \le y\}, \quad -\infty < x, y < \infty Marginal CDFs are found by taking limits: FX(x)=lim⁡y→∞F(x,y)F_X(x) = \lim_{y\to\infty} F(x, y) FY(y)=lim⁡x→−∞F(x,y)F_Y(y) = \lim_{x\to-\infty} F(x, y)

Discrete Case (Joint PMF): p(i,j)=P{X=i,Y=j}p(i, j) = P\{X = i, Y = j\} Marginal PMFs are sums over the other variable: P{X=i}=∑jp(i,j)P{Y=j}=∑ip(i,j)P\{X = i\} = \sum_j p(i, j) \quad P\{Y = j\} = \sum_i p(i, j)

Jointly Continuous Case (Joint PDF): If XX and YY are jointly continuous, there exists a joint probability density function (PDF), f(x,y)f(x, y), such that for any two-dimensional set CC: P{(X,Y)∈C}=∬Cf(x,y)dxdyP\{(X, Y) \in C\} = \iint_C f(x, y) dx dy This implies that the probability of an infinitesimal rectangle is P{x<X<x+dx,y<Y<y+dy}≈f(x,y)dxdyP\{x < X < x + dx, y < Y < y + dy\} \approx f(x, y) dx dy 300. Marginal PDFs are found by integration: fX(x)=∫−∞∞f(x,y)dyfY(y)=∫−∞∞f(x,y)dxf_X(x) = \int_{-\infty}^{\infty} f(x, y) dy \quad f_Y(y) = \int_{-\infty}^{\infty} f(x, y) dx

Independence: XX and YY are independent if, for all sets AA and BB: P{X∈A,Y∈B}=P{X∈A}P{Y∈B}P\{X \in A, Y \in B\} = P\{X \in A\} P\{Y \in B\} Equivalently, for continuous variables, the joint density factors: f(x,y)=fX(x)fY(y)f(x, y) = f_X(x) f_Y(y).

Sum of Independent Variables: If XX and YY are independent continuous variables, the CDF of their sum X+YX+Y is: FX+Y(a)=∫−∞∞FX(a−y)fY(y)dyF_{X+Y}(a) = \int_{-\infty}^{\infty} F_X(a - y) f_Y(y) dy If XiX_i are independent Normal (μi,σi2)(\mu_i, \sigma_i^2), then ∑Xi∼Normal(∑μi,∑σi2)\sum X_i \sim \text{Normal}(\sum \mu_i, \sum \sigma_i^2). If XiX_i are independent Poisson (λi)(\lambda_i), then ∑Xi∼Poisson(∑λi)\sum X_i \sim \text{Poisson}(\sum \lambda_i).

Conditional Distributions: If XX and YY are discrete: P{X=x∣Y=y}=p(x,y)pY(y)P\{X = x|Y = y\} = \frac{p(x, y)}{p_Y(y)} If XX and YY are jointly continuous: fX∣Y(x∣y)=f(x,y)fY(y)f_{X|Y}(x|y) = \frac{f(x, y)}{f_Y(y)}

Order Statistics (Independent Continuous Case): For X1,…,XnX_1, \ldots, X_n i.i.d. with density ff, the joint density of their ordered values X≤⋯≤X(n)X_{ } \le \cdots \le X_{(n)} is 1: f(x1,…,xn)=n!f(x1)⋯f(xn)for x1≤x2≤⋯≤xnf_{(x_1, \ldots, x_n)} = n! f(x_1) \cdots f(x_n) \quad \text{for } x_1 \le x_2 \le \cdots \le x_n 301.

18.3 Advanced Joint Distribution Problems Context

The problems listed between pages 302 and 309 illustrate applications of these concepts, particularly involving transformations, conditional probabilities, and extensions of bivariate distributions:

  • Discrete Applications: Problems 6.2, 6.3, 6.6 (testing transistors), and 6.38 (choosing numbers) rely on calculating joint PMFs for dependent sampling (without replacement) or for specific constructions involving sequential events. Problem 6.24 explores the independence of the number of trials needed to achieve the first success (NN) and the outcome of that success (XX) in a sequence of independent Bernoulli trials.
  • Continuous Applications & Transformations: Problems like 6.8, 6.10, 6.13, 6.19, 6.20, 6.21, and 6.52-6.59 deal with finding joint/marginal densities for functions of random variables (e.g., ratios, sums, polar coordinates)305.
    • For example, 6.6 asks to verify independence for f(x,y)=C(y2−x2)e−yf(x, y) = C(y^2 - x^2)e^{-y} over −y<x<y,0<y<∞-y < x < y, 0 < y < \infty 303.
    • Problem 6.20 asks if f(x,y)=xe−(x+y)f(x, y) = xe^{-(x+y)} for x>0,y>0x>0, y>0 implies independence (it does, as f(x,y)=(xe−x)(e−y)f(x, y) = (xe^{-x})(e^{-y})).
  • Conditional Probability and Independence: Problems 6.38(c) and 6.39 explicitly ask whether derived variables are independent, often contrasting with exchangeability. Problem 6.14 explores the conditional distribution of one geometric random variable given the sum of two independent geometric random variables, which results in uniform distribution conditional on the sum 304.
  • Bivariate Poisson Distribution: Problem 6.17 introduces the concept where X=X1+X2X = X_1 + X_2 and Y=X2+X3Y = X_2 + X_3 for independent Poisson XiX_i, requiring the derivation of P{X=n,Y=m}P\{X=n, Y=m\} 307.
  • Bivariate Exponential Distribution: Problem 6.8 in Self-Test Exercises introduces the bivariate exponential distribution arising from competing exponential failure times X1X_1 and X2X_2 driven by three independent shock processes 309.

This initial segment of advanced topics focuses primarily on refining properties of expectation, covering expectations of functions of multiple random variables, the linearity of expectation, and foundational concepts leading into conditional expectation and moment generating functions.

18.4 Basic properties of expectation

The expected value, E[X]E[X], serves as a weighted average of the possible values of the random variable XX. A fundamental property derived from this definition is that if a random variable XX is known to lie within a closed interval [a,b][a, b] with probability 1, i.e., P{a≤X≤b}=1P\{a \le X \le b\}= 1, then its expectation must also lie within that interval: a≤E[X≤ba \le E[X \le b 312.

Tip: This property is intuitive: if all possible outcomes are bounded, the average outcome must also be bounded by those same limits.

18.5 Expectation of sums of random variables

The expectation of a function of two random variables, g(X,Y)g(X, Y), is defined differently for discrete and continuous joint distributions.

For discrete random variables XX and YY with joint Probability Mass Function (PMF) p(x,y)p(x,y): E[g(X,Y)]=∑y∑xg(x,y)p(x,y)E[g(X, Y)] = \sum_y \sum_x g(x, y)p(x, y)

For continuous random variables XX and YY with joint Probability Density Function (PDF) f(x,y)f(x,y): E[g(X,Y)]=∫−∞∞∫−∞∞g(x,y)f(x,y)dxdyE[g(X, Y)] = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} g(x, y)f (x, y) dx dy

The continuous case derivation for non-negative g(X,Y)g(X, Y) relies on Fubini's theorem and the relationship E[g(X,Y)]=∫0∞P{g(X,Y)>t}dtE[g(X, Y)] = \int_{0}^{\infty} P\{g(X, Y)> t\}dt 313.

Linearity of Expectation

A crucial result arising from Proposition 2.1 is the linearity of expectation, which holds whenever E[X]E[X] and E[Y]E[Y] are finite: E[X+Y=E[X+E[Y(2.1)E[X + Y = E[X + E[Y \quad (2.1)

This extends via induction to any finite number of random variables: E[X1+⋯+Xn=E[X1+⋯+E[Xn(2.2)E[X_1 + \cdots + X_n = E[X_1 + \cdots + E[X_n \quad (2.2)

Example: Finding the expected distance between an accident point XX and an ambulance location YY, where both are independent and uniformly distributed on [0,L][0, L], requires calculating E[∣X−Y∣]E[|X - Y|]. Using the joint density f(x,y)=1/L2f(x, y) = 1/L^2 for 0<x<L,0<y<L0 < x < L, 0 < y < L, the result is E[∣X−Y∣]=L/3E[|X - Y|] = L/3.

A direct consequence of linearity is the monotonicity property: if X≥YX \ge Y (i.e., X(ω)≥Y(ω)X(\omega) \ge Y(\omega) for all outcomes ω\omega), then E[X≥E[Y]E[X \ge E[Y] 314.

Applications of Linearity of Expectation

Equation (2.2) is vital for finding the expectation of variables defined as sums of simpler variables:

  • Sample Mean: For nn i.i.d. random variables XiX_i with mean μ\mu, the sample mean Xˉ=1n∑i=1nXi\bar{X} = \frac{1}{n} \sum_{i=1}^n X_i has expectation E[Xˉ]=μE[\bar{X}] = \mu.
  • Boole’s Inequality (Union Bound): By setting X=∑XiX = \sum X_i where XiX_i are indicator variables for events AiA_i, and noting X≥YX \ge Y (where Y=1Y=1 if X≥1X \ge 1), we establish Boole’s inequality: P(⋃i=1nAi)≤∑i=1nP(Ai)P\left(\bigcup_{i=1}^n A_i\right) \le \sum_{i=1}^n P(A_i) 315.
  • Binomial Expectation: If XX is Binomial(n,pn, p), X=∑i=1nXiX = \sum_{i=1}^n X_i, where XiX_i are Bernoulli(pp). Thus, E[X=∑E[Xi=npE[X = \sum E[X_i = np.
  • Negative Binomial Expectation: If XX is the number of trials for rr successes, X=∑i=1rXiX = \sum_{i=1}^r X_i, where XiX_i is the number of trials for the ii-th success (Geometric(pp)). Since E[Xi=1/pE[X_i = 1/p, E[X=r/pE[X = r/p 316.
  • Hypergeometric Expectation: If nn balls are drawn from an urn with NN total balls, mm of which are white, the expected number of white balls selected is E[X=mn/NE[X = mn/N. This can be shown by defining indicator variables XiX_i for each of the mm white balls being selected, yielding E[Xi=n/NE[X_i = n/N, so E[X=∑E[Xi=mn/NE[X = \sum E[X_i = mn/N 317.

19. Advanced expectation properties, limit theorems, and additional topics (part 2)

This section covers advanced properties concerning the expectation of sums of random variables, methods for determining moments of the number of events that occur, and the introduction to covariance and correlation, using indicator variables extensively.

19.1 Expected number of matches and generalized coupon collection

The expectation of a sum of random variables, E[∑Xi]E[\sum X_i], is always ∑E[Xi]\sum E[X_i], regardless of independence (linearity of expectation). This is demonstrated through several combinatorial expectation problems.

  • Expected number of matches (Hat Problem): For NN people selecting hats randomly, the expected number of people selecting their own hat is exactly 1. This uses indicator variables XiX_i where E[Xi=1/NE[X_i = 1/N, leading to E[X=∑i=1NE[Xi=N⋅(1/N)=1E[X = \sum_{i=1}^N E[X_i = N \cdot (1/N) = 1.

  • Coupon-collecting (Equal Probabilities): If there are NN types of coupons, and each is equally likely, the expected number of coupons needed to obtain a complete set is: E[X = N \left[ 1 + \frac{1}{N-1} + \frac{1}{N-2} + \cdots + \frac{1}{1} \right = N \sum_{i=1}^{N} \frac{1}{i} This is NN times the NN-th harmonic number, HNH_N 318.

  • Expected number of runs: For a random permutation of nn ones and mm zeros, the expected number of runs of ones, E[R]E[R ], and the expected number of runs of zeros, E[R]E[R ], are calculated using indicator variables for the start of a run319: E[R=nn+m+(n+m−1)nm(n+m)(n+m−1)=nn+m+nmn+m−1E[R = \frac{n}{n+m} + \frac{(n+m-1)nm}{(n+m)(n+m-1)} = \frac{n}{n+m} + \frac{nm}{n+m-1}. The expected total number of runs is: E[R+R=1+2nmn+mE[R + R = 1 + \frac{2nm}{n+m} 1.

  • Random Walk in the Plane: For a particle taking nn steps of unit length in a random direction (angle θi\theta_i uniformly distributed in (0,2π)(0, 2\pi)), the expected square of the distance E[D2]E[D^2] from the origin after nn steps is simply nn 321.

  • Quick-Sort Algorithm: If XX is the number of comparisons needed to sort nn distinct values, its expectation is: E[X=∑i=1n−1∑j=i+1nP{i and j are ever compared}=∑i=1n−1∑j=i+1n2j−i+1E[X = \sum_{i=1}^{n-1} \sum_{j=i+1}^{n} P\{\text{i and j are ever compared}\} = \sum_{i=1}^{n-1} \sum_{j=i+1}^{n} \frac{2}{j - i + 1} For large nn, this is approximated by E[X≈2nlog⁡(n)E[X \approx 2n \log(n) comparisons 323.

19.2 Relating the Expectation of the Maximum to Partial Minimums

The Maximum–Minimums Identity provides a formula relating the maximum of a set of numbers to the sums and alternating sums of the minimums of their subsets.

  • Proposition 2.2 (Maximum–Minimums Identity): For arbitrary numbers xi,i=1,…,nx_i, i=1, \dots, n: max⁡ixi=∑ixi−∑i<jmin⁡(xi,xj)+∑i<j<kmin⁡(xi,xj,xk)+⋯+(−1)n+1min⁡(x1,…,xn)\max_i x_i = \sum_i x_i - \sum_{i<j} \min(x_i, x_j) + \sum_{i<j<k} \min(x_i, x_j, x_k) + \cdots + (-1)^{n+1} \min(x_1, \dots, x_n) This is proven probabilistically by considering U∼Uniform(0,1)U \sim \text{Uniform}(0, 1) and events Ai={U<xi}A_i = \{U < x_i\} 328.

  • Expected Maximum: Applying expectation yields a key relationship for random variables X1,…,XnX_1, \dots, X_n: E\left[ \max_i X_i \right = \sum_i E[X_i - \sum_{i<j} E[\min(X_i, X_j)] + \cdots + (-1)^{n+1}E[\min(X_1, \dots, X_n)] 329.

  • Application to Coupon Collecting (Unequal Probabilities): If obtaining type ii occurs with probability pip_i, and XX is the time until a complete set is collected, X=max⁡iXiX = \max_i X_i where XiX_i is Geometric(pip_i). The identity gives: E[X=∑i1pi−∑i<j1pi+pj+∑i<j<k1pi+pj+pk+⋯+(−1)n+11∑piE[X = \sum_i \frac{1}{p_i} - \sum_{i<j} \frac{1}{p_i + p_j} + \sum_{i<j<k} \frac{1}{p_i + p_j + p_k} + \cdots + (-1)^{n+1} \frac{1}{\sum p_i} A more computationally useful form involves integration: E[X=∫0∞(1−∏i=1n(1−e−pix))dxE[X = \int_0^\infty \left(1 - \prod_{i=1}^n (1 - e^{-p_i x}) \right) dx.

19.3 Moments of the Number of Events that Occur

This methodology focuses on finding moments (like E[X,E[X2]E[X, E[X^2]) for XX, the count of events A1,…,AnA_1, \dots, A_n that occur, using indicator variables IiI_i.

  • First Moment (E[X]E[X]): E[X = E\left[\sum_{i=1}^n I_i\right = \sum_{i=1}^n E[I_i = \sum_{i=1}^n P(A_i).

  • Second Moment relationship via (X2)\binom{X}{2}: The number of pairs of events that occur is (X2)=∑i<jIiIj\binom{X}{2} = \sum_{i<j} I_i I_j. Taking expectations: E\left[\binom{X}{2}\right = \sum_{i<j} E[I_i I_j = \sum_{i<j} P(A_i A_j) 330. This leads to E[X2−E[X=2∑i<jP(AiAj)E[X^2 - E[X = 2 \sum_{i<j} P(A_i A_j).

  • kk-th Moment identity: In general, the expected number of kk-tuples of events occurring is: E\left[\binom{X}{k}\right = \sum_{i_1 < i_2 < \cdots < i_k} P(A_{i_1} A_{i_2} \cdots A_{i_k}).

  • Moments of Binomial Random Variables: For X∼Binomial(n,p)X \sim \text{Binomial}(n, p), the kk-th factorial moment is: E[X(X−1)⋯(X−k+1)]=n(n−1)⋯(n−k+1)pk=(nk)k!pkE[X(X - 1) \cdots (X - k + 1)] = n(n - 1) \cdots (n - k + 1) p^k = \binom{n}{k} k! p^k This confirms Var(X)=np(1−p)\text{Var}(X) = np(1-p) 331.

  • Moments of Hypergeometric Random Variables: For XX white balls in nn draws from an urn with NN total balls (mm white): E\left[\binom{X}{k}\right = \binom{n}{k} \frac{m(m-1)\cdots(m-k+1)}{N(N-1)\cdots(N-k+1)} 332.

  • Negative Hypergeometric Mean/Variance: If YY is the number of withdrawals until rr special balls are drawn from nn special and mm ordinary balls, Y=r+XY = r + X, where XX is the number of ordinary balls drawn before the rr-th special ball. P(Ai)=P{ordinary ball i is withdrawn before r special balls}=rn+1P(A_i) = P\{\text{ordinary ball } i \text{ is withdrawn before } r \text{ special balls}\} = \frac{r}{n+1} E[Y=r+∑i=1mP(Ai)=r+mrn+1=r(n+m+1)n+1E[Y = r + \sum_{i=1}^m P(A_i) = r + \frac{mr}{n+1} = \frac{r(n+m+1)}{n+1} 335.

  • Singleton Variance in Coupon Collector's Problem: If XX is the number of types for which exactly one coupon is collected when stopping after the complete set is obtained, then: E[X=∑i=1n1i=HnE[X = \sum_{i=1}^n \frac{1}{i} = H_n. The variance calculation involves complex sums related to the timing of the first appearance of pairs of types 336.

19.4 Covariance, Variance of Sums, and Correlations

This introduces measures of linear dependence between random variables.

  • Independence Implication: If XX and YY are independent, then for any functions gg and hh: E[g(X)h(Y)]=E[g(X)]E[h(Y)]E[g(X)h(Y)] = E[g(X)]E[h(Y)].

  • Covariance Definition: The covariance measures the linear relationship between XX and YY: Cov(X,Y)=E[(X−E[X])(Y−E[Y])]\text{Cov}(X, Y) = E[(X - E[X])(Y - E[Y])] 337.

Tip: While linearity of expectation holds unconditionally, the product rule E[XY=E[X]E[Y]E[XY = E[X]E[Y] only holds if XX and YY are independent. Covariance measures how far E[XY]E[XY] deviates from this independence baseline.

20. Advanced expectation properties, limit theorems, and additional topics (part 3)

This section summarizes advanced properties of covariance, correlation, conditional expectation, and introduces foundational concepts for limit theorems and stochastic processes, focusing on detailed covariance calculations and the crucial law of total expectation.

20.1 Covariance, variance of sums, and correlations

Covariance measures the linear dependence between two random variables, XX and YY.

Definition and basic properties of covariance

The covariance is defined as: Cov(X,Y)=E[XY−E[X]E[Y]\text{Cov}(X, Y) = E[XY - E[X]E[Y] If XX and YY are independent, then Cov(X,Y)=0\text{Cov}(X, Y) = 0. However, the converse is not true; zero covariance does not imply independence.

Example: If XX takes values {0,1,−1}\{0, 1, -1\} each with probability 1/31/3, and Y=1Y=1 if X=0X=0 and Y=0Y=0 otherwise, then Cov(X,Y)=0\text{Cov}(X, Y)=0 but XX and YY are dependent because YY is determined by XX.

Proposition 4.2 lists key covariance properties:

  • Cov(X,Y)=Cov(Y,X)\text{Cov}(X, Y) = \text{Cov}(Y, X) (Symmetry)
  • Cov(X,X)=Var(X)\text{Cov}(X, X) = \text{Var}(X)
  • Cov(aX,Y)=aCov(X,Y)\text{Cov}(aX, Y) = a \text{Cov}(X, Y)
  • Covariance is additive over sums: Cov(∑i=1nXi,∑j=1mYj)=∑i=1n∑j=1mCov(Xi,Yj)\text{Cov}\left(\sum_{i=1}^n X_i, \sum_{j=1}^m Y_j\right) = \sum_{i=1}^n \sum_{j=1}^m \text{Cov}(X_i, Y_j) This follows from linearity of expectation applied to the definition 338.

Variance of a sum of random variables

Using the properties above, the variance of a sum of random variables X1,…,XnX_1, \dots, X_n is: Var(∑i=1nXi)=∑i=1nVar(Xi)+2∑i<jCov(Xi,Xj)(4.1)\text{Var}\left(\sum_{i=1}^n X_i\right) = \sum_{i=1}^n \text{Var}(X_i) + 2 \sum_{i<j} \text{Cov}(X_i, X_j) \quad (4.1) If X1,…,XnX_1, \dots, X_n are pairwise independent (i.e., Cov(Xi,Xj)=0\text{Cov}(X_i, X_j) = 0 for i≠ji \neq j), the formula simplifies to the sum of individual variances: Var(∑i=1nXi)=∑i=1nVar(Xi)\text{Var}\left(\sum_{i=1}^n X_i\right) = \sum_{i=1}^n \text{Var}(X_i)

Example (Sample Variance): For independent and identically distributed (i.i.d.) random variables XiX_i with mean μ\mu and variance σ2\sigma^2, the sample mean X=1n∑XiX = \frac{1}{n}\sum X_i has variance Var(X)=σ2/n\text{Var}(X) = \sigma^2/n. The expected value of the sample variance S2=1n−1∑(Xi−X)2S^2 = \frac{1}{n-1}\sum (X_i - X)^2 is σ2\sigma^2 340.

Example (Binomial Variance): If X=∑i=1nXiX = \sum_{i=1}^n X_i, where XiX_i are independent Bernoulli random variables with success probability pp, then Var(Xi)=p−p2\text{Var}(X_i) = p - p^2. By independence, Var(X)=∑Var(Xi)=np(1−p)\text{Var}(X) = \sum \text{Var}(X_i) = np(1-p) 341.

Correlation coefficient

The correlation coefficient ρ(X,Y)\rho(X, Y) is defined when Var(X)Var(Y)>0\text{Var}(X)\text{Var}(Y) > 0: ρ(X,Y)=Cov(X,Y)Var(X)Var(Y)\rho(X, Y) = \frac{\text{Cov}(X, Y)}{\sqrt{\text{Var}(X)\text{Var}(Y)}} A key result is that the correlation is bounded between −1-1 and 11: −1≤ρ(X,Y)≤1(4.2)-1 \le \rho(X, Y) \le 1 \quad (4.2) Equality holds if and only if YY is a linear function of XX (Y=a+bXY = a + bX), where the sign of bb determines whether the correlation is +1+1 or −1-1 343.

  • ρ(X,Y)>0\rho(X, Y) > 0: YY tends to increase when XX increases.
  • ρ(X,Y)<0\rho(X, Y) < 0: YY tends to decrease when XX increases.
  • ρ(X,Y)=0\rho(X, Y) = 0: XX and YY are uncorrelated.

Example (Indicator Variables): For indicator variables IAI_A and IBI_B, Cov(IA,IB)=P(AB)−P(A)P(B)=P(B)[P(A∣B)−P(A)]\text{Cov}(I_A, I_B) = P(AB) - P(A)P(B) = P(B)[P(A|B) - P(A)]. The correlation sign depends on whether P(A∣B)P(A|B) is greater than, equal to, or less than P(A)P(A) 344.

20.2 Conditional expectation definitions

Conditional expectation extends the concept of expectation to a reduced sample space defined by the realization of another random variable.

Discrete case

If XX and YY are jointly discrete, the conditional expectation of XX given Y=yY=y (where P{Y=y}>0P\{Y=y\} > 0) is: E[X∣Y=y=∑xxP{X=x∣Y=y}=∑xxp(x,y)pY(y)E[X|Y = y = \sum_x x P\{X = x|Y = y\} = \sum_x x \frac{p(x, y)}{p_Y(y)} Properties of ordinary expectations, such as linearity, hold for conditional expectations.

Example (Conditional Sum): If XX and YY are independent binomial(n,p)(n, p) variables, then E[X∣X+Y=m=m/2E[X|X + Y = m = m/2, as the conditional distribution of XX given the sum is hypergeometric 347.

Continuous case

If XX and YY are jointly continuous with joint density f(x,y)f(x, y), the conditional expectation of XX given Y=yY=y (where fY(y)>0f_Y(y) > 0) is: E[X∣Y=y=∫−∞∞xfX∣Y(x∣y)dx=∫−∞∞xf(x,y)fY(y)dxE[X|Y = y = \int_{-\infty}^{\infty} x f_{X|Y}(x|y) dx = \int_{-\infty}^{\infty} x \frac{f(x, y)}{f_Y(y)} dx

Example: If f(x,y)=(1/y)e−x/ye−yf(x, y) = (1/y)e^{-x/y}e^{-y} for x>0,y>0x>0, y>0, the conditional distribution of XX given Y=yY=y is exponential with mean yy, so E[X∣Y=y=yE[X|Y = y = y.

20.3 Computing expectations by conditioning

The most powerful tool involving conditional expectation is the Law of Total Expectation (or the Tower Property).

Law of Total Expectation (Tower Property)

The expectation of XX can be calculated by averaging the conditional expectation of XX given YY over all possible values of YY: E[X=E[E[X∣Y]]E[X = E[E[X|Y]] For discrete YY: E[X=∑yE[X∣Y=y]P{Y=y}(5.1a)E[X = \sum_y E[X|Y = y]P\{Y = y\} \quad (5.1a) For continuous YY with density fY(y)f_Y(y): E[X=∫−∞∞E[X∣Y=y]fY(y)dy(5.1b)E[X = \int_{-\infty}^{\infty} E[X|Y = y]f_Y(y) dy \quad (5.1b) This identity allows computation of E[X]E[X] by breaking the problem down based on the outcome of YY 348.

Example (Miner Problem): If a miner chooses one of three doors (safety in 3 hours, return after 5 hours, return after 7 hours), letting E[X]E[X] be the expected time, and conditioning on the first choice, we find E[X∣Y=2=5+E[X]E[X|Y=2 = 5 + E[X] and E[X∣Y=3=7+E[X]E[X|Y=3 = 7 + E[X]. Solving E[X=13(3+(5+E[X])+(7+E[X]))E[X = \frac{1}{3}(3 + (5+E[X]) + (7+E[X])) yields E[X=15E[X = 15 hours 349.

Expectation of a sum of a random number of variables

If NN is the number of terms and XiX_i are i.i.d. with E[X=μE[X = \mu, and NN is independent of all XiX_i, then: E\left[\sum_{i=1}^N X_i\right = E[N]E[X] This is derived using conditioning on N=nN=n: E[\sum_{i=1}^N X_i = E\left[E[\sum_{i=1}^N X_i | N]\right = E[NE[X]] = E[N]E[X].

Tip: Use the Tower Property (E[X=E[E[X∣Y]]E[X = E[E[X|Y]]) whenever a problem can be naturally divided into sequential steps or dependent events, as seen in the miner problem or calculating the total money spent by a random number of customers 350.

Variance by conditioning

The variance can also be computed using conditioning: Var(N)=E[Var(N∣Y)]+Var(E[N∣Y])\text{Var}(N) = E[\text{Var}(N|Y)] + \text{Var}(E[N|Y])

Example (Geometric Distribution): For a geometric random variable NN (time to first success pp), conditioning on YY (success on the first trial, P(Y=1)=pP(Y=1)=p):

  • If Y=1Y=1, N=1N=1, so E[N2∣Y=1=1E[N^2|Y=1 = 1.
  • If Y=0Y=0, N=1+N′N = 1 + N', where N′N' has the same distribution as NN, so E[N2∣Y=0=E[(1+N)2]E[N^2|Y=0 = E[(1+N)^2]. This yields E[N2=2−pp2E[N^2 = \frac{2-p}{p^2}, resulting in Var(N)=1−pp2\text{Var}(N) = \frac{1-p}{p^2} 355.

Gambler's Ruin Expected Stages

For a two-player game where players start with jj and n−jn-j units, and the game continues until one player has nn units, the expected number of stages mjm_j is: mj=j(n−j)m_j = j(n-j) This result holds even for rr players, where nin_i is the initial fortune of player ii, and n=∑nin = \sum n_i is the total fortune. The expected number of stages E[X]E[X] until a single victor emerges is: E[X=12(n2−∑i=1rni2)E[X = \frac{1}{2}\left(n^2 - \sum_{i=1}^r n_i^2\right) This calculation relies on solving the recurrence relation mj+1=2mj−mj−1−2m_{j+1} = 2m_j - m_{j-1} - 2 derived by conditioning on the outcome of the first stage 356.

21. Advanced expectation properties, limit theorems, and additional topics (part 4)

This section summarizes advanced concepts in expectation, including computing probabilities and variances via conditioning, introducing the concept of optimal prediction using conditional expectation, and detailing the utility of Moment Generating Functions (MGFs) for common distributions and sums of random variables.

21.1 Computing probabilities and expectations by conditioning

The law of total expectation allows computing unconditional expectations by conditioning on an intermediate random variable YY: E[X=∑yE[X∣Y=y]P(Y=y)if Y is discreteE[X = \sum_y E[X|Y=y]P(Y=y) \quad \text{if Y is discrete} E[X=∫−∞∞E[X∣Y=y]fY(y)dyif Y is continuousE[X = \int_{-\infty}^{\infty} E[X|Y=y]f_Y(y)dy \quad \text{if Y is continuous} [5.1a, 5.1b A powerful application is computing probabilities using indicator functions. If XX is the indicator for event EE, then P(E)=E[X]P(E) = E[X], and we have the law of total probability expressed through conditional probability: P(E)=∑yP(E∣Y=y)P(Y=y)if Y is discreteP(E) = \sum_y P(E|Y=y)P(Y=y) \quad \text{if Y is discrete} P(E)=∫−∞∞P(E∣Y=y)fY(y)dyif Y is continuousP(E) = \int_{-\infty}^{\infty} P(E|Y=y)f_Y(y)dy \quad \text{if Y is continuous} [5.8

Example: The expected number of uniform (0,1)(0, 1) random variables required for their sum to exceed xx, denoted m(x)m(x), satisfies m(x)=exm(x) = e^x. Thus, the expected number required to exceed 1 is m=em = e 1 358.

The problem of optimally selecting the best prize out of nn presented sequentially can be solved by conditioning on the position XX of the best prize. The optimal strategy of rejecting the first kk prizes and accepting the next best results in the probability of success Pk(best)≈knlog⁡(nk)P_k(\text{best}) \approx \frac{k}{n} \log\left(\frac{n}{k}\right). This is maximized when k≈n/ek \approx n/e, yielding a maximum success probability of approximately 1/e≈0.367881/e \approx 0.36788 359 360.

If XX is conditionally binomial with parameters nn and UU, where U∼Uniform(0,1)U \sim \text{Uniform}(0, 1), then the marginal distribution of XX is uniform on {0,1,…,n}\{0, 1, \ldots, n\}, where P{X=i}=1/(n+1)P\{X = i\} = 1/(n+1) 361.

21.2 Conditional Variance and prediction

The conditional variance of XX given Y=yY=y is defined analogously to the standard variance: Var(X∣Y)≡E[(X−E[X∣Y])2∣Y]\text{Var}(X|Y) \equiv E[(X - E[X|Y])^2|Y] which also leads to: Var(X∣Y)=E[X2∣Y−(E[X∣Y])2\text{Var}(X|Y) = E[X^2|Y - (E[X|Y])^2 362.

The conditional variance formula (Law of Total Variance) relates the unconditional variance to the conditional components: Var(X)=E[Var(X∣Y)]+Var(E[X∣Y])\text{Var}(X) = E[\text{Var}(X|Y)] + \text{Var}(E[X|Y]) 363.

Tip: This formula is crucial for calculating the variance of sums of a random number of random variables. If XiX_i are i.i.d. and NN is independent, then Var(∑i=1NXi)=E[N]Var(X)+(E[X])2Var(N)\text{Var}\left(\sum_{i=1}^{N} X_i\right) = E[N]\text{Var}(X) + (E[X])^2\text{Var}(N).

In prediction theory, if we observe X=xX=x and wish to predict YY by minimizing the mean square error E[(Y−g(X))2]E[(Y - g(X))^2], the best predictor is the conditional expectation g(X)=E[Y∣X]g(X) = E[Y|X] 364 365.

If a complete description of the joint distribution is unavailable, the best linear predictor of YY based on XX takes the form a+bXa + bX. The optimal constants aa and bb are determined by the means, variances, and covariance, yielding the predictor: μY+ρσYσX(X−μX)\mu_Y + \rho \frac{\sigma_Y}{\sigma_X} (X - \mu_X) where ρ=Corr(X,Y)\rho = \text{Corr}(X, Y), μX=E[X]\mu_X = E[X], and σX2=Var(X)\sigma_X^2 = \text{Var}(X). The mean square error of this linear predictor is σY2(1−ρ2)\sigma_Y^2 (1 - \rho^2) 368.

21.3 Moment Generating Functions (MGFs)

The Moment Generating Function (MGF) of a random variable XX is defined as: M(t)=E[etX]M(t) = E[e^{tX}].

The MGF allows calculation of moments: E[Xn=M(n)E[X^n = M^{(n)} . The MGF uniquely determines the distribution, provided it exists in a neighborhood of t=0t=0 369.

MGFs for Common Distributions

The MGFs for several key distributions are summarized below, including their means and variances derived from differentiation:

DistributionParametersPDF/PMFMGF M(t)M(t)MeanVariance
Uniform(a,b)(a, b)f(x)=1b−af(x) = \frac{1}{b-a} for a<x<ba<x<betb−etat(b−a)\frac{e^{tb} - e^{ta}}{t(b-a)}a+b2\frac{a+b}{2}(b−a)212\frac{(b-a)^2}{12}
Exponentialλ>0\lambda > 0f(x)=λe−λx,x≥0f(x) = \lambda e^{-\lambda x}, x \ge 0λλ−t,t<λ\frac{\lambda}{\lambda - t}, t < \lambda1λ\frac{1}{\lambda}1λ2\frac{1}{\lambda^2}
Normal(μ,σ2)(\mu, \sigma^2)f(x)=12πσ2e−(x−μ)2/2σ2f(x) = \frac{1}{\sqrt{2\pi\sigma^2}} e^{-(x-\mu)^2/2\sigma^2}exp⁡{μt+σ2t22}\exp\left\{\mu t + \frac{\sigma^2 t^2}{2}\right\}μ\muσ2\sigma^2

Table summarizing key properties of continuous probability distributions including their probability mass functions, moment generating functions, means, and variances.

For independent random variables XX and YY, the MGF of their sum is the product of their individual MGFs: MX+Y(t)=MX(t)MY(t)M_{X+Y}(t) = M_X(t)M_Y(t). This property confirms known results for sums 373:

  • The sum of independent Binomial(n,p)(n, p) and Binomial(m,p)(m, p) is Binomial(n+m,p)(n+m, p).
  • The sum of independent Poisson(λ1)(\lambda_1) and Poisson(λ2)(\lambda_2) is Poisson(λ1+λ2)(\lambda_1 + \lambda_2).
  • The sum of independent Normal(μ1,σ12)(\mu_1, \sigma_1^2) and Normal(μ2,σ22)(\mu_2, \sigma_2^2) is Normal(μ1+μ2,σ12+σ22)(\mu_1 + \mu_2, \sigma_1^2 + \sigma_2^2) 375.

The MGF for a chi-squared random variable with nn degrees of freedom (sum of nn independent Standard Normal2\text{Standard Normal}^2) is M(t)=(1−2t)−n/2M(t) = (1 - 2t)^{-n/2}.

21.4 MGF of a random sum of random variables

If X1,X2,…X_1, X_2, \ldots are i.i.d. with MGF MX(t)M_X(t), and NN is an independent non-negative integer-valued random variable, the MGF of the sum Y=∑i=1NXiY = \sum_{i=1}^N X_i is found by conditioning on NN: E[etY∣N=n=[MX(t)]nE[e^{tY} | N=n = [M_X(t)]^n Thus, the overall MGF is: MY(t)=E[(MX(t))N]M_Y(t) = E[(M_X(t))^N] 376.

Example: If Y∼Uniform(0,1)Y \sim \text{Uniform}(0, 1) (playing the role of pp in Example 5l), and XX conditional on Y=pY=p is Binomial(n,p)(n, p), then MX(t)=E[(pet+1−p)n]M_X(t) = E[(pet + 1 - p)^n]. Taking the expectation over YY yields MX(t)=E[(tY+1−Y)n]M_X(t) = E[(tY+1-Y)^n], which eventually confirms that XX is uniformly distributed over {0,1,…,n}\{0, 1, \ldots, n\} 377.

22. Advanced expectation properties, limit theorems, and additional topics (part 5)

This section summarizes advanced concepts related to moment generating functions (MGFs), properties of the multivariate normal distribution, the independence of sample mean and variance in normal samples, and the theoretical extension of expectation using Stieltjes integrals.

22.1 Joint moment generating functions

The joint moment generating function (MGF) for nn random variables X1,…,XnX_1, \ldots, X_n, denoted M(t1,…,tn)M(t_1, \ldots, t_n), is defined as: M(t1,…,tn)=E[et1X1+⋯+tnXn]M(t_1, \ldots, t_n) = E[e^{t_1X_1+\cdots+ t_nX_n}].

Individual MGFs can be recovered by setting all but one tjt_j to zero: MXi(t)=E[etXi]=M(0,…,0,t,0,…,0)M_{X_i} (t) = E[e^{tX_i}] = M(0, \ldots, 0, t, 0, \ldots, 0).

The joint MGF uniquely determines the joint distribution of X1,…,XnX_1, \ldots, X_n. Independence of X1,…,XnX_1, \ldots, X_n holds if and only if the joint MGF factors into the product of the individual MGFs: M(t1,…,tn)=MX1(t1)⋯MXn(tn)(7.4)M(t_1, \ldots, t_n) = M_{X_1} (t_1) \cdots M_{X_n} (t_n) \quad (7.4).

Tip: The factorability condition (7.4) provides a powerful method for proving independence, especially when dealing with sums or combinations of existing distributions, as demonstrated by the examples involving normal and Poisson variables 378.

22.2 Example: Sum and Difference of Independent Normals

If XX and YY are independent normal random variables with mean μ\mu and variance σ2\sigma^2, their sum X+YX+Y and difference X−YX-Y are independent. This is shown using the joint MGF: E[et(X+Y)+s(X−Y)]=E[e(t+s)X+(t−s)Y]=E[e(t+s)X]E[e(t−s)Y]E[e^{t(X+Y)+s(X-Y)}] = E[e^{(t+s)X+(t-s)Y}] = E[e^{(t+s)X}]E[e^{(t-s)Y}] =eμ(t+s)+σ2(t+s)2/2eμ(t−s)+σ2(t−s)2/2=e2μt+σ2t2eσ2s2= e^{\mu(t+s)+\sigma^2(t+s)^2/2} e^{\mu(t-s)+\sigma^2(t-s)^2/2} = e^{2\mu t+\sigma^2t^2} e^{\sigma^2s^2}. This resulting MGF corresponds to the joint distribution of two independent normal variables, implying X+YX+Y and X−YX-Y are independent.

22.3 Example: Sums in the Poisson Process

If XX (total events) is Poisson(λ\lambda), and each event is counted independently with probability pp, the number of counted events (XcX_c) and uncounted events (X−XcX-X_c) are independent Poisson random variables with means λp\lambda p and λ(1−p)\lambda(1-p), respectively. This is proven by showing their joint MGF is the product of the individual Poisson MGFs: E[esXc+t(X−Xc)]=eλp(es−1)eλ(1−p)(et−1)E[e^{sX_c+t(X-X_c)}] = e^{\lambda p(e^s-1 )}e^{\lambda(1-p)(e^t-1)} 379.

22.4 Additional properties of normal random variables

22.5 The multivariate normal distribution

A set of random variables X1,…,XmX_1, \ldots, X_m has a multivariate normal distribution if they are linear combinations of independent unit normal random variables Z1,…,ZnZ_1, \ldots, Z_n: Xi=ai1Z1+⋯+ainZn+μiX_i = a_{i1}Z_1 + \cdots + a_{in}Z_n + \mu_i 380.

The distribution is completely determined by the means E[Xi=μiE[X_i = \mu_i and the covariances Cov(Xi,Xj)\text{Cov}(X_i, X_j).

The joint MGF for X1,…,XmX_1, \ldots, X_m is: M(t1,…,tm)=exp⁡{∑i=1mtiμi+12∑i=1m∑j=1mtitjCov(Xi,Xj)}M(t_1, \ldots, t_m) = \exp \left\{ \sum_{i=1}^{m} t_i\mu_i + \frac{1}{2} \sum_{i=1}^{m} \sum_{j=1}^{m} t_i t_j \text{Cov}(X_i, X_j) \right\}.

When m=2m=2, this reduces to the bivariate normal distribution.

Example: For bivariate normal XX and YY, P{X<Y}P\{X < Y\} can be found by standardizing X−YX-Y since X−YX-Y is also normal: Var(X−Y)=σx2+σy2−2ρσxσy\text{Var}(X - Y) = \sigma_x^2 + \sigma_y^2 - 2\rho\sigma_x\sigma_y P{X<Y}=P{X−Y<0}=Φ(μy−μxσx2+σy2−2ρσxσy)P\{X < Y\} = P\{X - Y < 0\} = \Phi \left( \frac{\mu_y - \mu_x}{\sqrt{\sigma^2_x + \sigma^2_y - 2\rho\sigma_x\sigma_y}} \right) 381.

22.6 Independence of sample mean and sample variance

If X1,…,XnX_1, \ldots, X_n are independent and identically distributed (i.i.d.) normal variables with mean μ\mu and variance σ2\sigma^2, then the sample mean Xˉ\bar{X} and the sample variance S2S^2 are independent.

  1. The sample mean Xˉ\bar{X} is normal with E[Xˉ]=μE[\bar{X}] = \mu and Var(Xˉ)=σ2/n\text{Var}(\bar{X}) = \sigma^2/n.
  2. The variables Xˉ,X1−Xˉ,…,Xn−Xˉ\bar{X}, X_1 - \bar{X}, \ldots, X_n - \bar{X} have a joint multivariate normal distribution. Due to Cov(Xˉ,Xi−Xˉ)=0\text{Cov}(\bar{X}, X_i - \bar{X}) = 0, it follows that Xˉ\bar{X} is independent of the sequence of deviations Xi−XˉX_i - \bar{X} 382.
  3. Since S2S^2 is a function of these deviations, Xˉ\bar{X} is independent of S2S^2.
  4. The quantity (n−1)S2/σ2(n-1)S^2/\sigma^2 is a chi-squared random variable with n−1n-1 degrees of freedom, shown using MGFs and the identity: (n−1)S2σ2+(Xˉ−μσ/n)2=∑i=1n(Xi−μσ)2\frac{(n - 1)S^2}{\sigma^2} + \left(\frac{\bar{X} - \mu}{\sigma/\sqrt{n}}\right)^2 = \sum_{i=1}^{n} \left(\frac{X_i - \mu}{\sigma}\right)^2. The right side is the sum of nn independent standard normal squares (i.e., χn2\chi^2_n), and the first term on the left is χn−12\chi^2_{n-1} 383.

Proposition 8.1 Summary: If X1,…,XnX_1, \ldots, X_n are i.i.d. N(μ,σ2)N(\mu, \sigma^2):

  • Xˉ∼N(μ,σ2/n)\bar{X} \sim N(\mu, \sigma^2/n) and is independent of S2S^2.
  • (n−1)S2/σ2∼χn−12(n-1)S^2/\sigma^2 \sim \chi^2_{n-1}.

22.7 General definition of expectation using Stieltjes integral

Expectation can be generalized beyond discrete and continuous distributions to encompass arbitrary random variables XX using the Stieltjes integral.

22.8 The Stieltjes integral

For a distribution function FF, the Stieltjes integral of a nonnegative function gg over [a,b][a, b] is defined as the limit of the sum: ∫abg(x)dF(x)=lim⁡∑i=1ng(xi)[F(xi)−F(xi−1)]\int_a^b g(x) dF(x) = \lim \sum_{i=1}^{n} g(x_i)[F(x_i) - F(x_{i-1})].

If gg is not nonnegative, we define g+(x)g^+(x) (positive part) and g−(x)g^-(x) (negative part), and the integral over the real line exists if at least one of ∫−∞∞g+(x)dF(x)\int_{-\infty}^{\infty} g^+(x) dF(x) or ∫−∞∞g−(x)dF(x)\int_{-\infty}^{\infty} g^-(x) dF(x) is not +∞+\infty: ∫−∞∞g(x)dF(x)=∫−∞∞g+(x)dF(x)−∫−∞∞g−(x)dF(x)\int_{-\infty}^{\infty} g(x) dF(x) = \int_{-\infty}^{\infty} g^+(x) dF(x) - \int_{-\infty}^{\infty} g^-(x) dF(x) 384.

The expected value of an arbitrary random variable XX with CDF FF is then defined as: E[X=∫−∞∞x dF(x)(9.1)E[X = \int_{-\infty}^{\infty} x \, dF(x) \quad (9.1).

This definition yields the familiar forms:

  • For discrete XX with mass function p(x)p(x): E[X=∑x:p(x)>0xp(x)E[X = \sum_{x:p(x)>0} x p(x).
  • For continuous XX with density f(x)f(x): E[X=∫−∞∞xf(x)dxE[X = \int_{-\infty}^{\infty} x f(x) dx.

Tip: The Stieltjes integral approach unifies the definitions of expectation for discrete and continuous random variables, simplifying theoretical proofs by avoiding separate cases.

22.9 Review of expectation properties and MGFs

The summary reiterates key expectation properties derived from the general definition 385:

  • Linearity of Expectation: E \left[ \sum_{i=1}^{n} X_i \right = \sum_{i=1}^{n} E[X_i].
  • Covariance: Cov(X,Y)=E[XY−E[X]E[Y]\text{Cov}(X, Y) = E[XY - E[X]E[Y]. Cov(∑i=1nXi,∑j=1mYj)=∑i=1n∑j=1mCov(Xi,Yj)\text{Cov} \left( \sum_{i=1}^{n} X_i, \sum_{j=1}^{m} Y_j \right) = \sum_{i=1}^{n} \sum_{j=1}^{m} \text{Cov}(X_i, Y_j).
  • Conditional Expectation: The law of total expectation is fundamental: E[X=E[E[X∣Y]]E[X = E[E[X|Y]] 386.
  • Conditional Variance Formula (Law of Total Variance): Var(X)=E[Var(X∣Y)]+Var(E[X∣Y])\text{Var}(X) = E[\text{Var}(X|Y)] + \text{Var}(E[X|Y]).
  • Moment Generating Function (MGF): M(t)=E[etX]M(t) = E[e^{tX}]. Moments are found by differentiation at t=0t=0: E[Xn=dndtnM(t)∣t=0,n=1,2,…E[X^n = \frac{d^n}{dt^n} M(t) \bigg|_{t=0}, \quad n = 1, 2, \ldots.

The MGF uniquely determines the distribution, and the MGF of the sum of independent variables equals the product of their individual MGFs 387.

This section summarizes specific problems from Chapters 7, 8, and 9, focusing on advanced applications of expectation, indicator variables, covariance, conditional expectation, and combinatorial probability problems spanning pages 389 to 397.

22.10 Problems involving indicator variables and expected counts (Pages 389-390)

This set of problems heavily utilizes the linearity of expectation via indicator random variables, often applied in combinatorial settings like card arrangements or sampling.

  • Matched Pairs (Problem 7.15): For nn people choosing hats, a matched pair (i,j)(i, j) occurs if ii chooses jj's hat and jj chooses ii's hat. Finding the expected number of such pairs involves summing indicator variables for each possible pair {i,j}\{i, j\}, i≠ji \neq j.

  • Derangements and Guesses (Problem 7.17): Let NN be the number of correct guesses when guessing the positions of nn shuffled cards.

    • If no feedback is given, E[N=1E[N = 1 regardless of strategy, by defining NN as the sum of indicators that the ii-th guess is correct.
    • If feedback (the card revealed) is given after each guess, the optimal strategy leads to E[N=∑k=1n1k=log⁡nE[N = \sum_{k=1}^{n} \frac{1}{k} = \log n (approximately).
    • If feedback (right/wrong) is given, the optimal strategy yields E[N=∑k=0n−11k!=1+12!+13!+⋯+1n!≈e−1E[N = \sum_{k=0}^{n-1} \frac{1}{k!} = 1 + \frac{1}{2!} + \frac{1}{3!} + \cdots + \frac{1}{n!} \approx e - 1.
  • Expected Matches in Deck Dealing (Problem 7.18): A match occurs if the kk-th card dealt is the rank expected for that position in the repeating sequence (Ace, 2, 3,..., King, Ace,...). The expected number of matches is computed by summing indicators over the 52 positions, considering the cyclic nature of the ranks.

  • Coupon Collection Variants (Problem 7.19): In sampling with replacement where type ii appears with probability PiP_i:

    • The mean number caught before the first type 1 catch follows a geometric distribution logic, where the probability of not catching type 1 is 1−P11 - P_1.
    • Finding the mean number of types caught before the first type 1 catch involves summing indicators over the other r−1r-1 types.
  • Sampling Without Replacement (Problem 7.20): When drawing balls sequentially based on weight (probability proportional to remaining weight), the expected number of balls drawn before ball 1 is determined by considering the relative weights.

  • Birthday Problems (Problem 7.21): For 100 people:

    • The expected number of days shared by exactly 3 people is found by summing indicators over all 365 days.
    • The expected number of distinct birthdays uses indicators over all days for whether at least one person has that birthday.
  • Coupon Collector's Problem Variation (Problem 7.22): The expected number of rolls of a fair die needed until all 6 sides appear is a classic coupon collector's problem, E[N=∑k=166kE[N = \sum_{k=1}^6 \frac{6}{k}.

  • Sequential Decision Making (Problem 7.25): For i.i.d. continuous random variables XiX_i, NN is the first time the sequence stops decreasing (XN−1<XNX_{N-1} < X_N). The expected value E[N=eE[N = e.

22.11 Advanced Expectation and Variance Calculations (Pages 390-392)

These problems involve conditioning, partitioning random variables, or calculating moments for complex dependencies.

  • Urn Problems with Transfers (Problem 7.23): When balls are moved between two urns, the final expected count of white balls is found by partitioning the count into balls originating from Urn 1 (XiX_i indicators) and balls originating from Urn 2 (YiY_i indicators) and summing expectations.

  • Pill Consumption Model (Problem 7.24): This involves tracking the state of small and large pills over time, often solved using indicator variables for the initial pills that ultimately contribute to the final count XX or relate to the final day YY.

  • Order Statistics (Problem 7.26): For X1,…,XnX_1, \dots, X_n i.i.d. U(0,1)U(0, 1):

    • E[max⁡(X1,…,Xn)]=nn+1E[\max(X_1, \dots, X_n)] = \frac{n}{n+1}.
    • E[min⁡(X1,…,Xn)]=1n+1E[\min(X_1, \dots, X_n)] = \frac{1}{n+1}.
  • Covariance Applications (Problems 7.36, 7.37):

    • If XX is the count of 1s and YY is the count of 2s in nn die rolls, Cov(X,Y)=−nP1P2Cov(X, Y) = -n P_1 P_2 for multinomial distributions, leading to Cov(X,Y)=−n(16)(16)Cov(X, Y) = -n (\frac{1}{6})(\frac{1}{6}) for a fair die.
    • If X=D1+D2X=D_1+D_2 (sum) and Y=D1−D2Y=D_1-D_2 (difference) from two rolls, Cov(X,Y)=E[D12−E[D22=0Cov(X, Y) = E[D_1^2 - E[D_2^2 = 0 since D1D_1 and D2D_2 are i.i.d. with the same distribution.
  • General Covariance Properties (Problems 7.38, 7.39):

    • Problem 7.38 requires calculating E[XY]E[XY] from the joint density f(x,y)f(x, y) to find the covariance.
    • Problem 7.39 explores Cov(Yn,Yn+j)Cov(Y_n, Y_{n+j}) where Yn=Xn+Xn+1+Xn+2Y_n = X_n + X_{n+1} + X_{n+2} for i.i.d. variables. Due to independence, the covariance depends only on the overlap in the indices.
  • Expected Return Strategy (Problem 7.54): For a stopping game conditional on the initial sum, the optimal critical value ii is found by maximizing the expected return E[Xi]E[X_i] derived by conditioning on the first roll outcome.

  • Poisson Processes and Conditional Expectation (Problems 7.55, 7.56, 7.57): These deal with compound processes.

    • If accidents are Poisson (λ=5\lambda=5) and injuries per accident WW have E[W]=2.5E[W]=2.5, the total expected injuries is E[NE[W=5×2.5=12.5E[N E[W = 5 \times 2.5 = 12.5 by Wald's identity (implied).
    • If NN people enter an elevator (Poisson λ=10\lambda=10), and each chooses one of NN floors uniformly, the expected number of stops is found using conditional expectation on NN.
  • Bayesian Updating / Coin Flips (Problems 7.49, 7.70, 7.71):

    • Problem 7.49 involves using the results of the first three flips to update the posterior belief about which coin (with p=0.4p=0.4 or p=0.7p=0.7) was chosen, and then finding the conditional expectation of heads in the remaining flips.
    • If the coin bias pp is uniform U(0,1)U(0, 1), the probability of ii heads in nn flips is 1n+1\frac{1}{n+1} (This is the Beta-Binomial distribution)

22.12 Conditional Expectation and Rank Statistics (Pages 391-393)

This area covers problems testing deep understanding of conditioning and ranking methods.

  • Rank Sums (Problem 7.43): For nn i.i.d. XX's and mm i.i.d. YY's (independent samples), the rank sum RR is calculated assuming F=GF=G. E[R]E[R] and Var(R)Var(R) are derived based on the structure of the order statistics.

  • Runs in Ranked Data (Problem 7.44): When ranking items produced by two methods (F1=F2F_1=F_2), the expected number of runs (RR) of items from method 1 is calculated. This relates to the expected position of the first item of type 1 among the n+mn+m items.

  • Conditional Expectation Given Non-Independence (Problem 7.48): When rolling a die, XX is rolls for a 6, YY is rolls for a 5.

    • E[X]E[X] is the expectation of a geometric distribution E[X=1/P(roll 6)=6E[X = 1/P(\text{roll 6}) = 6.
    • E[X∣Y=k]E[X|Y=k] requires conditioning on the sequence of rolls up to the first 5 occurring on roll kk.
  • Conditional Moments (Problems 7.50, 7.51): Finding E[Xk∣Y=y]E[X^k | Y=y] requires integrating the conditional density f(x∣y)f(x|y) against xkx^k

  • Average Weight (Problem 7.52): The average weight of the entire population is the expected value of the subgroup average weight, weighted by the subgroup proportion: E[W=∑piwiE[W = \sum p_i w_i.

  • Prisoner's Dilemma (Problem 7.53): This is a classic problem solved by setting up an equation for the expected time EE conditioned on the first door choice, leading to a linear equation in EE 12.

22.13 Theoretical Concepts and Advanced Techniques (Pages 393-397)

This final grouping covers theoretical proofs related to covariance, conditional expectation properties, and limiting behavior.

  • Theoretical Exercise Highlights (Selected Problems):

    • Cauchy-Schwarz Inequality (7.24): Proving (E[XY])2≤E[X2]E[Y2](\text{E}[XY])^2 \le \text{E}[X^2]\text{E}[Y^2] using the property that a quadratic in tt formed by E[(tX+Y)2]E[(tX+Y)^2] must have a non-negative discriminant if it is always non-negative.
    • Conditional Expectation Properties (7.25, 7.26, 7.28): Showing E[X∣Y=y=E[X]E[X|Y=y = E[X] if X,YX, Y are independent, and proving the linearity property E[g(X)Y∣X=g(X)E[Y∣X]E[g(X)Y|X = g(X)E[Y|X].
    • Conditional Covariance Formula (7.20): Proving Cov(X,Y)=E[Cov(X,Y∣Z)]+Cov(E[X∣Z,E[Y∣Z])\text{Cov}(X, Y) = E[\text{Cov}(X, Y|Z)] + \text{Cov}(E[X|Z, E[Y|Z]) 14.
    • Stochastic Ordering (7.7): If X≥stYX \ge_{st} Y, then E[X≥E[Y]E[X \ge E[Y] for non-negative variables, proven using E[X=∫0∞P{X>t}dtE[X = \int_0^\infty P\{X > t\} dt 13.
  • Sequential Head Runs (Problem 7.33, 7.34): Finding the expected number of flips E[Tr]E[T_r] required for rr consecutive heads. This is typically solved via conditioning on the position of the first tail or by relating E[Tr]E[T_r] recursively to E[Tr−1]E[T_{r-1}].

  • Probability Generating Functions (Problem 7.35): Relating the PGF ϕ(s)=E[sX]\phi(s) = E[s^X] of a general discrete variable XX to the probability P{X<Y}P\{X < Y\} where YY is geometric with p=1−sp=1-s 15.

Tip: Theoretical exercises such as 7.4, 7.7, and 7.20 are critical for understanding advanced concepts like Taylor expansion approximation for E[g(X)]E[g(X)], stochastic ordering implications, and variance decomposition, respectively. These often appear in theoretical portions of advanced probability exams.

23. Advanced expectation properties, limit theorems, and additional topics (part 6)

This section covers the application of advanced expectation properties, the foundational principles of the Weak Law of Large Numbers (WLLN) and the Central Limit Theorem (CLT), utilizing associated inequalities for probability bounds.

23.1 Review of Basic Inequalities (Markov and Chebyshev)

The section on limit theorems often begins by reviewing fundamental tools used to bound probabilities based only on distributional moments.

23.2 Markov's Inequality

For any random variable XX that takes only nonnegative values, and for any a>0a > 0: P{X≥a}≤E[X]aP\{X \geq a\} \leq \frac{E[X]}{a} The proof utilizes an indicator function II: if X≥aX \geq a, I=1I=1; otherwise I=0I=0. Since X≥0X \geq 0, we have I≤X/aI \leq X/a. Taking expectations proves the result 403.

23.3 Chebyshev's Inequality

If XX has a finite mean μ\mu and variance σ2\sigma^2, then for any k>0k > 0: P{∣X−μ∣≥k}≤σ2k2P\{|X - \mu| \geq k\} \leq \frac{\sigma^2}{k^2} This is derived directly by applying Markov's inequality to the nonnegative random variable (X−μ)2(X - \mu)^2, whose expectation is σ2\sigma^2.

Tip: These inequalities provide bounds when the exact distribution is unknown, relying only on the mean (Markov) or mean and variance (Chebyshev). However, these bounds are often not tight, as shown when comparing the Chebyshev bound to the exact probability for uniform or normal distributions.

23.4 Application of Chebyshev's Inequality

Chebyshev's inequality can be used to determine minimum certainty levels. For example, if the mean production is 50 and the variance is 25, the probability that production is between 40 and 60 (i.e., ∣X−50∣<10|X - 50| < 10) is at least 1−1/4=3/41 - 1/4 = 3/4 404.

23.5 Deterministic Variables

A direct consequence of Chebyshev's inequality is Proposition 2.3: If Var(X)=0\text{Var}(X) = 0, then P{X=E[X]}=1P\{X = E[X]\} = 1. This means a random variable has variance zero if and only if it is constant with probability 1 405.

23.6 Laws of Large Numbers

Laws of large numbers address the convergence of the average of a sequence of random variables to their expected average.

23.7 Weak Law of Large Numbers (WLLN)

The WLLN states that if X1,X2,…X_1, X_2, \ldots are independent and identically distributed (i.i.d.) random variables with E[Xi=μE[X_i = \mu, then for any ε>0\varepsilon > 0: P{∣X1+⋯+Xnn−μ∣≥ε}→0as n→∞P\left\{\left|\frac{X_1 + \cdots + X_n}{n} - \mu\right| \geq \varepsilon\right\} \rightarrow 0 \quad \text{as } n \rightarrow \infty The proof shown assumes finite variance σ2\sigma^2, using Chebyshev's inequality: P{∣X1+⋯+Xnn−μ∣≥ε}≤σ2nε2P\left\{\left|\frac{X_1 + \cdots + X_n}{n} - \mu\right| \geq \varepsilon\right\} \leq \frac{\sigma^2}{n\varepsilon^2} Since the right side goes to zero as n→∞n \rightarrow \infty, the WLLN is proven under this assumption.

Historical Note: James Bernoulli proved the special case for Bernoulli random variables in 1713. The general form shown is attributed to Khintchine.

23.8 The Central Limit Theorem (CLT)

The CLT is one of the most remarkable results in probability, stating that the sum of a large number of independent random variables approaches a normal distribution.

23.9 Statement of the CLT

Let X1,X2,…X_1, X_2, \ldots be i.i.d. random variables with mean μ\mu and variance σ2\sigma^2. The distribution of the standardized sum tends to the standard normal distribution (N(0,1)\mathcal{N}(0, 1)) as n→∞n \rightarrow \infty: P{∑i=1nXi−nμσn≤a}→12π∫−∞ae−x2/2dx=Φ(a)as n→∞P\left\{\frac{\sum_{i=1}^n X_i - n\mu}{\sigma\sqrt{n}} \leq a\right\} \rightarrow \frac{1}{\sqrt{2\pi}} \int_{-\infty}^a e^{-x^2/2} dx = \Phi(a) \quad \text{as } n \rightarrow \infty Convergence is actually uniform in aa 406.

23.10 Key Lemma for Proof

The proof relies on Lemma 3.1, which states that if the moment generating functions (MGFs) MZn(t)M_{Z_n}(t) converge pointwise to MZ(t)M_Z(t) for all tt, then the distribution functions FZn(t)F_{Z_n}(t) converge to FZ(t)F_Z(t) at all continuity points of FZ(t)F_Z(t).

23.11 Proof Outline (Assuming MGF Exists)

For the case where μ=0\mu=0 and σ2=1\sigma^2=1, we examine the MGF of the standardized sum Sn=∑i=1nXi/nS_n = \sum_{i=1}^n X_i/\sqrt{n}, which is [M(t/n)]n[M(t/\sqrt{n})]^n. The goal is to show this converges to et2/2e^{t^2/2}. This is equivalent to showing nlog⁡M(t/n)→t2/2n \log M(t/\sqrt{n}) \rightarrow t^2/2. Using Taylor series properties around t=0t=0 (log⁡M=0\log M =0, μ=M′/M=0\mu=M' /M =0, E[X2]=M′′/M=1E[X^2]=M'' /M =1), L'Hôpital's rule applied twice yields the result 407.

Historical Note: The first version was proven by DeMoivre for p=1/2p=1/2 Bernoulli variables, extended by Laplace. Rigorous proof was first given by Liapounoff (1901–1902) 408.

23.12 Applications of the CLT

The CLT justifies the use of the normal distribution to approximate sums of many i.i.d. variables.

  • Approximating Distributions: For a Poisson variable X∼Poisson(λ=100)X \sim \text{Poisson}(\lambda=100), the probability P{X≥120}P\{X \geq 120\} is approximated by standardizing and using Φ\Phi, including a continuity correction (using 119.5): P{X≥120}≈P{Z≥119.5−100100}=1−Φ(1.95)≈0.0256P\{X \geq 120\} \approx P\left\{Z \geq \frac{119.5 - 100}{\sqrt{100}}\right\} = 1 - \Phi(1.95) \approx 0.0256 412.
  • Determining Sample Size (Measurement Certainty): If measurements XiX_i have mean dd and variance σ2=4\sigma^2=4, to be 95 percent certain that the sample average is accurate to within 0.50.5 light-year, we require nn such that: 2Φ(n4)−1=0.95  ⟹  Φ(n4)=0.9752\Phi\left(\frac{\sqrt{n}}{4}\right) - 1 = 0.95 \implies \Phi\left(\frac{\sqrt{n}}{4}\right) = 0.975 This leads to n/4=1.96\sqrt{n}/4 = 1.96, requiring n≈62n \approx 62 observations 409.
  • Approximation of Sums: For a sum of 10 i.i.d. U(0,1)U(0, 1) variables, E[∑Xi=10(1/2)=5E[\sum X_i = 10(1/2) = 5 and Var(∑Xi)=10(1/12)=10/12\text{Var}(\sum X_i) = 10(1/12) = 10/12. The approximation for P{∑Xi>6}P\{\sum X_i > 6\} is: P{∑Xi−510/12>6−510/12}≈1−Φ(1.2)≈0.1367P\left\{\frac{\sum X_i - 5}{\sqrt{10/12}} > \frac{6 - 5}{\sqrt{10/12}}\right\} \approx 1 - \Phi(\sqrt{1.2}) \approx 0.1367 413.
  • Continuity Correction: When approximating a discrete distribution (like Poisson or sums of Bernoulli variables) with the continuous normal distribution, a continuity correction is typically applied, such as using P{X≥k}≈P{Xnormal≥k−0.5}P\{X \geq k\} \approx P\{X_{normal} \geq k - 0.5\} 411.

This section summarizes key results from probability theory, focusing on the extension of the Central Limit Theorem (CLT) for independent variables and providing a detailed look at the Strong Law of Large Numbers (SLLN) and its implication regarding convergence.

23.13 Central limit theorem for independent random variables

The Central Limit Theorem (CLT) extends beyond the case of independent and identically distributed (i.i.d.) variables to sequences of independent random variables that are not necessarily identically distributed.

A specific version of the CLT for independent random variables requires two conditions:

  1. The variables XiX_i must be uniformly bounded, meaning there exists some constant MM such that P{∣Xi∣<M}=1P\{|X_i| < M\}=1 for all ii.
  2. The sum of the variances converges: ∑i=1∞σi2=q\sum_{i=1}^{\infty} \sigma_i^2 = q, where σi2=Var(Xi)\sigma_i^2 = \text{Var}(X_i).

Under these conditions, the standardized sum converges in distribution to the standard normal distribution Φ1(a)\Phi_1(a) as n→qn \rightarrow q:

P \left\{ \frac{\sum_{i=1}^{n} (X_i - \mu_i)}{\sqrt{\sum_{i=1}^{n} \sigma_i^2}} \le a \right\} \rightarrow \Phi_1(a) \quad \text{as } n \rightarrow q where $\mu_i = E[X_i]$. > **Historical Note:** The CLT was initially stated and proven by Pierre-Simon, Marquis de Laplace, based on observations that measurement errors (sums of many small forces) tend to follow a normal distribution. Laplace famously viewed probability theory as "common sense reduced to calculation" [414](#page=414). ## 23.14 The strong law of large numbers (SLLN) The Strong Law of Large Numbers (SLLN) is a fundamental result stating that the sample average of a sequence of independent and identically distributed (i.i.d.) random variables converges to the common mean with probability 1. **Theorem 4.1 The strong law of large numbers:** If $X_1, X_2, \ldots$ are independent and identically distributed random variables with a finite mean $\mu = E[X_i]$, then with probability 1: \frac{X_1 + X_2 + \cdots + X_n}{n} \rightarrow \mu \quad \text{as } n \rightarrow q This is formally written as $P \left\{ \lim_{n\rightarrow q} \frac{\sum_{i=1}^{n} X_i}{n} = \mu \right\} = 1$. ### Application to event probabilities The SLLN has a direct interpretation in terms of relative frequencies. If $X_i$ are indicator variables for an event $E$ occurring on trial $i$ (i.e., $X_i=1$ if $E$ occurs, $0$ otherwise), then: \frac{X_1 + \cdots + X_n}{n} \rightarrow E[X = P(E) \quad \text{with probability 1} This means the limiting proportion of trials where event $E$ occurs is exactly its probability $P(E)$. ### Proof outline for SLLN (under finite fourth moment assumption) The proof presented assumes that the i.i.d. random variables $X_i$ have a finite fourth moment, $E[X_i^4 = K < q$, and that the mean $\mu=0$. The proof involves examining $E[S_n^4]$ where $S_n = \sum_{i=1}^{n} X_i$. Due to independence and $\mu=0$, many cross-product terms in the expansion of $E[S_n^4]$ vanish (e.g., $E[X_i^3 X_j = 0$). The resulting bound is derived as: E\left[ \frac{S_4_n}{n^4} \right \le \frac{K}{n^3} + \frac{3K}{n^2} Since the expectation of the sum $\sum_{n=1}^{\infty} E\left[ \frac{S_4_n}{n^4} \right]$ converges (because the terms decay fast enough), it implies that $\sum_{n=1}^{\infty} \frac{S_4_n}{n^4} < q$ with probability 1. Convergence of the series implies the $n$-th term goes to zero, so: \lim_{n\rightarrow q} \frac{S_4_n}{n^4} = 0 \quad \text{with probability 1} If $(\frac{S_n}{n})^4 \rightarrow 0$, then $\frac{S_n}{n} \rightarrow 0$ with probability 1. If $\mu \ne 0$, the argument is applied to $X_i - \mu$ to show $\frac{S_n}{n} \rightarrow \mu$ [415](#page=415) [416](#page=416). > **Tip:** The crucial difference between the SLLN and the Weak Law of Large Numbers (WLLN) lies in the nature of convergence. WLLN states that for any *specific* large $n^*$, the sample mean is likely close to $\mu$. SLLN guarantees that for any $\epsilon > 0$, the sample mean will exceed $\epsilon$ difference from $\mu$ only a finite number of times as $n$ increases, ensuring the process *stays* near $\mu$ eventually. ## 23.15 Illustration of the SLLN Simulations are often used to illustrate the convergence described by the SLLN. For example, when simulating i.i.d. variables taking values $\{0, 1, 2, 3, 4\}$ with specified probabilities, the sample mean $\frac{\sum X_i}{n}$ is plotted against $n$. As $n$ increases from 100 to 10,000, the sample mean is observed to stabilize closer to the theoretical mean. If the theoretical mean is 2.05, a sample mean of 1.89 might be observed for $n=100$, but this value tightens around 2.05 as $n$ grows. > **Example:** In a simulation where outcomes $0, 1, 2, 3, 4$ have probabilities $P_0=0.1, P_1=0.2, P_2=0.3, P_3=0.35, P_4=0.05$, the theoretical mean is calculated as $2.05$. As $n$ increases, the sample mean converges to this value with probability 1 [417](#page=417). # 24. Advanced expectation properties, limit theorems, and additional topics (part 7) This final section summarizes advanced bounding inequalities, the error bound for Poisson approximation of the Binomial distribution, and introduces fundamental concepts of the Poisson Process and Markov Chains covered in the latter parts of Chapters 8 and 9. ## 24.1 One-sided Chebyshev inequality and bounding methods (Chapter 8.5) When only the mean $\mu = E[X]$ and variance $\sigma^2 = \text{Var}(X)$ are known, we can find tighter bounds than those provided by standard Chebyshev's inequality for one-sided events. **One-sided Chebyshev Inequality (Proposition 5.1)** If $X$ is a random variable with mean $0$ and finite variance $\sigma^2$, then for any $a > 0$: $$P\{X \ge a\} \le \frac{\sigma^2}{\sigma^2 + a^2}$$ [418](#page=418). This bound is derived by applying Markov's inequality to $(X+b)^2$ where $b = \sigma^2/a$ minimizes the resulting bound expression: $$P\{X \ge a\} \le \frac{E[(X+b)^2]}{(a+b)^2} = \frac{\text{Var}(X) + b^2}{(a+b)^2} = \frac{\sigma^2 + b^2}{(a+b)^2} \text{ when } E[X]=0 \text{ }$$ [419](#page=419). If $X$ has mean $\mu$ and variance $\sigma^2$, we apply this to $X - \mu$ and $\mu - X$: $$P\{X \ge \mu + a\} \le \frac{\sigma^2}{\sigma^2 + a^2} \quad \text{and} \quad P\{X \le \mu - a\} \le \frac{\sigma^2}{\sigma^2 + a^2} \text{ for } a > 0 \text{ }$$. > **Example:** If production $X$ has $E[X]=100$ and $\text{Var}(X)=400$, the bound for $P\{X \ge 120\}$ (where $a=20$) is: $$P\{X \ge 120\} = P\{X - 100 \ge 20\} \le \frac{400}{400 + ^2} = \frac{400}{800} = \frac{1}{2} \text{ }$$ [20](#page=20). This is tighter than the bound obtained using Markov's inequality alone, which was $E[X]/120 = 100/120 = 5/6$ [420](#page=420). ## 24.2 Chernoff bounds using Moment Generating Functions (MGFs) When the MGF, $M(t) = E[e^{tX}]$, is known, Chernoff bounds provide potentially tighter limits for one-sided tail probabilities [421](#page=421). **Chernoff Bounds (Proposition 5.2)** For a random variable $X$ with known MGF $M(t)$: $$P\{X \ge a\} \le e^{-ta}M(t) \quad \text{for all } t > 0$$ $$P\{X \le a\} \le e^{-ta}M(t) \quad \text{for all } t < 0$$. The best bound is found by minimizing the expression $e^{-ta}M(t)$ over the relevant range of $t$. > **Example (Standard Normal Z):** If $Z \sim N(0, 1)$, $M(t) = e^{t^2/2}$. Minimizing $e^{-ta}e^{t^2/2}$ for $t>0$ yields $t=a$. $$P\{Z \ge a\} \le e^{-a^2/2} \quad \text{for } a > 0 \text{ }$$ [422](#page=422). ## 24.3 Jensen's Inequality and Convexity Jensen's inequality relates the expectation of a function of a random variable to the function of its expectation, based on the function's convexity or concavity. **Definition:** A twice-differentiable function $f(x)$ is **convex** if $f''(x) \ge 0$ for all $x$; it is **concave** if $f''(x) \le 0$. **Jensen's Inequality (Proposition 5.3):** If $f(x)$ is a convex function, then: $$E[f(X)] \ge f(E[X])$$ If $f(x)$ is concave, the inequality is reversed: $E[f(X)] \le f(E[X])$. > **Application in Finance:** If an investor's utility function $u(R)$ is concave, Jensen's inequality implies $E[u(X)] \le u(m)$ (where $m$ is the mean return), indicating that the risk-free venture (return $m$) is preferable over the risky one (return $X$) [424](#page=424). ## 24.4 Bounding Poisson approximation error (Chapter 8.6) This section bounds the error when approximating the sum of independent Bernoulli random variables ($X$) by a Poisson random variable ($Y$) having the same mean $\lambda = \sum p_i$ [425](#page=425). If $X = \sum_{i=1}^n X_i$ (Bernoulli with parameters $p_i$) and $Y = \sum_{i=1}^n Y_i$ (Poisson with means $p_i$), and if we can construct $X_i$ and $Y_i$ such that $P\{X_i \ne Y_i\} \le p_i^2$, then the total error bound is: $$|P\{X \in A\} - P\{Y \in A\}| \le P\{X \ne Y\} \le \sum_{i=1}^n p_i^2 \text{ }$$ [426](#page=426). If all $p_i = p$, then $X$ is Binomial $(n, p)$, and the bound becomes: $$\left| P\left\{\sum_{i=1}^n X_i \in A\right\} - P\left\{\text{Poisson}(\lambda) \in A\right\} \right| \le np^2 \text{ where } \lambda = np \text{ }$$. ## 24.5 Summary of Key Limit Theorems (Chapter 8 Context) The two most crucial theoretical results concerning sequences of i.i.d. random variables are the CLT and the SLLN. 1. **Central Limit Theorem (CLT):** If $E[X_i = \mu$ and $\text{Var}(X_i) = \sigma^2$ are finite, then for large $n$: $$\lim_{n\to\infty} P\left\{ \frac{\sum_{i=1}^n X_i - n\mu}{\sigma\sqrt{n}} \le a \right\} = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{a} e^{-x^2/2} dx$$ The sum is approximately normal $N(n\mu, n\sigma^2)$. 2. **Strong Law of Large Numbers (SLLN):** If $E[X_i = \mu$ is finite, then the sample average converges to $\mu$ with probability 1: $$\frac{1}{n}\sum_{i=1}^n X_i \xrightarrow{P=1} \mu \quad \text{as } n \to \infty$$ This provides the theoretical justification for the long-run relative frequency interpretation of probability [427](#page=427). ## 24.6 The Poisson Process (Chapter 9.1) A **Poisson process** with rate $\lambda > 0$, denoted $\{N(t), t \ge 0\}$, counts the number of events occurring in time $[0, t]$ and satisfies five conditions [432](#page=432): 1. $N = 0$ . 2. **Independent Increments:** The number of events in disjoint time intervals are independent. 3. **Stationary Increments:** The distribution of $N(t+s) - N(t)$ depends only on the length $s$, not $t$. 4. $P\{N(h) = 1\} = \lambda h + o(h)$. 5. $P\{N(h) \ge 2\} = o(h)$. These conditions imply that $N(t)$ follows a Poisson distribution with mean $\lambda t$: $$P\{N(t) = n\} = e^{-\lambda t} \frac{(\lambda t)^n}{n!} \text{ }$$. The interarrival times, $T_n$ (time elapsed between $(n-1)$-th and $n$-th event), are independent exponential random variables, each with mean $1/\lambda$ [433](#page=433). The arrival time of the $n$-th event, $S_n = \sum_{i=1}^n T_i$, follows a Gamma distribution with parameters $n$ and $\lambda$. ## 24.7 Markov Chains (Chapter 9.2) A sequence of random variables $X_0, X_1, \ldots$ whose state space is $\{0, 1, \ldots, M\}$ forms a **Markov chain** if the future state depends only on the present state, not on the sequence of events that preceded it (the Markov property) [434](#page=434). This final segment summarizes key aspects of Markov Chains, focusing on transition probabilities, multi-stage transitions, the Chapman-Kolmogorov equations, and an example of a random walk, primarily covering concepts from Chapter 9. ## 24.8 Definition and transition probabilities of Markov Chains A stochastic process $\{X_n, n \ge 0\}$ is a Markov chain if the future state depends only on the present state, independent of the past history. Formally, for any time points $n$ and states $i, j, i_0, \ldots, i_{n-1}$: $$P\{X_{n+1} = j|X_n = i, X_{n-1} = i_{n-1}, \ldots, X_1 = i_1, X_0 = i_0\}= P_{ij}$$ The values $P_{ij}$ are the transition probabilities. They must satisfy: 1. $P_{ij} \ge 0$ for all $i, j$. 2. $\sum_{j=0}^{M} P_{ij} = 1$ for all states $i$. These probabilities are conveniently arranged in a square array called the **transition probability matrix** $P$: $$P = \begin{pmatrix} P_{00} & P_{01} & \cdots & P_{0M} \\ P_{10} & P_{11} & \cdots & P_{1M} \\ \vdots & \vdots & \ddots & \vdots \\ P_{M0} & P_{M1} & \cdots & P_{MM} \end{pmatrix}$$ Given $P$ and the distribution of $X_0$, the joint probability mass function of the states from time 0 to $n$ can be computed: $$P\{X_n = i_n, X_{n-1} = i_{n-1}, \ldots, X_1 = i_1, X_0 = i_0\} = P_{i_{n-1}, i_n} P_{i_{n-2}, i_{n-1}} \cdots P_{i_1, i_2} P_{i_0, i_1} P\{X_0 = i_0\}$$ > **Example:** In a weather model, if state 0 is rain and state 1 is no rain, and rain tomorrow occurs with probability $\alpha$ if it rains today, and probability $\beta$ if it does not rain today, the transition matrix is: > $$P = \begin{pmatrix} \alpha & 1 - \alpha \\ \beta & 1 - \beta \end{pmatrix}$$ > where $P_{00} = \alpha$ and $P_{10} = \beta$ [435](#page=435). > **Example:** The gambler's ruin problem where the gambler stops at fortune 0 or $M$ forms a Markov chain. The transitions are $P_{i, i+1} = p$ and $P_{i, i-1} = 1-p$ for $1 \le i \le M-1$, with $P_{00} = P_{MM} = 1$. ## 24.9 Multi-stage transition probabilities The $n$-stage transition probability, $P^{(n)}_{ij}$, is defined as the probability that a system in state $i$ at time $m$ will be in state $j$ at time $m+n$: $$P^{(n)}_{ij} = P\{X_{n+m} = j|X_m = i\}$$ The two-stage transition probability $P^{ }_{ij}$ is calculated by summing over all intermediate states $k$: $$P^{ }_{ij} = \sum_{k=0}^{M} P_{kj} P_{ik}$$ [2](#page=2). This reflects the process going from $i \to k$ in one step, and then $k \to j$ in the second step. ## 24.10 The Chapman–Kolmogorov equations The general relationship between $n$-stage transition probabilities is given by the Chapman–Kolmogorov equations, which generalize the two-stage calculation. **Proposition 2.1. The Chapman–Kolmogorov equations** $$P^{(n)}_{ij} = \sum_{k=0}^{M} P^{(r)}_{ik} P^{(n-r)}_{kj} \quad \text{for all } 0 < r < n$$ The proof relies on conditioning on the state $X_r=k$ at time $r$: $$P^{(n)}_{ij} = P\{X_n = j|X_0 = i\} = \sum_{k} P\{X_n = j, X_r = k|X_0 = i\}$$ Using the Markov property and definition of multi-stage probabilities: $$P^{(n)}_{ij} = \sum_{k} P\{X_n = j|X_r = k, X_0 = i\}P\{X_r = k|X_0 = i\} = \sum_{k} P^{(n-r)}_{kj} P^{(r)}_{ik}$$ [436](#page=436). > **Tip:** The Chapman-Kolmogorov equations demonstrate that matrix multiplication of transition probabilities yields multi-stage transition probabilities. If $P$ is the transition matrix, then $P^{(n)} = P^n$ (matrix exponentiation). ## 24.11 Application to the Random Walk A one-dimensional random walk provides an example of a Markov chain with a countably infinite state space $\{0, \pm 1, \pm 2, \ldots\}$. If the particle moves right with probability $p$ and left with probability $1-p$, the transitions are: $$P_{i, i+1} = p, \quad P_{i, i-1} = 1-p, \quad P_{ij} = 0 \text{ if } |i-j| > 1$$. For this chain, the $n$-step probability $P^{(n)}_{ij}$ (where $j$ is the position after $n$ steps starting from $i$) is derived from the binomial probability of having the correct number of right steps. If $r$ steps are to the right, then $n-r$ steps are to the left. The net displacement is $r - (n-r) = 2r - n = j - i$, so the number of right steps required is $r = (n + j - i)/2$. $$P^{(n)}_{ij} = \begin{cases} \binom{n}{(n - i + j)/2} p^{(n-i+j)/2} (1 - p)^{(n+i-j)/2} & \text{if } (n-i+j)/2 \text{ is a non-negative integer } \le n \\ 0 & \text{otherwise} \end{cases}$$. Specific formulas for even and odd $n$: If $n=2m$ (even): Let $j = i + 2k$. The number of steps right is $m+k$. $$P^{(2m)}_{i,i+2k} = \binom{2m}{m+k} p^{m+k} (1 - p)^{m-k}, \quad k = 0, \pm 1, \ldots, \pm m$$ If $n=2m+1$ (odd): Let $j = i + 2k + 1$. The number of steps right is $m+k+1$. $$P^{(2m+1)}_{i,i+2k+1} = \binom{2m+1}{m+k+1} p^{m+k+1} (1 - p)^{m-k}, \quad k = 0, \pm 1, \ldots, \pm (m+1) \text{ and } k = -1, \ldots, -m$$. ## 24.12 Unconditional probabilities and convergence The multi-stage transition probabilities, being conditional, can be used to find unconditional probabilities by conditioning on the initial state $X_0$: $$P\{X_n = j\} = \sum_{i} P\{X_n = j|X_0 = i\}P\{X_0 = i\} = \sum_{i} P^{(n)}_{ij} P\{X_0 = i\}$$ For many Markov chains, as $n \to \infty$, the $n$-stage transition probability $P^{(n)}_{ij}$ converges to a limiting value $\pi_j$ that depends only on the destination state $j$, regardless of the starting state $i$. $$\lim_{n \to \infty} P^{(n)}_{ij} = \pi_j$$ [437](#page=437). # 25. Simulation Methods This chapter introduces simulation techniques used to generate random variables from continuous and discrete distributions, followed by methods for variance reduction and generating random permutations. ## 25.1 Introduction to simulation Simulation is an experimental technique in probability and applied science used to empirically determine probabilities or expected values by simulating a large number of trials, often using computers. If $X_i$ is an indicator variable for success in the $i$-th trial, where $E[X_i = P\{\text{success}\}$, the strong law of large numbers dictates that the sample mean converges to the true probability: $$\frac{1}{n}\sum_{i=1}^{n} X_i \to P\{\text{success}\} \quad \text{as } n \to \infty$$ This proportion of successes over $n$ trials serves as an estimate for the probability of winning, for example, in a complex game like solitaire where analytical calculation might be intractable. ## 25.2 General techniques for simulating continuous random variables The generation of random variables from continuous distributions often relies on the cumulative distribution function (CDF) technique, which is detailed further in the subsequent sections of the chapter (though specific methods are not fully enumerated on the provided pages, the section heading implies their coverage). ## 25.3 Simulating from discrete distributions This section covers the techniques necessary for generating random variables that follow discrete probability distributions. ## 25.4 Variance reduction techniques Variance reduction methods are employed in simulations to decrease the variability of the resulting estimate, leading to more accurate results with fewer simulated trials. > **Tip:** While the provided pages introduce the concept of simulation and list the planned topics, detailed formulas and specific simulation algorithms (like Inverse Transform or Acceptance-Rejection) for continuous and discrete variables, or the specific techniques for generating random permutations, are covered later within Chapter 10, as indicated by the section headings [10](#page=10). This section covers foundational techniques used in simulation studies, including the generation of uniform random numbers, methods for generating random permutations, and general techniques for simulating continuous random variables using the inverse transformation method. ## 25.5 Generating Uniform Random Numbers To initiate a simulation study, the computer must generate values from a uniform (0, 1) random variable, referred to as **random numbers**. Computers typically use a built-in subroutine called a random-number generator, which produces a sequence of pseudorandom numbers that approximate independent samples from the uniform (0, 1) distribution. The generation process often starts with an initial value $X_0$, known as the **seed**. Subsequent values $X_{n+1}$ are recursively computed using positive integers $a$, $c$, and modulus $m$ via the linear congruential formula: $$X_{n+1} = (aX_n + c) \pmod{m}, \quad n \ge 0 \quad (1.1)$$ This calculation takes the remainder when $aX_n + c$ is divided by $m$. Each resulting $X_n$ is an integer between $0$ and $m-1$, and $X_n/m$ approximates a uniform (0, 1) random variable. Suitable choices for $a$, $c$, and $m$ ensure the sequence appears to be generated from independent uniform (0, 1) random variables. > **Tip:** In the context of simulation starting points, we assume the ability to simulate from the uniform (0, 1) distribution and use the term "random numbers" to denote independent variables from this distribution. ## 25.6 Generating Random Permutations When the initial state of a simulation requires that an initial ordering (like a deck of cards) is equally likely to be any of the possible permutations, a method to generate a random permutation using only random numbers is necessary. One efficient algorithm achieves this in $n-1$ steps by performing interchanges at each step. ### Algorithm for Generating a Random Permutation The process involves tracking the permutation $X(i)$, where $i=1, \ldots, n$ denotes the position, and iteratively fixing the element in the last remaining position. 1. **Initialization:** Start with any arbitrary permutation, e.g., $X(i) = i$ for $i=1, \ldots, n$. Let $I=n$. 2. **Random Index Generation:** Generate a random number $U \sim \text{Uniform}(0, 1)$, and set the random index $N = \lfloor IU \rfloor + 1$. This ensures $N$ is equally likely to be any integer from $1$ to $I$. 3. **Interchange:** Interchange the values of $X(N)$ and $X(I)$. The element in position $I$ is now fixed. 4. **Iteration:** Decrease $I$ by 1. If $I > 1$, return to Step 3. 5. **Completion:** Once $I=1$, the resulting sequence $X \ldots, X(n)$ is the desired random permutation. > **Example:** Generating an index $N_k$ uniformly distributed over $\{1, 2, \ldots, k\}$ from a random number $U$ is done via $N_k = \lfloor kU \rfloor + 1$, where $\lfloor x \rfloor$ is the integer part of $x$. ### Application in Experimental Design This algorithm is crucial for eliminating bias in assigning subjects to treatment groups in experiments. If $n$ subjects are divided into $m$ groups of sizes $n_1, n_2, \ldots, n_m$ (where $\sum n_i = n$), subjects can be randomly assigned by: 1. Numbering subjects 1 through $n$. 2. Generating a random permutation $X \ldots, X(n)$. 3. Assigning subjects $X X \ldots, X(n_1)$ to group 1 [1](#page=1) [2](#page=2). 4. Assigning subjects $X(n_1 + 1), \ldots, X(n_1 + n_2)$ to group 2, and so on [455](#page=455). ## 25.7 General Techniques for Simulating Continuous Random Variables Two general methods exist for simulating random variables from continuous distributions using uniform random numbers. ## 25.8 The Inverse Transformation Method The inverse transformation method relies on a proposition concerning the relationship between a uniform random variable and a cumulative distribution function (CDF). **Proposition:** If $U$ is a uniform (0, 1) random variable, and $F$ is any continuous distribution function, then the random variable $Y$ defined by $Y = F^{-1}(U)$ has the distribution function $F$. Here, $F^{-1}(x)$ is defined as the value $y$ such that $F(y) = x$. The proof shows that for any value $a$: $$F_Y(a) = P\{Y \le a\} = P\{F^{-1}(U) \le a\}$$ Since $F(x)$ is a monotone function, $F^{-1}(U) \le a$ is equivalent to $U \le F(a)$. Therefore: $$F_Y(a) = P\{U \le F(a)\} = F(a)$$ Thus, to simulate a random variable $X$ with CDF $F$, one generates a random number $U$ and sets $X = F^{-1}(U)$. > **Example:** Simulating an exponential random variable with mean 1. > If the CDF is $F(x) = 1 - e^{-x}$, then the inverse function is found by solving $1 - e^{-x} = u$ for $x$: > $$x = -\log(1 - u)$$ > Therefore, $X = -\log(1 - U)$ is exponentially distributed with mean 1. Since $1-U$ is also uniform on (0, 1), $-\log U$ also follows this distribution. > Furthermore, if $X$ is exponential with mean 1, then $cX$ is exponential with mean $c$. Thus, $-c \log U$ is exponential with mean $c$. ## 25.9 Simulating Gamma Random Variables The results from simulating the exponential distribution can be extended to simulate other distributions, such as the Gamma distribution. To simulate a $\text{Gamma}(n, \lambda)$ random variable where $n$ is an integer, one uses the property that the sum of $n$ independent exponential random variables, each with rate $\lambda$, follows this distribution. If $U_1, \ldots, U_n$ are independent uniform (0, 1) random variables, the required Gamma random variable can be constructed using the exponential simulation technique [456](#page=456). # 26. Simulation Details and Variance Reduction (part 1) This section details specific simulation techniques for generating random variables, including the rejection method and polar method, and introduces three primary variance reduction techniques: antithetic variables, variance reduction by conditioning, and control variates. ## 26.1 Simulating Continuous Random Variables: Rejection Method The rejection method is a general technique used to simulate a random variable $X$ with a target density function $f(x)$, given an efficient method to simulate a variable $Y$ with density $g(x)$. **The Rejection Method Procedure:** 1. Simulate $Y$ having density $g(x)$, and simulate a uniform random number $U \sim \text{Uniform}(0, 1)$. 2. Check the condition: If $U \le \frac{f(Y)}{c g(Y)}$, set $X = Y$. 3. Otherwise (if the condition is false), return to Step 1. The constant $c$ must satisfy $f(y) / g(y) \le c$ for all $y$. **Proof and Properties:** The random variable $X$ generated has the desired density $f(x)$. The probability of accepting the simulated value $Y$ in any iteration is $K = P\{U \le f(Y) / cg(Y)\} = 1/c$ [457](#page=457). * The number of iterations required follows a geometric distribution with mean $c$. > **Tip:** The efficiency of the rejection method depends heavily on choosing a bounding function $g(x)$ such that the constant $c$ (the ratio $\max(f(x)/g(x))$) is close to 1. ## 26.2 Example: Simulating a Unit Normal Random Variable (Rejection Method) To simulate $Z \sim N(0, 1)$, we can use the rejection method where the target density $f(x)$ (for $|Z|$) is the half-normal density: $$f(x) = \sqrt{\frac{2}{\pi}} e^{-x^2/2}, \quad 0 < x < \infty$$ The proposal density $g(x)$ used is the exponential density with mean 1 ($\lambda=1$): $$g(x) = e^{-x}, \quad 0 < x < \infty$$ The ratio $\frac{f(x)}{g(x)}$ is maximized at $c = \sqrt{2e/\pi} \approx 1.32$ [458](#page=458). The acceptance condition $U \le \frac{f(Y)}{cg(Y)}$ simplifies to $U \le \exp\left\{-\frac{(Y - 1)^2}{2}\right\}$. An optimized algorithm leveraging the memoryless property of the exponential distribution allows generating an independent exponential random variable (rate 1) alongside the unit normal variable $Z$ [459](#page=459). ## 26.3 Example: Simulating a Unit Normal Random Variable (Polar Method) The polar method (or Box-Muller transformation) generates a pair of independent standard normals $(X, Y)$ by using uniform variables within a disk: 1. Generate $U_1, U_2 \sim \text{Uniform}(0, 1)$. 2. Set $V_1 = 2U_1 - 1$ and $V_2 = 2U_2 - 1$. The pair $(V_1, V_2)$ is uniform in the square $[-1, 1 \times [-1, 1]$. 3. Calculate $S = V_1^2 + V_2^2$. 4. If $S > 1$, reject the pair and return to Step 1 (this is a rejection step, as the points must fall inside the unit circle). 5. If $S \le 1$, the independent unit normals are: $$X = \sqrt{\frac{-2 \log S}{S}} V_1, \quad Y = \sqrt{\frac{-2 \log S}{S}} V_2$$ This method requires an average of $4/\pi \approx 1.273$ pairs of $(V_1, V_2)$ iterations to generate two independent unit normals [461](#page=461). ## 26.4 Simulating from Discrete Distributions The discrete analog to the inverse transform technique involves using cumulative probabilities: To simulate $X$ with PMF $P\{X = x_j\} = P_j$, generate $U \sim \text{Uniform}(0, 1)$ and set $X$ to $x_j$ if the cumulative probability falls within the correct range: $$x_j \text{ if } \sum_{i=1}^{j-1} P_i < U \le \sum_{i=1}^{j} P_i$$ [462](#page=462). ## 26.5 Example: Geometric Distribution For a geometric distribution $P\{X = i\} = (1-p)^{i-1}p$, the simulation can be simplified using logarithms: $$X = 1 + \left\lfloor \frac{\log U}{\log(1 - p)} \right\rfloor$$ where $U \sim \text{Uniform}(0, 1)$ [463](#page=463). ## 26.6 Example: Poisson Distribution To simulate $X \sim \text{Poisson}(\lambda)$, generate independent $U_i \sim \text{Uniform}(0, 1)$ and stop at $N$: $$N = \min \left\{ n: \prod_{i=1}^{n} U_i < e^{-\lambda} \right\}$$ The desired random variable is $X = N - 1$. This is equivalent to summing independent exponential random variables (rate 1) until their sum exceeds $\lambda$ [464](#page=464). ## 26.7 Variance Reduction Techniques Overview When estimating $\theta = E[g(X_1, \ldots, X_n)]$ via simulation, the resulting sample mean $\bar{Y}$ has variance $\text{Var}(\bar{Y}) = \text{Var}(Y_i)/k$. Variance reduction techniques aim to obtain the same precision with fewer samples, or better precision with the same number of samples, by generating $Y_i$'s that are negatively correlated or have smaller overall variance. ## 26.8 Use of Antithetic Variables This technique seeks to pair generated estimates to induce negative correlation, thereby reducing the variance of the average. If $Y_1$ is generated using random numbers $U_1, \ldots, U_n$, the antithetic variable $Y_2$ is generated using the complements $1-U_1, \ldots, 1-U_n$: $$Y_1 = g(F_1^{-1}(U_1), \ldots, F_n^{-1}(U_n))$$ $$Y_2 = g(F_1^{-1}(1 - U_1), \ldots, F_n^{-1}(1 - U_n))$$ If $Y_1$ and $Y_2$ are negatively correlated, $\text{Var}\left(\frac{Y_1 + Y_2}{2}\right) = \frac{\text{Var}(Y_1)}{2} + \frac{\text{Cov}(Y_1, Y_2)}{2} < \text{Var}(Y_1)$. This negative correlation is guaranteed if the function $g$ is monotonic [465](#page=465). ## 26.9 Variance Reduction by Conditioning The conditional variance formula is key: $$\text{Var}(Y) = E[\text{Var}(Y|Z)] + \text{Var}(E[Y|Z])$$ Since $\text{Var}(Y|Z) \ge 0$, it follows that $\text{Var}(E[Y|Z]) \le \text{Var}(Y)$. If we can calculate the conditional expectation $E[Y|Z]$, then $E[Y|Z]$ is a better estimator of $E[Y]$ than $Y$ itself, as it eliminates the variance component attributable to $\text{Var}(Y|Z)$. > **Example:** Estimating $\pi$ using the ratio of areas (Circle Area / Square Area = $\pi/4$). If $I$ is the indicator that $(V_1, V_2)$ falls in the circle, $\bar{I}$ estimates $\pi/4$. Conditioning on $V_1$ yields a better estimator $E[I|V_1 = \sqrt{1 - V_1^2}$ Using $\frac{1}{n}\sum_{j=1}^n \sqrt{1 - U_j^2}$ (where $U_j$ is uniform on $(0, 1)$) estimates $\pi/4$ with variance equal to the original indicator method, but applying antithetic variables to this improved estimator further reduces variance [466](#page=466). ## 26.10 Control Variates This technique utilizes a related variable $f(X)$ whose expected value $E[f(X)] = \mu$ is known. We estimate $\theta = E[g(X)]$ using the estimator $W$: $$W = g(X) + a[f(X) - \mu]$$ The variance of $W$ is minimized when the constant $a$ is chosen as: $$a = - \frac{\text{Cov}[f(X), g(X)]}{\text{Var}[f(X)]}$$ The minimum variance achieved is: $$\text{Var}(W)_{\min} = \text{Var}[g(X)] - \frac{[\text{Cov}[f(X), g(X)]]^2}{\text{Var}[f(X)]}$$ [467](#page=467). > **Note:** Since $\text{Var}[f(X)]$ and $\text{Cov}[f(X), g(X)]$ are usually unknown, they must be estimated from the simulation data, which typically recovers most of the theoretical variance reduction [468](#page=468). This section initiates the detailed examination of specific variance reduction techniques used in Monte Carlo simulation, focusing on the antithetic variables method, variance reduction through conditioning, and the control variates method. ## 26.11 Antithetic variables method The antithetic variables method is a variance reduction technique designed to reduce the variance of a Monte Carlo estimator by exploiting the correlation between pairs of random variables generated during the simulation. The core idea involves generating pairs of random numbers, $U$ and $U'$, such that they are negatively correlated. If $U$ is a uniform random number on $(0, 1)$, its antithetic counterpart is typically chosen as $U' = 1 - U$. If the function being simulated, $g(u)$, is monotonic (either increasing or decreasing), then using $U$ and $1-U$ results in negatively correlated estimates of the integral or expected value. Suppose we are estimating the expected value $I = E[g(U)]$ using $n$ pairs of antithetic variables $(U_i, U'_i)$, where $U_i \sim U(0, 1)$ and $U'_i = 1 - U_i$. The simulation generates two estimators, $X_i = g(U_i)$ and $X'_i = g(U'_i)$. The overall estimate $\bar{X}_n$ is the average of the means of these pairs: $$\bar{X}_n = \frac{1}{2n} \sum_{i=1}^{n} [g(U_i) + g(1 - U_i)]$$ The expected value of the average of the pair is: $$E\left[\frac{g(U_i) + g(1 - U_i)}{2}\right = \frac{E[g(U_i)] + E[g(1 - U_i)]}{2}$$ If $U_i$ and $1-U_i$ are identically distributed (which they are, both being uniform on $(0, 1)$), then $E[g(U_i)] = E[g(1 - U_i)] = I$. Thus, $E[\bar{X}_n = I$. The variance of the estimate from a single pair, $V\left[\frac{X_i + X'_i}{2}\right]$, is reduced compared to using two independent variables if $\text{Cov}(X_i, X'_i) < 0$. Since $X_i = g(U_i)$ and $X'_i = g(1-U_i)$, the reduction occurs when $g$ is monotonic. If $g$ is increasing, as $U_i$ increases, $X_i$ increases, while $U'_i = 1-U_i$ decreases, causing $X'_i$ to decrease, leading to negative covariance. > **Tip:** The antithetic variables technique is most effective when the function $g$ defining the estimator is monotonic with respect to the input random variable $U$. If $g$ is not monotonic, the correlation might be positive, increasing the variance instead of reducing it. ## 26.12 Variance reduction by conditioning Variance reduction through conditioning exploits the law of total expectation, $E[X = E[E[X|Y]]$, by choosing a random variable $Y$ such that $E[X|Y]$ is a better estimator of $E[X]$ than $X$ itself. If $X$ is the original estimator, and we condition it on some ancillary information $Y$ (a random variable whose value is known during the simulation run, but whose expectation is known without simulation), the new estimator is $X^* = E[X|Y]$. The key properties are: 1. $E[X^*] = E[E[X|Y]] = E[X = I$, so the estimator remains unbiased. 2. $V[X^*] = V[E[X|Y]]$. Since the variance of a random variable is always non-negative, $V[X^*] \le V[X]$. The variance is reduced whenever $Y$ contains information about $X$, making $V[E[X|Y]] < V[X]$. A common application is using control variates, which is a special case of conditioning, discussed next. Another illustrative example is estimating the expected value of a random variable $X$ that depends on a standard uniform variable $U$. If we simulate $U$ and then use a known, simpler function $h(U)$ such that $X = h(U) + \epsilon$ where $E[\epsilon|U]=0$, we could potentially use $h(U)$ as a control variate, which is equivalent to conditioning on $U$ if $X$ is linearly dependent on $U$. ## 26.13 Control variates method The control variates method uses an auxiliary random variable, the control variate $W$, whose expected value $E[W]$ is known, to reduce the variance of the primary estimator $X$ for $I = E[X]$. This method is mathematically equivalent to variance reduction by conditioning on $W$, specifically using the estimator $X^* = X - \beta(W - E[W])$, where $\beta$ is chosen optimally. If we have a pair of random variables $(X_i, W_i)$ generated together in the simulation, we estimate $I$ using a linear combination: $$X^* = X + c(W - E[W])$$ Since $E[W]$ is known, the expected value of the new estimator is: $$E[X^*] = E[X + c(E[W - E[W]) = E[X = I$$ The variance of $X^*$ is: $$V[X^*] = V[X + c(W - E[W])] = V[X + c^2 V[W + 2c \text{Cov}(X, W)$$ To find the optimal constant $c$ that minimizes $V[X^*]$, we take the derivative with respect to $c$ and set it to zero: $$\frac{d V[X^*]}{dc} = 2c V[W + 2 \text{Cov}(X, W) = 0$$ Solving for $c$ yields the optimal coefficient, $\beta$: $$\beta = -\frac{\text{Cov}(X, W)}{V[W]}$$ Substituting this optimal $\beta$ back into the estimator yields the final optimized control variate estimator $X_{CV}$: $$X_{CV} = X - \beta (W - E[W]) = X + \frac{\text{Cov}(X, W)}{V[W]} (W - E[W])$$ $$V_{\min}[X_{CV}] = V[X - \frac{[\text{Cov}(X, W)]^2}{V[W]}$$ For variance reduction to occur, we require $\text{Cov}(X, W) \neq 0$, meaning $X$ and $W$ must be correlated. > **Example:** To estimate the expected value of a standard normal random variable $X \sim N(0, 1)$, we know $I = E[X = 0$. If we simulate $X$ using $U \sim U(0, 1)$ such that $X = \Phi^{-1}(U)$, where $\Phi^{-1}$ is the inverse CDF of the standard normal distribution, we can use $W = U$ as the control variate, since $E[W = E[U = 0.5$. The covariance term $\text{Cov}(\Phi^{-1}(U), U)$ will be non-zero, allowing for variance reduction. If $X$ itself is used as the control variate, $W=X$, then $\text{Cov}(X, W) = V[X]$, and $V_{\min}[X_{CV}] = V[X - V[X]^2/V[X = 0$, which is expected since $X^* = X - 1 \cdot (X - E[X]) = E[X]$. # 27. Simulation Details and Variance Reduction (part 2) This section concludes the main content chapters by detailing specific variance reduction techniques, namely the antithetic variables method, variance reduction by conditioning, and the use of control variates. ## 27.1 Variance Reduction via Antithetic Variables The antithetic variables method is a technique used to reduce the variance of a Monte Carlo estimate by pairing the simulations such that high values are paired with low values, stabilizing the estimate. If $Y = g(U_1, U_2, \dots, U_n)$ is a simulation output where $U_i$ are independent uniform random variables on $ $, we can define its antithetic counterpart $Y^a$ using reversed random variables $U'_i = 1 - U_i$. For a specific function of uniform variables, if $U$ is a uniform random variable on $ $, then $U' = 1 - U$ is also uniformly distributed on $ $. If $Y = g(U_1, \dots, U_n)$ is the estimate generated using $U_1, \dots, U_n$, we define the antithetic estimate $Y^a$ using $U'_1, \dots, U'_n$[1](#page=1): $$Y^a = g(U'_1, \dots, U'_n)$$ The key to this variance reduction technique is that if the function $g$ is **monotone** in each of its arguments, the covariance between $Y$ and $Y^a$ will be non-positive: $$\text{Cov}(Y, Y^a) \le 0$$ If the covariance is negative, then using the average of the standard estimate and its antithetic counterpart yields a new estimator $\bar{Y}_{anti}$ with reduced variance: $$\bar{Y}_{anti} = \frac{Y + Y^a}{2}$$ The variance of this new estimator is: $$\text{Var}(\bar{Y}_{anti}) = \frac{1}{4} \left( \text{Var}(Y) + \text{Var}(Y^a) + 2 \text{Cov}(Y, Y^a) \right)$$ Since $\text{Var}(Y) = \text{Var}(Y^a)$, this simplifies to: $$\text{Var}(\bar{Y}_{anti}) = \frac{1}{2} \text{Var}(Y) + \frac{1}{2} \text{Cov}(Y, Y^a)$$ If $\text{Cov}(Y, Y^a) < 0$, then $\text{Var}(\bar{Y}_{anti}) < \text{Var}(Y)$. > **Tip:** The effectiveness of antithetic variables is highly dependent on the monotonicity of the function being simulated. For functions that are complex or non-monotone with respect to the input random variables, the benefits may be small or nonexistent. ## 27.2 Variance Reduction by Conditioning Variance reduction through conditioning involves replacing a random variable $Y$ with a conditional expectation $E[Y|Z]$, where $Z$ is another random variable that is easier to compute or has a known structure relative to $Y$. If $Y$ is the quantity of interest, and $Z$ is a random variable such that $E[Y|Z]$ is a known function, we define the conditioned estimator $Y_c$: $$Y_c = E[Y|Z]$$ Since $E[Y_c = E[E[Y|Z]] = E[Y]$, the new estimator is unbiased. The variance is reduced because: $$\text{Var}(Y_c) = \text{Var}(E[Y|Z]) \le \text{Var}(Y)$$ The inequality holds because the variance of a conditional expectation is less than or equal to the variance of the original variable. To utilize this method effectively, the choice of $Z$ is crucial: 1. $Z$ must be correlated with $Y$ (positively or negatively). 2. $E[Y|Z]$ must be easy to calculate. A practical application is using the *conditioning on the number of trials* approach when simulating the number of trials needed to achieve a certain outcome (e.g., the Coupon Collector's Problem variant discussed elsewhere in the text). If $X$ is the number of trials needed to collect all $n$ coupons, and $Z$ is the number of distinct coupons collected in the first $k$ trials, then $E[X|Z]$ might be easier to compute than $E[X]$. ## 27.3 Control Variates Method The control variates technique leverages a random variable $W$ that is correlated with the simulation output $Y$, but whose expected value is known, to adjust the estimate of $E[Y]$. Let $Y$ be the simulation output with unknown expected value $\theta = E[Y]$. Let $W$ be a correlated random variable whose expected value $\mu_W = E[W]$ is known. The control variate estimator $\tilde{Y}$ is defined as: $$\tilde{Y} = Y - \beta (W - \mu_W)$$ where $\beta$ is a scaling factor, often chosen to be the covariance coefficient: $$\beta = \frac{\text{Cov}(Y, W)}{\text{Var}(W)}$$ The expected value of the control variate estimator remains unbiased: $$E[\tilde{Y}] = E[Y - \beta (E[W - \mu_W) = \theta - \beta = \theta$$ . The variance of the control variate estimator is: $$\text{Var}(\tilde{Y}) = \text{Var}(Y - \beta W + \beta \mu_W) = \text{Var}(Y + \beta^2 \text{Var}(W) - 2\beta \text{Cov}(Y, W))$$ Substituting the optimal $\beta$: $$\text{Var}(\tilde{Y}) = \text{Var}(Y) - \beta^2 \text{Var}(W)$$ $$\text{Var}(\tilde{Y}) = \text{Var}(Y) - \frac{(\text{Cov}(Y, W))^2}{\text{Var}(W)}$$ Since $\frac{(\text{Cov}(Y, W))^2}{\text{Var}(W)} \ge 0$, this variance reduction is achieved whenever $\text{Cov}(Y, W) \ne 0$. > **Example:** To estimate the expected value of a complex random variable $Y$, one can use a simpler, correlated variable $W$ whose expectation $\mu_W$ is known. For example, if $Y$ is related to the sum of many independent random variables, $W$ could be the sum of $n$ independent variables from a known distribution (like the Normal distribution, if the true distribution is only approximated by Normal) that share some parameters with $Y$'s components. If $Y$ is the outcome of a complex Bernoulli trial, $W$ could be a simpler Bernoulli variable that has the same success probability $p$ as the underlying trials in $Y$. The ratio $\rho^2 = \frac{(\text{Cov}(Y, W))^2}{\text{Var}(Y)\text{Var}(W)}$ (the squared correlation coefficient) dictates the reduction. If $\rho^2$ is close to 1, the variance reduction is substantial. > **Study Note:** For implementing control variates correctly in a simulation study, the optimal $\beta$ should ideally be estimated from pilot runs if it is unknown, although using the true $\beta$ yields the maximum possible variance reduction for that control variate. # 28. Simulation Details and Variance Reduction (part 3) This section concludes the core material on variance reduction techniques by detailing the antithetic variables method, variance reduction via conditioning, and the application of control variates, drawing from self-test problem solutions across several chapters. ## 28.1 Antithetic Variables Method (Context from Problem Solutions) While the theory is not explicitly detailed in the provided solution excerpts, the concept of antithetic variables often relates to pairing random variables such that their covariance is negative, thus reducing the variance of the average estimator. The solutions provided touch upon concepts related to symmetry and conditional probabilities which underpin such variance reduction methods. ## 28.2 Variance Reduction by Conditioning Variance reduction can be achieved by conditioning on a related random variable, provided the conditional expectation simplifies the calculation or reduces the overall variance. ### 28.2.1 Conditioning and Expected Values The general principle involves using the law of total expectation, $E[Y = E[E[Y|X]]$. If $E[Y|X]$ is less variable than $Y$ (or easier to compute), this approach is beneficial. For example, problem 7.2 illustrates the expectation of a count based on sequential dependent draws (white ball followed by black ball from an urn). The expected number of white followed by black ($E[X]$) in $n+m-1$ draws without replacement is calculated by summing the probabilities of the joint event occurring at each step $j$: $$E[X = \sum_{j=1}^{n+m-1} P\{\text{jth is white, (j+1)st is black}\} = \sum_{j=1}^{n+m-1} \frac{n}{n+m} \frac{m}{n+m-1} = \frac{nm}{n+m}$$ [513](#page=513). ### 28.2.2 Conditioning in Sampling Problems In problems involving seating arrangements (Problem 7.3), conditioning is used to find the expected number of married couples seated together at tables: * **Scenario 1 (Partition into groups of fixed size):** If wife $j$ is at a table, the probability her husband is also there is calculated by considering the ways to complete her table of size 3 from the remaining 19 people: $\frac{\binom{18}{2}}{\binom{19}{3}} = \frac{3}{19}$. The expected number of couples seated together is $E[X = \sum E[I_j = 10 \times \frac{3}{19} = \frac{30}{19}$. * **Scenario 2 (Conditionally independent sampling):** If the 2 men at wife $j$'s table are equally likely to be any of the 10 men (a different sampling model), $E[I_j = 2/10$, leading to $E[X = 10 \times \frac{2}{10} = 2$ [514](#page=514). ## 28.3 Control Variates Control variates reduce variance by exploiting the covariance between the variable of interest, $Y$, and an auxiliary variable, $Z$, whose expectation $E[Z]$ is known. The improved estimator for $E[Y]$ is: $$\hat{Y} = Y - c(Z - E[Z])$$ The variance is minimized when $c = \text{Cov}(Y, Z) / \text{Var}(Z)$. ### 28.3.1 Application via Taylor Series Approximation Problem 7.10 illustrates using a control variate approach via Taylor series expansion to approximate $E[\sqrt{X}]$ when $X$ follows a distribution where only moments are easily calculated (e.g., Normal). If $X \sim N(\lambda, \sigma^2)$, the second-order Taylor expansion of $g(x) = \sqrt{x}$ around $\lambda$ is: $$\sqrt{X} \approx \sqrt{\lambda} + \frac{1}{2\lambda^{-1/2}}(X - \lambda) - \frac{1}{8\lambda^{-3/2}}(X - \lambda)^2$$ Taking expectations yields the approximation for $E[\sqrt{X}]$: $$E[\sqrt{X}] \approx \sqrt{\lambda} - \frac{1}{8\lambda^{-3/2}} E[(X - \lambda)^2 = \sqrt{\lambda} - \frac{\lambda}{8\lambda^{-3/2}} = \sqrt{\lambda} - \frac{1}{8\lambda^{-1/2}} = \sqrt{\lambda} - \frac{1}{8\sqrt{\lambda}}$$ [516](#page=516). Here, $X - \lambda$ acts as the deviation from the control point, and the resulting formula implicitly uses knowledge of $\text{Var}(X) = \sigma^2 = \lambda$. ## 28.4 Related Concepts from Problem Solutions ### 28.4.1 Properties of Order Statistics (Normal Distribution) Problem 6.19 deals with order statistics $X_{ }, \dots, X_{(n)}$ from a set of independent and identically distributed (i.i.d.) Normal random variables $X_1, \dots, X_n$, where $X_i \sim N(\mu, \sigma_i^2)$ [1](#page=1). * If $X_i$ are i.i.d. $N(0, 1)$, then $S_k = \sum_{i=1}^k X_i$ and $S_n - S_k = \sum_{i=k+1}^n X_i$ are independent Normal variables with variances $k$ and $n-k$, respectively [511](#page=511). * Given $S_n = x$, the conditional distribution of $S_k$ is Normal: $S_k | S_n = x \sim N\left(\frac{k}{n}x, \frac{k(n-k)}{n}\right)$. ### 28.4.2 Symmetries in Record Values Problem 6.20 examines record values from i.i.d. continuous random variables $X_1, \dots, X_6$. The probability that $X_6$ is the largest among $X_1, \dots, X_5$ given $X_1$ is the maximum of the first five is $1/6$. This highlights how symmetry simplifies probabilities in simulation settings involving ranks [512](#page=512). ### 28.4.3 Conditional Distribution in Sequential Sampling In Problem 7.7, the random variable $X$ representing the position of the first "special" value chosen from $n$ items (where $k$ are special) is shown to be distributed like the smallest value chosen. $$P\{X \ge j\} = \frac{\binom{n-j+1}{k}}{\binom{n}{k}} = \frac{\binom{n-k}{j-1}}{\binom{n}{j-1}}$$. The mean of this position is $\frac{n+1}{k+1}$ [515](#page=515). > **Tip:** When variance reduction techniques rely on known relationships (like covariance or conditional expectation), ensure you can articulate *why* the auxiliary variable or conditioning step simplifies the calculation or reduces variability, often relating back to dependence structures (like negative correlation for antithetic variables or known first/second moments). # 29. Simulation Details and Variance Reduction (part 4) This section covers advanced simulation techniques, focusing on specific methods for reducing estimation variance, including antithetic variables, variance reduction by conditioning, and the use of control variates. ## 29.1 Variance reduction using antithetic variables The antithetic variables method is employed to reduce the variance of Monte Carlo estimates, particularly when dealing with common random numbers. If $Y_1, Y_2, \dots, Y_n$ are independent and identically distributed (i.i.d.) random variables used to form an estimator $\hat{\theta} = \frac{1}{n} \sum_{i=1}^n g(Y_i)$, and $Y_i^*$ is an antithetic counterpart to $Y_i$ such that $Y_i$ and $Y_i^*$ are negatively correlated (ideally perfectly negatively correlated), the variance of the resulting estimator can be reduced. If $Y_i$ and $Y_i^*$ are perfectly negatively correlated, meaning $Y_i^* \stackrel{d}{=} -Y_i$ or $Y_i^* = c - Y_i$ for some constant $c$ in the context of certain simulation setups, the variance reduction is significant. In general, if $Y_i$ and $Y_i^*$ are constructed such that $Cov(g(Y_i), g(Y_i^*)) < 0$, the variance of the averaged estimator decreases. > **Tip:** Antithetic variables are most effective when the function $g(\cdot)$ being averaged is monotonic with respect to the underlying random variables used in the simulation [450](#page=450). ## 29.2 Variance reduction by conditioning Variance reduction can be achieved by conditioning the simulation on a known or easily estimable random variable. If $\hat{\theta}$ is an estimator for $\theta$, and $W$ is a random variable such that $E[\hat{\theta}|W]$ has a smaller variance than $\hat{\theta}$, then using $E[\hat{\theta}|W]$ as the new estimator will reduce variance. The reduction in variance is given by: $$Var(\hat{\theta}) - Var(E[\hat{\theta}|W]) = E[Var(\hat{\theta}|W)] \ge 0$$ A specific application involves conditioning on the number of trials $N$ required for an event to occur. If the simulation involves generating $N$ random variables $X_1, \dots, X_N$, and we want to estimate $\theta = E[g(X_1, \dots, X_N)]$. If $N$ itself is random, we use the law of total variance: $$Var(\hat{\theta}) = E[Var(\hat{\theta}|N)] + Var(E[\hat{\theta}|N])$$ If we use $\hat{\theta}_c = E[\hat{\theta}|N]$ as the estimator, the variance is reduced by $E[Var(\hat{\theta}|N)]$. A general example involves finding the expected gain in a betting scenario conditioned on a coin's true probability $V=p$: $$E[\text{Gain}] = \int_0^1 E[\text{Gain}|V = p dp$$ If we predict heads when $p > 1/2$ and tails otherwise, the conditional expectation is: $$E[\text{Gain}|V = p = \begin{cases} 1(1-p) - 1(p) & \text{if } p \le 1/2 \\ 1(p) - 1(1-p) & \text{if } p > 1/2 \end{cases}$$ Integrating this conditional expectation over $p$ yields the overall expected gain [520](#page=520). ## 29.3 Use of control variates The control variates method reduces variance by exploiting the covariance between the simulation estimate and a known related quantity (the control variate). Suppose we want to estimate $\theta = E[X]$ using the sample mean $\bar{X}_n = \frac{1}{n} \sum X_i$. Let $Y$ be a random variable whose expectation $E[Y = \mu_Y$ is known, and $Cov(X, Y) \neq 0$. The control variate estimator $\hat{\theta}_c$ is defined as: $$\hat{\theta}_c = \bar{X}_n - c(\bar{Y}_n - \mu_Y)$$ where $\bar{Y}_n = \frac{1}{n} \sum Y_i$, and $c$ is a constant, typically chosen to minimize the variance of $\hat{\theta}_c$: $$c = \frac{Cov(X, Y)}{Var(Y)}$$ The variance of the control variate estimator is: $$Var(\hat{\theta}_c) = Var(\bar{X}_n) + c^2 Var(\bar{Y}_n) - 2c Cov(\bar{X}_n, \bar{Y}_n)$$ Assuming $X_i$ and $Y_i$ are i.i.d. pairs: $$Var(\hat{\theta}_c) = \frac{1}{n} Var(X) + \frac{c^2}{n} Var(Y) - \frac{2c}{n} Cov(X, Y)$$ Substituting the optimal $c$: $$Var(\hat{\theta}_c) = \frac{1}{n} \left( Var(X) - \frac{(Cov(X, Y))^2}{Var(Y)} \right)$$ This variance is less than $Var(\bar{X}_n) = \frac{1}{n} Var(X)$ if $Cov(X, Y) \neq 0$. For Bernoulli variables $X$ and $Y$, the covariance is zero if and only if they are independent: $$Cov(X, Y) = P(X=1, Y=1) - P(X=1)P(Y=1)$$ If $Cov(X, Y) = 0$, then $\hat{\theta}_c = \bar{X}_n$, and no variance reduction is gained (or lost) compared to $\bar{X}_n$. In the case of a deck of cards, the number of aces ($X$) and the number of spades ($Y$) are uncorrelated (Cov=0) but not independent, thus control variates based on this pairing would not reduce variance unless based on a truly correlated structure [519](#page=519). > **Example:** To estimate $E[e^{XY}]$ where $X_i, Y_i$ are independent exponentials with mean 1, one could use $XY$ as a control variate because $E[XY = 1$. The improved estimator would look like $\frac{1}{n} \sum_{i=1}^n (e^{X_i Y_i} + c[X_i Y_i - 1])$ [534](#page=534). # 30. Simulation details and variance reduction (part 5) This section covers specific variance reduction techniques used in simulation, namely the antithetic variables method, variance reduction by conditioning, and the application of control variates. ## 30.1 Variance reduction by antithetic variables The antithetic variables method is a technique used to reduce the variance of simulation estimates by introducing negative correlation between pairs of simulated random variables. If $\hat{\theta}$ is the simulation estimator based on a random variable $U$ uniformly distributed on $(0, 1)$, and $Y = g(U)$ is the desired quantity, we can use $U$ and its complement, $U' = 1 - U$, to generate two correlated estimates. If $U$ and $U'$ are both uniformly distributed on $(0, 1)$, then the function $g(U)$ and $g(1-U)$ are negatively correlated, provided $g$ is a monotonic function. If $g$ is increasing, then a large value of $U$ (yielding a large $g(U)$) corresponds to a small value of $1-U$ (yielding a small $g(1-U)$), resulting in negative correlation. The average of the two estimators, $\hat{\theta} = \frac{g(U) + g(1-U)}{2}$, will have a smaller variance than the estimator based on $U$ alone, $\hat{\theta}_1 = g(U)$ [450](#page=450). > **Tip:** This technique is most effective when the function $g$ relating the uniform variable to the desired output is monotonic. ## 30.2 Variance reduction by conditioning Variance reduction can also be achieved by conditioning the expectation calculation on a related random variable. If $Y$ is the desired quantity, and $W$ is a related random variable whose expectation $E[Y|W]$ is known or easy to compute, using $E[Y|W]$ as the estimator instead of $Y$ itself reduces the variance, because $Var[Y = E[Var[Y|W]] + Var[E[Y|W]]$. When using $E[Y|W]$ as the estimator, the variance is $Var[E[Y|W]]$, which is generally smaller than $Var[Y]$ since $Var[Y|W \ge 0$ [451](#page=451). This method is related to the general concept of computing expectations by conditioning, which involves calculating $E[Y = E[E[Y|W]]$ [333](#page=333). ## 30.3 Use of control variates for variance reduction The control variates method is another powerful variance reduction technique. It involves using a related random variable whose expected value is known, to improve the estimate of the expected value of the target variable. Let $\hat{\theta}_1$ be the simulation estimator for $E[Y]$, where $\hat{\theta}_1 = \frac{1}{n} \sum_{i=1}^{n} Y_i$. Let $W_i$ be the values of a control variate, such that $E[W = \mu_W$ is known. We construct a new estimator $\hat{\theta}_c$: $$\hat{\theta}_c = \hat{\theta}_1 - c(\hat{W} - \mu_W)$$ where $\hat{W} = \frac{1}{n} \sum_{i=1}^{n} W_i$ is the sample mean of the control variate, and $c$ is a constant chosen to minimize the variance of $\hat{\theta}_c$. Typically, $c$ is set to the optimal value: $$c = \frac{Cov(Y, W)}{Var(W)}$$ The variance of this new estimator $\hat{\theta}_c$ is smaller than the variance of $\hat{\theta}_1$ if the correlation between $Y$ and $W$ is non-zero [452](#page=452). > **Example:** If we are simulating $E[Y]$, and we know a variable $W$ such that $Y = W + \epsilon$ and $E[\epsilon = 0$, and $E[W]$ is known, then $E[Y = E[W + E[\epsilon = E[W]$. We can estimate $E[Y]$ using $E[W]$ instead of $Y$, or use the formula above with $c=1$. These three techniques—antithetic variables, conditioning, and control variates—form key components of advanced variance reduction strategies in simulation [449](#page=449). ## Common mistakes to avoid - Review all topics thoroughly before exams - Pay attention to formulas and key definitions - Practice with examples provided in each section - Don't memorize without understanding the underlying concepts

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also