Probability & Statistics

← Home  ·  A complete university-style course — one 12–14 minute lesson a day at 08:00, from absolute basics to advanced topics.  ·  Daily derivation track →

Lesson 88 of 118 · Module 6: Estimation

Module 0 — Counting (12/12)

L1. Why probability needs counting

Module 0  2026-08-05  ·  11:26  ·  practice PDF

Practice problems (3)
Problem 1. If you roll a single six-sided die, what is the probability of rolling a number greater than 4?
Reveal solution
  1. Identify the sample space: $S = \{1, 2, 3, 4, 5, 6\}$, so the total number of outcomes is 6.
  2. Identify the successful outcomes: the numbers greater than 4 are 5 and 6, so there are 2 successful outcomes.
  3. Apply the probability ratio: $P = \frac{2}{6}$.

Answer: 1/3

Problem 2. A bag contains 4 red, 5 green, and 11 blue marbles. What is the probability of picking a marble that is NOT blue?
Reveal solution
  1. Calculate the total number of marbles: $4 + 5 + 11 = 20$.
  2. Identify the successful outcomes (not blue): these are the red and green marbles, so $4 + 5 = 9$.
  3. Apply the probability ratio: $P = \frac{9}{20}$.

Answer: 0.45

Problem 3. You flip a fair coin three times. What is the probability of getting exactly two heads?
Reveal solution
  1. List the total sample space: $HHH, HHT, HTH, THH, HTT, THT, TTH, TTT$. There are $2^3 = 8$ outcomes.
  2. Count the outcomes with exactly two heads: $HHT, HTH, THH$. There are 3 such outcomes.
  3. Apply the probability ratio: $P = \frac{3}{8}$.

Answer: 0.375

L2. The multiplication principle

Module 0  2026-08-06  ·  12:13  ·  practice PDF

Practice problems (3)
Problem 1. A restaurant offers a three-course meal. There are $6$ appetizers, $10$ main courses, and $5$ desserts. How many different meal combinations are possible?
Reveal solution
  1. Identify the number of choices for each course: $n_1 = 6$, $n_2 = 10$, $n_3 = 5$.
  2. Apply the multiplication principle: $6 \times 10 \times 5$.
  3. Calculate $6 \times 10 = 60$.
  4. Calculate $60 \times 5 = 300$.

Answer: 300

Problem 2. A license plate consists of two uppercase letters followed by three digits. How many unique license plates can be created if letters and digits can be repeated?
Reveal solution
  1. There are $26$ options for the first letter and $26$ for the second.
  2. There are $10$ options for each of the three digits.
  3. The total number of combinations is $26 \times 26 \times 10 \times 10 \times 10$.
  4. Calculate $26^2 = 676$.
  5. Calculate $676 \times 1000 = 676000$.

Answer: 676000

Problem 3. A computer password must be $5$ characters long. The first character must be a digit ($0-9$), the second must be a lowercase letter ($a-z$), and the remaining three characters can be any digit or lowercase letter. How many such passwords exist?
Reveal solution
  1. Slot 1: $10$ options (digits).
  2. Slot 2: $26$ options (lowercase letters).
  3. Slots 3, 4, and 5: Each has $10 + 26 = 36$ options.
  4. Total = $10 \times 26 \times 36 \times 36 \times 36$.
  5. Calculate $10 \times 26 = 260$.
  6. Calculate $36^3 = 46656$.
  7. Calculate $260 \times 46656 = 12130560$.

Answer: 12130560

L3. Permutations

Module 0  2026-08-07  ·  11:13  ·  practice PDF

Practice problems (3)
Problem 1. How many ways can you arrange 2 letters chosen from a set of 10 distinct letters?
Reveal solution
  1. Identify $n = 10$ and $r = 2$.
  2. Use the permutation formula $P(10, 2) = \frac{10!}{(10-2)!}$.
  3. Simplify to $\frac{10!}{8!} = 10 \times 9$.
  4. Calculate $10 \times 9 = 90$.

Answer: 90

Problem 2. A bookshelf has 6 different novels. In how many different orders can all 6 novels be arranged?
Reveal solution
  1. Since we are arranging all items in the set, $n = 6$ and $r = 6$.
  2. The number of arrangements is $6!$.
  3. Calculate $6 \times 5 \times 4 \times 3 \times 2 \times 1$.
  4. Step by step: $30 \times 4 = 120$, $120 \times 3 = 360$, $360 \times 2 = 720$.

Answer: 720

Problem 3. A competition has 15 participants. How many ways can the first, second, and third place trophies be awarded?
Reveal solution
  1. Identify $n = 15$ and $r = 3$.
  2. Use the permutation formula $P(15, 3) = \frac{15!}{(15-3)!}$.
  3. Simplify to $\frac{15!}{12!} = 15 \times 14 \times 13$.
  4. Calculate $15 \times 14 = 210$.
  5. Calculate $210 \times 13 = 2730$.

Answer: 2730

L4. Combinations; the binomial coefficient

Module 0  2026-08-08  ·  13:30  ·  practice PDF

Practice problems (3)
Problem 1. A teacher wants to choose a group of $4$ students from a class of $12$ to help with a project. How many different groups can be formed?
Reveal solution
  1. Identify that order does not matter, so we use combinations with $n=12$ and $k=4$.
  2. Apply the formula: $\binom{12}{4} = \frac{12!}{4!(12-4)!} = \frac{12!}{4!8!}$.
  3. Simplify the fraction: $\frac{12 \times 11 \times 10 \times 9}{4 \times 3 \times 2 \times 1}$.
  4. Calculate the numerator: $11880$.
  5. Calculate the denominator: $24$.
  6. Divide: $11880 / 24 = 495$.

Answer: 495

Problem 2. A lottery requires a player to choose $6$ numbers from a pool of $49$. How many unique tickets are possible?
Reveal solution
  1. The order of numbers on a ticket does not matter, so we use $\binom{49}{6}$.
  2. Set up the formula: $\frac{49!}{6!(49-6)!} = \frac{49!}{6!43!}$.
  3. Expand the numerator: $49 \times 48 \times 47 \times 46 \times 45 \times 44$.
  4. Divide by $6! = 720$.
  5. The calculation results in $13,983,816$.

Answer: 13,983,816

Problem 3. A committee of $5$ people is to be formed from a group of $7$ men and $8$ women. How many ways can the committee be formed if it must contain exactly $3$ women and $2$ men?
Reveal solution
  1. First, calculate the ways to choose $3$ women from $8$: $\binom{8}{3} = \frac{8 \times 7 \times 6}{3 \times 2 \times 1} = 56$.
  2. Next, calculate the ways to choose $2$ men from $7$: $\binom{7}{2} = \frac{7 \times 6}{2 \times 1} = 21$.
  3. Use the multiplication principle to combine these independent choices.
  4. Total ways = $56 \times 21 = 1176$.

Answer: 1176

L5. Permutations vs combinations — when order matters (clinic)

Module 0  2026-08-09  ·  13:33  ·  practice PDF

Practice problems (3)
Problem 1. A club has 15 members. In how many ways can a president, a vice president, and a secretary be chosen?
Reveal solution
  1. Step 1: Check if order matters. Since the roles are different, swapping the president and secretary creates a different outcome. Order matters.
  2. Step 2: Check for repetition. One person cannot hold more than one office. Repetition is not allowed.
  3. Step 3: Use the permutation formula $P(n, r)$ with $n=15$ and $r=3$.
  4. Step 4: Compute $15 \times 14 \times 13$.

Answer: 2730

Problem 2. A pizza shop offers 10 different toppings. How many different 3-topping pizzas can be made if toppings cannot be repeated?
Reveal solution
  1. Step 1: Check if order matters. A pizza with pepperoni, mushrooms, and onions is the same as one with onions, mushrooms, and pepperoni. Order does not matter.
  2. Step 2: Check for repetition. The problem states toppings cannot be repeated.
  3. Step 3: Use the combination formula $\binom{n}{k}$ with $n=10$ and $k=3$.
  4. Step 4: Compute $\frac{10 \times 9 \times 8}{3 \times 2 \times 1}$.

Answer: 120

Problem 3. A security code consists of 5 characters. Each character can be any of the 26 uppercase letters of the alphabet. How many such codes are possible?
Reveal solution
  1. Step 1: Check if order matters. In a security code, the sequence of letters is critical. Order matters.
  2. Step 2: Check for repetition. There is no restriction saying letters cannot be repeated, so repetition is allowed.
  3. Step 3: Since repetition is allowed, use the multiplication principle $n^r$.
  4. Step 4: Compute $26^5$.

Answer: 11881376

L6. Pascal's triangle and its secrets

Module 0  2026-08-10  ·  12:17  ·  practice PDF

Practice problems (3)
Problem 1. Using Pascal's triangle, find the value of $\binom{7}{3}$.
Reveal solution
  1. Construct the triangle up to row 7.
  2. Row 5 is $1, 5, 10, 10, 5, 1$.
  3. Row 6 is $1, 6, 15, 20, 15, 6, 1$.
  4. Row 7 is $1, 7, 21, 35, 35, 21, 7, 1$.
  5. The value at position $k=3$ (the 4th number) is 35.

Answer: 35

Problem 2. What is the sum of all binomial coefficients for $n=9$?
Reveal solution
  1. Use the row sum formula $\sum_{k=0}^{n} \binom{n}{k} = 2^n$.
  2. Substitute $n=9$ into the formula: $2^9$.
  3. Calculate $2^9 = 512$.

Answer: 512

Problem 3. If $\binom{n}{k} = 28$ and $\binom{n}{k+1} = 56$, use Pascal's Identity to find $\binom{n+1}{k+1}$.
Reveal solution
  1. Pascal's Identity states $\binom{n+1}{k+1} = \binom{n}{k} + \binom{n}{k+1}$.
  2. Substitute the given values: $28 + 56$.
  3. Calculate the sum: $28 + 56 = 84$.

Answer: 84

L7. The binomial theorem

Module 0  2026-08-11  ·  12:50  ·  practice PDF

Practice problems (3)
Problem 1. Expand the expression $(x + 4)^3$.
Reveal solution
  1. Identify $a = x$, $b = 4$, and $n = 3$.
  2. Use the binomial coefficients for $n=3$: $1, 3, 3, 1$.
  3. Write the terms: $1(x^3)(4^0) + 3(x^2)(4^1) + 3(x^1)(4^2) + 1(x^0)(4^3)$.
  4. Simplify the constants: $1 \cdot 1 = 1$, $3 \cdot 4 = 12$, $3 \cdot 16 = 48$, $1 \cdot 64 = 64$.

Answer: $x^3 + 12x^2 + 48x + 64$

Problem 2. Find the coefficient of the $x^2$ term in the expansion of $(2x - 1)^5$.
Reveal solution
  1. Identify $a = 2x$, $b = -1$, and $n = 5$.
  2. The $x^2$ term occurs when the power of $a$ is $2$, so $n-k = 2$, which means $k = 3$.
  3. Apply the formula for the term: $\binom{5}{3} (2x)^2 (-1)^3$.
  4. Calculate the parts: $\binom{5}{3} = 10$, $(2x)^2 = 4x^2$, and $(-1)^3 = -1$.
  5. Multiply together: $10 \cdot 4x^2 \cdot (-1) = -40x^2$.

Answer: $-40$

Problem 3. Expand $(3x + 2y)^4$.
Reveal solution
  1. Identify $a = 3x$, $b = 2y$, and $n = 4$.
  2. Use coefficients $1, 4, 6, 4, 1$.
  3. Term 1: $1(3x)^4(2y)^0 = 81x^4$.
  4. Term 2: $4(3x)^3(2y)^1 = 4(27x^3)(2y) = 216x^3y$.
  5. Term 3: $6(3x)^2(2y)^2 = 6(9x^2)(4y^2) = 216x^2y^2$.
  6. Term 4: $4(3x)^1(2y)^3 = 4(3x)(8y^3) = 96xy^3$.
  7. Term 5: $1(3x)^0(2y)^4 = 16y^4$.

Answer: $81x^4 + 216x^3y + 216x^2y^2 + 96xy^3 + 16y^4$

L8. Counting with repetition; stars and bars

Module 0  2026-08-12  ·  13:51  ·  practice PDF

Practice problems (3)
Problem 1. How many ways can 10 identical gold coins be distributed among 4 distinct pirates?
Reveal solution
  1. Identify $n = 10$ (coins) and $k = 4$ (pirates).
  2. Use the stars and bars formula for non-negative integers: $\binom{n+k-1}{k-1}$.
  3. Substitute the values: $\binom{10+4-1}{4-1} = \binom{13}{3}$.
  4. Calculate $\frac{13 \times 12 \times 11}{3 \times 2 \times 1} = 13 \times 2 \times 11 = 286$.

Answer: 286

Problem 2. Find the number of positive integer solutions to the equation $x + y + z + w = 20$.
Reveal solution
  1. Positive integer solutions mean each variable must be at least 1.
  2. Use the 'no zeros' formula: $\binom{n-1}{k-1}$.
  3. Here $n = 20$ and $k = 4$.
  4. Calculate $\binom{20-1}{4-1} = \binom{19}{3} = \frac{19 \times 18 \times 17}{3 \times 2 \times 1} = 19 \times 3 \times 17 = 969$.

Answer: 969

Problem 3. How many ways can 15 identical marbles be placed into 3 distinct jars such that the first jar has at least 2 marbles and the second jar has at least 3 marbles?
Reveal solution
  1. Pre-allocate 2 marbles to jar 1 and 3 marbles to jar 2.
  2. Remaining marbles: $15 - 2 - 3 = 10$.
  3. Now distribute 10 identical marbles into 3 distinct jars with no further restrictions.
  4. Use $\binom{n+k-1}{k-1}$ with $n = 10$ and $k = 3$.
  5. Calculate $\binom{10+3-1}{3-1} = \binom{12}{2} = \frac{12 \times 11}{2} = 66$.

Answer: 66

L9. Inclusion-exclusion I — two and three sets

Module 0  2026-08-13  ·  12:59  ·  practice PDF

Practice problems (3)
Problem 1. In a group of students, 40 study Biology and 30 study Chemistry. 12 study both. How many students study at least one of these subjects?
Reveal solution
  1. Identify the sets: $|A| = 40$ and $|B| = 30$.
  2. Identify the intersection: $|A \cap B| = 12$.
  3. Apply the formula $|A \cup B| = |A| + |B| - |A \cap B|$.
  4. Calculate $40 + 30 - 12 = 58$.

Answer: 58

Problem 2. A survey finds that 50 people like Apples, 40 like Bananas, and 30 like Cherries. 15 like Apples and Bananas, 10 like Apples and Cherries, and 12 like Bananas and Cherries. 5 people like all three. How many people like at least one of the fruits?
Reveal solution
  1. Sum the individual sets: $50 + 40 + 30 = 120$.
  2. Subtract the pairwise intersections: $120 - (15 + 10 + 12) = 120 - 37 = 83$.
  3. Add back the triple intersection: $83 + 5 = 88$.

Answer: 88

Problem 3. The union of two sets $A$ and $B$ has 100 elements. Set $A$ has 70 elements and set $B$ has 50 elements. How many elements are in the intersection of $A$ and $B$?
Reveal solution
  1. Use the formula $|A \cup B| = |A| + |B| - |A \cap B|$.
  2. Substitute the known values: $100 = 70 + 50 - |A \cap B|$.
  3. Simplify the right side: $100 = 120 - |A \cap B|$.
  4. Solve for $|A \cap B|$: $|A \cap B| = 120 - 100 = 20$.

Answer: 20

L10. Inclusion-exclusion II — derangements

Module 0  2026-08-14  ·  13:26  ·  practice PDF

Practice problems (3)
Problem 1. Calculate the exact number of derangements for a set of 6 elements, $D(6)$.
Reveal solution
  1. Use the formula $D(6) = 6! \sum_{k=0}^{6} \frac{(-1)^k}{k!}$.
  2. Expand the sum: $720 \times (1 - 1 + \frac{1}{2} - \frac{1}{6} + \frac{1}{24} - \frac{1}{120} + \frac{1}{720})$.
  3. Simplify the terms: $720 \times (0 + 0.5 - 0.1666... + 0.04166... - 0.00833... + 0.00138...)$.
  4. Calculate the sum inside: $720 \times (\frac{360 - 120 + 30 - 6 + 1}{720}) = 720 \times \frac{265}{720}$.
  5. The result is 265.

Answer: 265

Problem 2. A group of 5 people swap secret santa gifts. What is the probability that no one draws their own name?
Reveal solution
  1. The total number of permutations is $5! = 120$.
  2. The number of derangements $D(5)$ is $120 \times (1 - 1 + \frac{1}{2} - \frac{1}{6} + \frac{1}{24} - \frac{1}{120}) = 44$.
  3. The probability is $\frac{D(5)}{5!} = \frac{44}{120}$.
  4. Simplify the fraction: $\frac{11}{30}$.

Answer: \frac{11}{30}

Problem 3. In a set of 7 elements, how many permutations have exactly 2 elements in their original positions?
Reveal solution
  1. First, choose which 2 elements are fixed: $\binom{7}{2} = \frac{7 \times 6}{2} = 21$.
  2. The remaining $7 - 2 = 5$ elements must be deranged so that no more elements are in their original positions.
  3. The number of derangements for 5 elements is $D(5) = 44$.
  4. The total number of such permutations is $\binom{7}{2} \times D(5) = 21 \times 44$.
  5. Calculate $21 \times 44 = 924$.

Answer: 924

L11. Counting gauntlet — mixed practice

Module 0  2026-08-15  ·  12:15  ·  practice PDF

Practice problems (3)
Problem 1. A committee of 4 people is to be chosen from a group of 10. How many different committees are possible?
Reveal solution
  1. The order of people in a committee does not matter, so we use combinations.
  2. We need to calculate 10 choose 4.
  3. $\binom{10}{4} = \frac{10 \times 9 \times 8 \times 7}{4 \times 3 \times 2 \times 1} = 210$.

Answer: 210

Problem 2. How many ways can 7 identical apples be distributed among 3 children such that each child receives at least one apple?
Reveal solution
  1. Since the apples are identical, we use stars and bars.
  2. Each child must get at least one, so we pre-allocate 3 apples.
  3. Remaining apples $n = 7 - 3 = 4$. Number of children $k = 3$.
  4. The number of ways is $\binom{4+3-1}{3-1} = \binom{6}{2} = 15$.

Answer: 15

Problem 3. A set of 4 letters {A, B, C, D} is permuted. How many of these permutations are derangements?
Reveal solution
  1. A derangement means no letter is in its original position.
  2. We use the formula $D(n)$ for $n=4$.
  3. $D(4) = 4! (1/0! - 1/1! + 1/2! - 1/3! + 1/4!)$.
  4. $D(4) = 24 (1 - 1 + 1/2 - 1/6 + 1/24) = 12 - 4 + 1 = 9$.

Answer: 9

L12. Module 0 review + self-test

Module 0  2026-08-16  ·  14:17  ·  practice PDF

Practice problems (3)
Problem 1. How many ways can a committee of 4 people be chosen from a group of 10?
Reveal solution
  1. The order of people in a committee does not matter, so we use combinations.
  2. We apply the formula $\binom{10}{4}$.
  3. Calculation: $\frac{10 \times 9 \times 8 \times 7}{4 \times 3 \times 2 \times 1} = 210$.

Answer: 210

Problem 2. How many ways can 7 identical apples be distributed among 4 children such that some children may receive no apples?
Reveal solution
  1. The apples are identical and the children are distinct, so we use stars and bars.
  2. Here $n=7$ (apples) and $k=4$ (children).
  3. The formula is $\binom{n+k-1}{k-1} = \binom{7+4-1}{4-1} = \binom{10}{3}$.
  4. Calculation: $\frac{10 \times 9 \times 8}{3 \times 2 \times 1} = 120$.

Answer: 120

Problem 3. A group of 5 people leave their umbrellas in a stand. If they each pick one up at random, how many ways can they do so such that exactly 2 people get their own umbrella back?
Reveal solution
  1. First, we choose which 2 people get their own umbrellas: $\binom{5}{2} = 10$ ways.
  2. The remaining 3 people must all get the wrong umbrella, which is a derangement of 3 items: $D(3)$.
  3. Calculate $D(3) = 3!(1 - 1 + 1/2 - 1/6) = 6(1/3) = 2$.
  4. Total ways = $\binom{5}{2} \times D(3) = 10 \times 2 = 20$.

Answer: 20

Module 1 — Probability Foundations (14/14)

L13. What is probability? Sample spaces and events

Module 1  2026-08-17  ·  13:31  ·  practice PDF

Practice problems (3)
Problem 1. A small deck contains 10 cards, 4 of which are Aces. If you draw 2 cards at random without replacement, what is the probability that both are Aces?
Reveal solution
  1. The total number of ways to choose 2 cards from 10 is $\binom{10}{2} = \frac{10 \times 9}{2} = 45$.
  2. The number of ways to choose 2 Aces from the 4 available is $\binom{4}{2} = \frac{4 \times 3}{2} = 6$.
  3. The probability is the ratio of favorable outcomes to total outcomes: $P = \frac{6}{45}$.

Answer: 2/15

Problem 2. A fair six-sided die is rolled twice. What is the probability that the sum of the two rolls is exactly 7?
Reveal solution
  1. The sample space size for two rolls is $6 \times 6 = 36$.
  2. The outcomes that sum to 7 are $(1,6), (2,5), (3,4), (4,3), (5,2), (6,1)$.
  3. There are 6 such outcomes.
  4. The probability is $P = \frac{6}{36}$.

Answer: 1/6

Problem 3. A committee of 3 people is chosen from a group of 5 men and 4 women. What is the probability that the committee contains at least 2 women?
Reveal solution
  1. The total number of ways to choose 3 people from 9 is $\binom{9}{3} = \frac{9 \times 8 \times 7}{3 \times 2 \times 1} = 84$.
  2. The event 'at least 2 women' includes two cases: exactly 2 women or exactly 3 women.
  3. Case 1 (2 women, 1 man): $\binom{4}{2} \times \binom{5}{1} = 6 \times 5 = 30$.
  4. Case 2 (3 women, 0 men): $\binom{4}{3} \times \binom{5}{0} = 4 \times 1 = 4$.
  5. Total favorable outcomes = $30 + 4 = 34$.
  6. The probability is $P = \frac{34}{84}$.

Answer: 17/42

L14. The axioms; probability as long-run frequency

Module 1  2026-08-18  ·  13:08  ·  practice PDF

Practice problems (3)
Problem 1. A sample space has four outcomes: $A, B, C,$ and $D$. A probability assignment is given as $P(A)=0.4, P(B)=0.3, P(C)=0.2,$ and $P(D)=0.2$. Is this a valid probability assignment? Explain why or why not.
Reveal solution
  1. Check Axiom 1: All values $0.4, 0.3, 0.2, 0.2$ are $\ge 0$.
  2. Check Axiom 2: Sum the probabilities: $0.4 + 0.3 + 0.2 + 0.2 = 1.1$.
  3. Since the sum is $1.1$, which is not equal to $1$, the normalization axiom is violated.

Answer: No, it is invalid because the sum of probabilities is $1.1$, violating $P(S)=1$.

Problem 2. In a game, the probability of winning is $0.15$ and the probability of drawing is $0.30$. Assuming these are the only outcomes other than losing, what is the probability of losing?
Reveal solution
  1. Let $W$ be winning, $D$ be drawing, and $L$ be losing.
  2. The sample space is $S = \{W, D, L\}$.
  3. By Axiom 2, $P(W) + P(D) + P(L) = 1$.
  4. Substitute the known values: $0.15 + 0.30 + P(L) = 1$.
  5. Solve for $P(L)$: $P(L) = 1 - 0.45 = 0.55$.

Answer: 0.55

Problem 3. A biased spinner has three sections: Red, Blue, and Green. The probability of Red is $1/3$. The probability of Blue is twice the probability of Green. Find the probability of Green.
Reveal solution
  1. Let $P(G) = x$. Then $P(B) = 2x$.
  2. We know $P(R) = 1/3$.
  3. By Axiom 2, $P(R) + P(B) + P(G) = 1$.
  4. Substitute: $1/3 + 2x + x = 1$.
  5. Combine terms: $3x = 1 - 1/3 = 2/3$.
  6. Divide by 3: $x = 2/9$.

Answer: 2/9

L15. Equally likely outcomes; counting meets probability

Module 1  2026-08-19  ·  14:20  ·  practice PDF

Practice problems (3)
Problem 1. A standard deck of 52 cards is used. If 5 cards are drawn at random without replacement, what is the probability that all 5 cards are of the same suit (a flush)?
Reveal solution
  1. The total number of ways to choose 5 cards from 52 is $\binom{52}{5} = 2598960$.
  2. There are 4 suits. For each suit, there are 13 cards, and we choose 5 of them: $\binom{13}{5} = 1287$.
  3. The total number of favorable outcomes is $4 \times 1287 = 5148$.
  4. The probability is $\frac{5148}{2598960} \approx 0.00198$.

Answer: \frac{5148}{2598960} \approx 0.00198

Problem 2. A bag contains 7 red marbles and 5 blue marbles. If 3 marbles are drawn at random without replacement, what is the probability that exactly 2 are red?
Reveal solution
  1. The total number of ways to choose 3 marbles from 12 is $\binom{12}{3} = 220$.
  2. The number of ways to choose 2 red marbles from 7 is $\binom{7}{2} = 21$.
  3. The number of ways to choose 1 blue marble from 5 is $\binom{5}{1} = 5$.
  4. The number of favorable outcomes is $21 \times 5 = 105$.
  5. The probability is $\frac{105}{220} = \frac{21}{44}$.

Answer: \frac{21}{44}

Problem 3. Four people are randomly seated in a row of four chairs. What is the probability that two specific people, Alice and Bob, are NOT sitting next to each other?
Reveal solution
  1. The total number of arrangements is $4! = 24$.
  2. First, find the probability that they ARE sitting next to each other. Treat Alice and Bob as one block. There are $3!$ ways to arrange the block and the other two people, and $2!$ ways to arrange Alice and Bob within the block: $3! \times 2! = 6 \times 2 = 12$.
  3. The probability they are adjacent is $\frac{12}{24} = \frac{1}{2}$.
  4. The probability they are NOT adjacent is $1 - \frac{1}{2} = \frac{1}{2}$.

Answer: \frac{1}{2}

L16. The birthday problem

Module 1  2026-08-20  ·  13:00  ·  practice PDF

Practice problems (3)
Problem 1. In a group of $n=3$ people, what is the probability that at least two people share a birthday? Assume a $365$-day year.
Reveal solution
  1. Find the probability that all $3$ people have different birthdays: $P(\text{no match}) = \frac{365}{365} \times \frac{364}{365} \times \frac{363}{365}$.
  2. Calculate the product: $P(\text{no match}) = \frac{132132}{133225} \approx 0.9918$.
  3. Subtract from $1$: $P(\text{match}) = 1 - 0.9918 = 0.0082$.

Answer: 0.0082

Problem 2. If a group has $n=30$ people, is the probability of a shared birthday greater than or less than $70\%$?
Reveal solution
  1. Calculate $P(\text{no match}) = \frac{P(365, 30)}{365^{30}}$.
  2. Using the formula, $P(\text{no match}) \approx 0.2937$.
  3. Find $P(\text{match}) = 1 - 0.2937 = 0.7063$.
  4. Since $0.7063 > 0.70$, the probability is greater than $70\%$.

Answer: Greater than 70%

Problem 3. In a fictional world where a year has only $100$ days, how many people $n$ must be in a room for the probability of a shared birthday to exceed $50\%$?
Reveal solution
  1. We need $P(\text{no match}) < 0.5$, where $P(\text{no match}) = \frac{P(100, n)}{100^n}$.
  2. For $n=12$: $P(\text{no match}) = \frac{100 \times 99 \times \dots \times 89}{100^{12}} \approx 0.501$.
  3. For $n=13$: $P(\text{no match}) = \frac{100 \times 99 \times \dots \times 88}{100^{13}} \approx 0.441$.
  4. The probability first exceeds $0.5$ when $n=13$.

Answer: 13

L17. The complement trick and 'at least one' problems

Module 1  2026-08-21  ·  14:04  ·  practice PDF

Practice problems (3)
Problem 1. A fair coin is flipped 5 times. What is the probability of getting at least one head?
Reveal solution
  1. The probability of success (heads) is $p = 0.5$.
  2. The probability of failure (tails) is $1 - p = 0.5$.
  3. The probability of zero heads in 5 flips is $(0.5)^5 = 0.03125$.
  4. The probability of at least one head is $1 - 0.03125 = 0.96875$.

Answer: 0.96875

Problem 2. A basketball player has a 70% free-throw success rate. If they take 3 shots, what is the probability they make at least one?
Reveal solution
  1. The probability of success is $p = 0.7$.
  2. The probability of failure (missing) is $1 - p = 0.3$.
  3. The probability of missing all 3 shots is $(0.3)^3 = 0.027$.
  4. The probability of making at least one is $1 - 0.027 = 0.973$.

Answer: 0.973

Problem 3. You have three independent security alarms. The first has a 90% chance of detecting an intruder, the second 80%, and the third 70%. What is the probability that at least one alarm goes off?
Reveal solution
  1. Find the probability that each alarm fails: $P(F_1) = 0.1$, $P(F_2) = 0.2$, $P(F_3) = 0.3$.
  2. The probability that all three fail is $0.1 \times 0.2 \times 0.3 = 0.006$.
  3. The probability that at least one succeeds is $1 - 0.006 = 0.994$.

Answer: 0.994

L18. Conditional probability I — definition and intuition

Module 1  2026-08-22  ·  11:46  ·  practice PDF

Practice problems (3)
Problem 1. A week has 7 days. Let $B$ be the event that a randomly chosen day is a weekday (Monday through Friday). Let $A$ be the event that the day starts with the letter 'T'. Find $P(A|B)$.
Reveal solution
  1. Identify the restricted sample space $B$: {Monday, Tuesday, Wednesday, Thursday, Friday}. The size $|B| = 5$.
  2. Identify the intersection $A \cap B$: Days that are weekdays AND start with 'T'. These are {Tuesday, Thursday}. The size $|A \cap B| = 2$.
  3. Apply the formula $P(A|B) = \frac{|A \cap B|}{|B|} = \frac{2}{5}$.

Answer: 2/5

Problem 2. In a class of 30 students, 15 like Math, 10 like Science, and 7 like both. If a student is chosen at random and they like Science, what is the probability they also like Math?
Reveal solution
  1. Let $M$ be liking Math and $S$ be liking Science.
  2. The condition is liking Science, so $P(S) = \frac{10}{30}$.
  3. The intersection is liking both, so $P(M \cap S) = \frac{7}{30}$.
  4. Calculate $P(M|S) = \frac{7/30}{10/30} = \frac{7}{10}$.

Answer: 7/10

Problem 3. Two fair coins are flipped. Given that at least one coin is heads, what is the probability that both coins are heads?
Reveal solution
  1. The sample space is $S = \{HH, HT, TH, TT\}$.
  2. The condition $B$ is 'at least one head': $B = \{HH, HT, TH\}$. Thus $|B| = 3$.
  3. The event $A$ is 'both heads': $A = \{HH\}$.
  4. The intersection $A \cap B$ is just $\{HH\}$, so $|A \cap B| = 1$.
  5. The conditional probability is $P(A|B) = \frac{1}{3}$.

Answer: 1/3

L19. Conditional probability II — multiplication rule; sampling without replacement

Module 1  2026-08-23  ·  12:46  ·  practice PDF

Practice problems (3)
Problem 1. A standard deck of 52 cards contains 13 hearts. If three cards are drawn without replacement, what is the probability that all three are hearts?
Reveal solution
  1. The probability the first card is a heart is $13/52$.
  2. Given the first is a heart, there are 12 hearts left out of 51 cards, so the second is $12/51$.
  3. Given the first two are hearts, there are 11 hearts left out of 50 cards, so the third is $11/50$.
  4. Multiply these: $(13/52) \cdot (12/51) \cdot (11/50) = (1/4) \cdot (4/17) \cdot (11/50) = 11/850$.

Answer: 11/850

Problem 2. An urn contains 7 white balls and 3 black balls. Two balls are drawn without replacement. What is the probability that the first is white and the second is black?
Reveal solution
  1. The probability the first ball is white is $7/10$.
  2. Given the first was white, there are still 3 black balls, but only 9 balls total. The probability the second is black is $3/9$.
  3. Multiply the probabilities: $(7/10) \cdot (3/9) = 21/90 = 7/30$.

Answer: 7/30

Problem 3. A box contains 5 red, 4 green, and 3 blue pens. If three pens are drawn without replacement, what is the probability that they are all different colors?
Reveal solution
  1. There are $3! = 6$ different orders to draw one of each color (RGB, RBG, GRB, GBR, BRG, BGR).
  2. The probability of any one specific order, say Red then Green then Blue, is $(5/12) \cdot (4/11) \cdot (3/10) = 60/1320 = 1/22$.
  3. Since all 6 orders have the same probability, the total probability is $6 \cdot (1/22) = 6/22 = 3/11$.

Answer: 3/11

L20. Independence — what it really means (and doesn't)

Module 1  2026-08-24  ·  14:39  ·  practice PDF

Practice problems (3)
Problem 1. Given $P(A) = 0.5$, $P(B) = 0.4$, and $P(A \cap B) = 0.2$, are events $A$ and $B$ independent? Explain why.
Reveal solution
  1. Calculate the product of the individual probabilities: $0.5 \cdot 0.4 = 0.2$.
  2. Compare this product to the given joint probability $P(A \cap B) = 0.2$.
  3. Since $0.2 = 0.2$, the condition for independence is met.

Answer: Yes, they are independent because $P(A \cap B) = P(A)P(B)$.

Problem 2. Two events $X$ and $Y$ are disjoint and both have probabilities greater than zero. Are they independent? Why or why not?
Reveal solution
  1. Since they are disjoint, $P(X \cap Y) = 0$.
  2. Since $P(X) > 0$ and $P(Y) > 0$, their product $P(X)P(Y)$ must be greater than zero.
  3. Therefore, $P(X \cap Y) \neq P(X)P(Y)$.

Answer: No, they are dependent because the occurrence of one makes the probability of the other zero.

Problem 3. A fair coin is flipped and a fair six-sided die is rolled. What is the probability that the coin shows tails and the die shows a number greater than 4?
Reveal solution
  1. Identify the events: $A$ is tails, $B$ is die $> 4$.
  2. The events are independent because the coin does not affect the die.
  3. Compute $P(A) = 1/2$.
  4. Compute $P(B) = 2/6 = 1/3$ (outcomes 5 and 6).
  5. Multiply the probabilities: $1/2 \cdot 1/3 = 1/6$.

Answer: $1/6$

L21. The law of total probability

Module 1  2026-08-25  ·  13:23  ·  practice PDF

Practice problems (3)
Problem 1. A company has three factories: A, B, and C. Factory A produces $40\%$ of the products, B produces $35\%$, and C produces $25\%$. The defect rates are $2\%$ for A, $3\%$ for B, and $5\%$ for C. What is the probability that a randomly chosen product is defective?
Reveal solution
  1. Identify the scenarios: $P(A) = 0.40$, $P(B) = 0.35$, $P(C) = 0.25$.
  2. Identify conditional probabilities: $P(Def|A) = 0.02$, $P(Def|B) = 0.03$, $P(Def|C) = 0.05$.
  3. Apply the Law of Total Probability: $P(Def) = (0.40)(0.02) + (0.35)(0.03) + (0.25)(0.05)$.
  4. Calculate: $P(Def) = 0.008 + 0.0105 + 0.0125 = 0.031$.

Answer: 0.031

Problem 2. A weather forecaster says there is a $30\%$ chance of rain tomorrow. If it rains, the probability that a commuter is late for work is $60\%$. If it does not rain, the probability they are late is $10\%$. What is the probability the commuter is late tomorrow?
Reveal solution
  1. Identify scenarios: $P(Rain) = 0.30$, $P(No Rain) = 0.70$.
  2. Identify conditional probabilities: $P(Late|Rain) = 0.60$, $P(Late|No Rain) = 0.10$.
  3. Apply the Law of Total Probability: $P(Late) = (0.30)(0.60) + (0.70)(0.10)$.
  4. Calculate: $P(Late) = 0.18 + 0.07 = 0.25$.

Answer: 0.25

Problem 3. Two boxes contain coins. Box 1 has 3 gold and 7 silver coins. Box 2 has 8 gold and 2 silver coins. A box is chosen by flipping a fair coin, and then a coin is drawn from that box. What is the probability that the drawn coin is silver?
Reveal solution
  1. Identify scenarios: $P(Box 1) = 0.5$, $P(Box 2) = 0.5$.
  2. Identify conditional probabilities: $P(Silver|Box 1) = 7/10 = 0.7$, $P(Silver|Box 2) = 2/10 = 0.2$.
  3. Apply the Law of Total Probability: $P(Silver) = (0.5)(0.7) + (0.5)(0.2)$.
  4. Calculate: $P(Silver) = 0.35 + 0.10 = 0.45$.

Answer: 0.45

L22. Bayes' theorem I — the formula, via tree diagrams

Module 1  2026-08-26  ·  11:39  ·  practice PDF

Practice problems (3)
Problem 1. A factory has two lines. Line 1 produces $70\%$ of the parts with a $3\%$ defect rate. Line 2 produces $30\%$ of the parts with a $8\%$ defect rate. If a part is chosen at random and found to be defective, what is the probability it came from Line 1?
Reveal solution
  1. Identify priors: $P(L1) = 0.7$, $P(L2) = 0.3$.
  2. Identify likelihoods: $P(D|L1) = 0.03$, $P(D|L2) = 0.08$.
  3. Calculate total probability of defect: $P(D) = (0.03 \times 0.7) + (0.08 \times 0.3) = 0.021 + 0.024 = 0.045$.
  4. Apply Bayes' theorem: $P(L1|D) = \frac{0.021}{0.045} = \frac{21}{45} = \frac{7}{15}$.

Answer: 7/15 \approx 0.4667

Problem 2. A weather app predicts rain with $80\%$ accuracy when it actually rains, and it predicts no rain with $90\%$ accuracy when it does not rain. The climatological probability of rain on any given day is $20\%$. If the app predicts rain today, what is the probability that it actually rains?
Reveal solution
  1. Priors: $P(Rain) = 0.2$, $P(No Rain) = 0.8$.
  2. Likelihoods: $P(Pred|Rain) = 0.8$, $P(Pred|No Rain) = 1 - 0.9 = 0.1$.
  3. Total probability of prediction: $P(Pred) = (0.8 \times 0.2) + (0.1 \times 0.8) = 0.16 + 0.08 = 0.24$.
  4. Posterior: $P(Rain|Pred) = \frac{0.16}{0.24} = \frac{2}{3}$.

Answer: 2/3 \approx 0.6667

Problem 3. Three urns contain balls. Urn A has 2 red and 3 blue. Urn B has 4 red and 1 blue. Urn C has 3 red and 2 blue. An urn is chosen at random (equal probability) and a ball is drawn. If the ball is red, what is the probability it came from Urn B?
Reveal solution
  1. Priors: $P(A) = P(B) = P(C) = 1/3$.
  2. Likelihoods: $P(R|A) = 2/5$, $P(R|B) = 4/5$, $P(R|C) = 3/5$.
  3. Total probability of red: $P(R) = (1/3 \times 2/5) + (1/3 \times 4/5) + (1/3 \times 3/5) = (2+4+3)/15 = 9/15 = 3/5$.
  4. Posterior: $P(B|R) = \frac{(1/3 \times 4/5)}{3/5} = \frac{4/15}{9/15} = 4/9$.

Answer: 4/9 \approx 0.4444

L23. Bayes' theorem II — the medical test paradox

Module 1  2026-08-27  ·  13:20  ·  practice PDF

Practice problems (3)
Problem 1. A rare disease has a prevalence of $0.2\%$. A test for this disease has a sensitivity of $95\%$ and a false positive rate of $3\%$. If a person tests positive, what is the probability they actually have the disease?
Reveal solution
  1. Identify priors: $P(D) = 0.002$ and $P(D^c) = 0.998$.
  2. Identify likelihoods: $P(+|D) = 0.95$ and $P(+|D^c) = 0.03$.
  3. Calculate total probability of positive test: $P(+) = (0.95 \times 0.002) + (0.03 \times 0.998) = 0.0019 + 0.02994 = 0.03184$.
  4. Apply Bayes' theorem: $P(D|+) = \frac{0.0019}{0.03184} \approx 0.0597$.

Answer: 0.0597

Problem 2. In a city, $1\%$ of the residents are spies. A lie detector test is $90\%$ accurate for spies (sensitivity) and $90\%$ accurate for non-spies (specificity). If a resident tests as a spy, what is the probability they are actually a spy?
Reveal solution
  1. Priors: $P(S) = 0.01$, $P(S^c) = 0.99$.
  2. Likelihoods: $P(+|S) = 0.90$. Since specificity is $90\%$, the false positive rate $P(+|S^c) = 1 - 0.90 = 0.10$.
  3. Total probability of positive: $P(+) = (0.90 \times 0.01) + (0.10 \times 0.99) = 0.009 + 0.099 = 0.108$.
  4. Posterior: $P(S|+) = \frac{0.009}{0.108} = \frac{1}{12} \approx 0.0833$.

Answer: 0.0833

Problem 3. A security system triggers an alarm if it detects a breach. The probability of a breach is $0.01\%$. The system has a sensitivity of $99.9\%$ and a false positive rate of $0.1\%$. If the alarm goes off, what is the probability there is actually a breach?
Reveal solution
  1. Priors: $P(B) = 0.0001$, $P(B^c) = 0.9999$.
  2. Likelihoods: $P(+|B) = 0.999$, $P(+|B^c) = 0.001$.
  3. Total probability of alarm: $P(+) = (0.999 \times 0.0001) + (0.001 \times 0.9999) = 0.0000999 + 0.0009999 = 0.0010998$.
  4. Posterior: $P(B|+) = \frac{0.0000999}{0.0010998} \approx 0.0908$.

Answer: 0.0908

L24. Monty Hall — resolved forever, with simulation

Module 1  2026-08-28  ·  12:08  ·  practice PDF

Practice problems (3)
Problem 1. In a version of the Monty Hall game, there are $5$ doors. You pick one. The host, who knows where the car is, opens $2$ doors to reveal goats. What is the probability of winning if you switch to one of the remaining $2$ closed doors?
Reveal solution
  1. The initial probability of picking the car is $1/5$.
  2. The probability that the car is among the other $4$ doors is $4/5$.
  3. The host eliminates $2$ of those $4$ doors, leaving $2$ closed doors in that group.
  4. The $4/5$ probability is now split equally between the $2$ remaining doors.
  5. The probability for each remaining door is $(4/5) / 2 = 2/5$.

Answer: $2/5$

Problem 2. Suppose there are $3$ doors. You pick door $1$. The host opens door $3$ and reveals a goat. However, the host did NOT know where the car was; he just happened to open a goat door by luck. What is the probability that the car is behind door $2$?
Reveal solution
  1. Let $C_i$ be the event the car is behind door $i$, and $G_3$ be the event the host opens door $3$ and finds a goat.
  2. The prior probabilities are $P(C_1) = P(C_2) = P(C_3) = 1/3$.
  3. The likelihoods are $P(G_3 | C_1) = 1/2$ (he could pick door $2$ or $3$), $P(G_3 | C_2) = 1/2$ (he picks from doors $2$ and $3$, and $3$ is a goat), $P(G_3 | C_3) = 0$.
  4. Using Bayes: $P(C_2 | G_3) = \frac{(1/2)(1/3)}{(1/2)(1/3) + (1/2)(1/3)} = 1/2$.

Answer: $1/2$

Problem 3. In a $100$-door Monty Hall game, you pick one door. The host opens $98$ doors to reveal goats. What is the probability of winning if you switch to the last remaining door?
Reveal solution
  1. The probability your first choice was correct is $1/100$.
  2. The probability the car is in the other $99$ doors is $99/100$.
  3. The host eliminates $98$ of those $99$ doors.
  4. The entire $99/100$ probability is now concentrated in the single remaining door.
  5. Switching wins if the car was in the group of $99$ doors.

Answer: $99/100$

L25. Probability clinic — classic puzzles

Module 1  2026-08-29  ·  14:37  ·  practice PDF

Practice problems (3)
Problem 1. A fair coin is flipped 10 times. What is the probability of getting at least 2 heads?
Reveal solution
  1. The complement of 'at least 2 heads' is '0 heads' or '1 head'.
  2. The probability of 0 heads is $\binom{10}{0}(0.5)^{10} = 1/1024$.
  3. The probability of 1 head is $\binom{10}{1}(0.5)^{10} = 10/1024$.
  4. The probability of the complement is $11/1024$.
  5. The final probability is $1 - 11/1024 = 1013/1024$.

Answer: $1013/1024 \approx 0.9893$

Problem 2. An urn contains 4 white balls and 6 black balls. Three balls are drawn without replacement. What is the probability that exactly 2 are white?
Reveal solution
  1. The total number of ways to choose 3 balls from 10 is $\binom{10}{3} = 120$.
  2. The number of ways to choose 2 white balls from 4 is $\binom{4}{2} = 6$.
  3. The number of ways to choose 1 black ball from 6 is $\binom{6}{1} = 6$.
  4. The number of successful outcomes is $6 \times 6 = 36$.
  5. The probability is $36/120 = 3/10$.

Answer: $0.3$

Problem 3. You have three coins: one is double-headed, one is double-tailed, and one is fair. You pick one at random and flip it; it shows heads. What is the probability it is the fair coin?
Reveal solution
  1. Let $F$ be fair, $H$ be double-headed, $T$ be double-tailed. $P(F)=P(H)=P(T)=1/3$.
  2. The probability of heads given fair is $P(\text{heads}|F) = 1/2$.
  3. The probability of heads given double-headed is $P(\text{heads}|H) = 1$.
  4. The probability of heads given double-tailed is $P(\text{heads}|T) = 0$.
  5. Total probability of heads: $P(\text{heads}) = (1/3)(1/2) + (1/3)(1) + (1/3)(0) = 1/6 + 1/3 = 1/2$.
  6. Using Bayes' theorem: $P(F|\text{heads}) = \frac{P(\text{heads}|F)P(F)}{P(\text{heads})} = \frac{(1/2)(1/3)}{1/2} = 1/3$.

Answer: $1/3$

L26. Module 1 review + self-test

Module 1  2026-08-30  ·  14:10  ·  practice PDF

Practice problems (3)
Problem 1. A committee of 4 people is to be chosen from a group of 6 men and 8 women. What is the probability that the committee contains exactly 2 men and 2 women?
Reveal solution
  1. Calculate total ways to choose 4 from 14: $\binom{14}{4} = 1001$.
  2. Calculate ways to choose 2 men from 6: $\binom{6}{2} = 15$.
  3. Calculate ways to choose 2 women from 8: $\binom{8}{2} = 28$.
  4. Multiply successful outcomes: $15 \times 28 = 420$.
  5. Divide by total: $420 / 1001 \approx 0.4196$.

Answer: 0.4196

Problem 2. A bag contains 5 red and 5 blue balls. You draw 3 balls without replacement. What is the probability that at least one ball is red?
Reveal solution
  1. Use the complement rule: $P(\text{at least one red}) = 1 - P(\text{no red})$.
  2. No red means all 3 are blue.
  3. Ways to choose 3 blue from 5: $\binom{5}{3} = 10$.
  4. Total ways to choose 3 from 10: $\binom{10}{3} = 120$.
  5. Probability of no red: $10 / 120 = 1/12$.
  6. Subtract from one: $1 - 1/12 = 11/12 \approx 0.9167$.

Answer: 0.9167

Problem 3. In a certain population, 1% have a rare disease. A test for the disease is 99% accurate for those who have it (sensitivity) and 95% accurate for those who do not (specificity). If a person tests positive, what is the probability they actually have the disease?
Reveal solution
  1. Prior $P(D) = 0.01$, so $P(D^c) = 0.99$.
  2. Likelihoods: $P(+|D) = 0.99$ and $P(+|D^c) = 1 - 0.95 = 0.05$.
  3. Total probability of positive $P(+) = (0.99)(0.01) + (0.05)(0.99) = 0.0099 + 0.0495 = 0.0594$.
  4. Apply Bayes: $P(D|+) = \frac{P(+|D)P(D)}{P(+)} = \frac{0.0099}{0.0594}$.
  5. Calculate result: $0.0099 / 0.0594 = 1/6 \approx 0.1667$.

Answer: 0.1667

Module 2 — Discrete Random Variables (14/14)

L27. Random variables: numbers attached to randomness

Module 2  2026-08-31  ·  14:02  ·  practice PDF

Practice problems (3)
Problem 1. A bag contains 3 red balls and 2 blue balls. Two balls are drawn without replacement. Let $X$ be the number of red balls drawn. Find the probability distribution of $X$.
Reveal solution
  1. The possible values for $X$ are 0, 1, or 2.
  2. For $X=0$, both balls must be blue: $P(X=0) = \frac{2}{5} \times \frac{1}{4} = \frac{2}{20} = 0.1$.
  3. For $X=2$, both balls must be red: $P(X=2) = \frac{3}{5} \times \frac{2}{4} = \frac{6}{20} = 0.3$.
  4. For $X=1$, one red and one blue in any order: $P(X=1) = (\frac{3}{5} \times \frac{2}{4}) + (\frac{2}{5} \times \frac{3}{4}) = \frac{6}{20} + \frac{6}{20} = \frac{12}{20} = 0.6$.
  5. Check sum: $0.1 + 0.6 + 0.3 = 1.0$.

Answer: P(X=0)=0.1, P(X=1)=0.6, P(X=2)=0.3

Problem 2. A fair coin is tossed 4 times. Let $X$ be the number of heads. Calculate $P(X=2)$.
Reveal solution
  1. The total number of outcomes in the sample space is $2^4 = 16$.
  2. The number of ways to get exactly 2 heads is given by the combination formula $\binom{4}{2}$.
  3. $\binom{4}{2} = \frac{4 \times 3}{2 \times 1} = 6$.
  4. The probability is the number of successful outcomes divided by the total: $P(X=2) = \frac{6}{16} = \frac{3}{8} = 0.375$.

Answer: 0.375

Problem 3. A random variable $X$ has the following distribution: $P(X=1) = 0.2$, $P(X=2) = 0.5$, and $P(X=3) = k$. Find the value of $k$ and determine $P(X < 3)$.
Reveal solution
  1. The sum of all probabilities must be 1: $0.2 + 0.5 + k = 1$.
  2. Solving for $k$: $0.7 + k = 1 \implies k = 0.3$.
  3. The event $X < 3$ includes the values $X=1$ and $X=2$.
  4. Summing these probabilities: $P(X < 3) = P(X=1) + P(X=2) = 0.2 + 0.5 = 0.7$.

Answer: k=0.3, P(X < 3)=0.7

L28. Probability mass functions; the CDF

Module 2  2026-09-01  ·  13:59  ·  practice PDF

Practice problems (3)
Problem 1. A random variable $X$ has the following pmf: $p(0) = 0.7$, $p(1) = 0.2$, and $p(2) = 0.1$. Find the values of the cdf $F(0)$, $F(1)$, and $F(2)$.
Reveal solution
  1. Step 1: $F(0) = p(0) = 0.7$.
  2. Step 2: $F(1) = p(0) + p(1) = 0.7 + 0.2 = 0.9$.
  3. Step 3: $F(2) = p(0) + p(1) + p(2) = 0.7 + 0.2 + 0.1 = 1.0$.

Answer: F(0)=0.7, F(1)=0.9, F(2)=1.0

Problem 2. Given a cdf $F(x)$ where $F(1) = 0.3$, $F(2) = 0.8$, and $F(3) = 1.0$, find the probability $P(1 < X \le 3)$.
Reveal solution
  1. Step 1: Use the formula $P(a < X \le b) = F(b) - F(a)$.
  2. Step 2: Substitute $a = 1$ and $b = 3$.
  3. Step 3: $P(1 < X \le 3) = F(3) - F(1) = 1.0 - 0.3 = 0.7$.

Answer: 0.7

Problem 3. A discrete random variable $Y$ has a cdf defined by $F(y) = 0.2$ for $0 \le y < 1$, $F(y) = 0.5$ for $1 \le y < 2$, and $F(y) = 1.0$ for $y \ge 2$. Find the pmf $p(y)$ for $y = 0, 1, 2$.
Reveal solution
  1. Step 1: $p(0) = F(0) - 0 = 0.2 - 0 = 0.2$.
  2. Step 2: $p(1) = F(1) - F(0) = 0.5 - 0.2 = 0.3$.
  3. Step 3: $p(2) = F(2) - F(1) = 1.0 - 0.5 = 0.5$.

Answer: p(0)=0.2, p(1)=0.3, p(2)=0.5

L29. Expectation I — the centre of mass

Module 2  2026-09-02  ·  13:48  ·  practice PDF

Practice problems (3)
Problem 1. A random variable $X$ has the following probability mass function: $P(X=10)=0.2$, $P(X=20)=0.5$, and $P(X=30)=0.3$. Calculate $E[X]$.
Reveal solution
  1. Identify the values $x_i$ and their probabilities $p_i$: $(10, 0.2), (20, 0.5), (30, 0.3)$.
  2. Apply the expectation formula: $E[X] = 10(0.2) + 20(0.5) + 30(0.3)$.
  3. Compute each term: $2 + 10 + 9$.
  4. Sum the terms: $21$.

Answer: 21

Problem 2. In a game, you flip a fair coin. If it is heads, you win $5$. If it is tails, you lose $2$. What is the expected value of your winnings per game?
Reveal solution
  1. The possible outcomes are $x_1 = 5$ and $x_2 = -2$.
  2. Since the coin is fair, $P(X=5) = 0.5$ and $P(X=-2) = 0.5$.
  3. Calculate the expectation: $E[X] = 5(0.5) + (-2)(0.5)$.
  4. Simplify: $2.5 - 1.0 = 1.5$.

Answer: 1.5

Problem 3. A discrete random variable $X$ takes values $1, 2, 3, 4$ with probabilities $0.1, 0.3, 0.4, 0.2$ respectively. If we define a new random variable $Y = 2X + 3$, find $E[Y]$ using the values of $X$.
Reveal solution
  1. First, find $E[X]$: $E[X] = 1(0.1) + 2(0.3) + 3(0.4) + 4(0.2)$.
  2. Compute $E[X]$: $0.1 + 0.6 + 1.2 + 0.8 = 2.7$.
  3. Determine the values of $Y$ for each $X$: $Y$ takes values $2(1)+3=5, 2(2)+3=7, 2(3)+3=9, 2(4)+3=11$.
  4. Calculate $E[Y]$ using the same probabilities: $E[Y] = 5(0.1) + 7(0.3) + 9(0.4) + 11(0.2)$.
  5. Compute $E[Y]$: $0.5 + 2.1 + 3.6 + 2.2 = 8.4$.

Answer: 8.4

L30. Expectation II — linearity, the superpower

Module 2  2026-09-03  ·  13:18  ·  practice PDF

Practice problems (3)
Problem 1. A hand of 5 cards is dealt from a standard 52-card deck. What is the expected number of aces in the hand?
Reveal solution
  1. Define $I_i$ as the indicator variable that the $i$-th card is an ace for $i=1, \dots, 5$.
  2. The probability that any single card is an ace is $P(I_i = 1) = \frac{4}{52} = \frac{1}{13}$.
  3. The expected value of each indicator is $E[I_i] = \frac{1}{13}$.
  4. By linearity of expectation, the total expected number of aces is $E[X] = \sum_{i=1}^5 E[I_i] = 5 \cdot \frac{1}{13} = \frac{5}{13}$.

Answer: $\frac{5}{13}$

Problem 2. You roll a fair 6-sided die 30 times. You win 2 dollars for every 6 rolled and lose 1 dollar for every 1 rolled. What are your expected total winnings?
Reveal solution
  1. Let $X$ be the number of 6s and $Y$ be the number of 1s.
  2. The total winnings are $W = 2X - 1Y$.
  3. The expected number of 6s in 30 rolls is $E[X] = 30 \cdot \frac{1}{6} = 5$.
  4. The expected number of 1s in 30 rolls is $E[Y] = 30 \cdot \frac{1}{6} = 5$.
  5. By linearity, $E[W] = 2E[X] - 1E[Y] = 2(5) - 1(5) = 10 - 5 = 5$.

Answer: $5$

Problem 3. In a group of 10 people, what is the expected number of pairs of people who share the same birth-month? (Assume each month is equally likely).
Reveal solution
  1. There are $\binom{10}{2} = \frac{10 \cdot 9}{2} = 45$ possible pairs of people.
  2. For any specific pair, the probability they share a birth-month is $\frac{12}{12 \cdot 12} = \frac{1}{12}$.
  3. Let $I_{ij}$ be the indicator that pair $(i, j)$ shares a month. $E[I_{ij}] = \frac{1}{12}$.
  4. The total number of pairs $X$ is the sum of all 45 indicators.
  5. By linearity, $E[X] = 45 \cdot \frac{1}{12} = \frac{45}{12} = 3.75$.

Answer: $3.75$

L31. Variance and standard deviation

Module 2  2026-09-04  ·  13:12  ·  practice PDF

Practice problems (3)
Problem 1. A random variable $X$ has the following probability distribution: $P(X=1)=0.2$, $P(X=2)=0.5$, and $P(X=3)=0.3$. Calculate the variance and standard deviation of $X$.
Reveal solution
  1. First, find the expected value: $E[X] = 1(0.2) + 2(0.5) + 3(0.3) = 0.2 + 1.0 + 0.9 = 2.1$.
  2. Next, find the squared deviations: $(1-2.1)^2 = 1.21$, $(2-2.1)^2 = 0.01$, $(3-2.1)^2 = 0.81$.
  3. Weight these by probabilities: $1.21(0.2) + 0.01(0.5) + 0.81(0.3) = 0.242 + 0.005 + 0.243 = 0.49$.
  4. The variance is $0.49$.
  5. The standard deviation is $\sqrt{0.49} = 0.7$.

Answer: \text{Var}(X) = 0.49, \sigma = 0.7

Problem 2. Using the computational shortcut $\text{Var}(X) = E[X^2] - (E[X])^2$, find the variance of a random variable $X$ where $P(X=0)=0.4$, $P(X=10)=0.4$, and $P(X=20)=0.2$.
Reveal solution
  1. Calculate $E[X] = 0(0.4) + 10(0.4) + 20(0.2) = 0 + 4 + 4 = 8$.
  2. Calculate $E[X^2] = 0^2(0.4) + 10^2(0.4) + 20^2(0.2) = 0 + 40 + 80 = 120$.
  3. Apply the shortcut: $\text{Var}(X) = 120 - 8^2 = 120 - 64 = 56$.

Answer: \text{Var}(X) = 56

Problem 3. If a random variable $X$ has a variance of $0$, what can you conclude about the values $X$ can take and its probability mass function?
Reveal solution
  1. The variance is defined as $\sum (x - E[X])^2 P(X=x)$.
  2. Since $(x - E[X])^2$ is always non-negative and $P(X=x)$ is non-negative, the sum can only be zero if every term is zero.
  3. This means for every $x$ where $P(X=x) > 0$, we must have $x = E[X]$.
  4. Therefore, $X$ must be a constant random variable that takes only one value with probability $1$.

Answer: X is a constant; $P(X=E[X]) = 1$.

L32. The Bernoulli and binomial distributions

Module 2  2026-09-05  ·  12:28  ·  practice PDF

Practice problems (3)
Problem 1. A fair six-sided die is rolled $6$ times. What is the probability of rolling exactly $2$ sixes?
Reveal solution
  1. Identify parameters: $n = 6$, $p = 1/6$, $k = 2$.
  2. Use the binomial formula: $P(X=2) = \binom{6}{2} (1/6)^2 (5/6)^{6-2}$.
  3. Calculate the combination: $\binom{6}{2} = 15$.
  4. Calculate the powers: $(1/6)^2 = 1/36$ and $(5/6)^4 = 625/1296$.
  5. Multiply together: $15 \cdot (1/36) \cdot (625/1296) = 9375 / 46656 \approx 0.2009$.

Answer: 0.2009

Problem 2. A factory produces lightbulbs with a $3\%$ defect rate. If a random sample of $20$ bulbs is tested, what is the expected number of defective bulbs and the variance?
Reveal solution
  1. Identify parameters: $n = 20$, $p = 0.03$.
  2. Calculate mean: $E[X] = np = 20 \cdot 0.03 = 0.6$.
  3. Calculate variance: $\text{Var}(X) = np(1-p) = 20 \cdot 0.03 \cdot 0.97$.
  4. Compute the product: $0.6 \cdot 0.97 = 0.582$.

Answer: E[X] = 0.6, \text{Var}(X) = 0.582

Problem 3. A multiple-choice test has $10$ questions, each with $4$ options. If a student guesses randomly on every question, what is the probability they get exactly $3$ correct?
Reveal solution
  1. Identify parameters: $n = 10$, $p = 1/4 = 0.25$, $k = 3$.
  2. Use the binomial formula: $P(X=3) = \binom{10}{3} (0.25)^3 (0.75)^7$.
  3. Calculate the combination: $\binom{10}{3} = 120$.
  4. Calculate the powers: $(0.25)^3 = 0.015625$ and $(0.75)^7 \approx 0.13348$.
  5. Multiply together: $120 \cdot 0.015625 \cdot 0.13348 \approx 0.2503$.

Answer: 0.2503

L33. Binomial in action: quality control, polling, streaks

Module 2  2026-09-06  ·  16:21  ·  practice PDF

Practice problems (3)
Problem 1. A factory produces lightbulbs with a $10\%$ defect rate. If a random sample of $15$ bulbs is chosen, what is the probability that exactly $2$ are defective?
Reveal solution
  1. Identify parameters: $n=15$, $p=0.1$, $k=2$.
  2. Apply the binomial formula: $P(X=2) = \binom{15}{2} (0.1)^2 (0.9)^{13}$.
  3. Compute the combination: $\binom{15}{2} = \frac{15 \times 14}{2} = 105$.
  4. Compute the powers: $(0.1)^2 = 0.01$ and $(0.9)^{13} \approx 0.2542$.
  5. Multiply the results: $105 \times 0.01 \times 0.2542 \approx 0.2669$.

Answer: 0.2669

Problem 2. A basketball player makes $70\%$ of their free throws. If they take $6$ shots, what is the probability they make at least $5$?
Reveal solution
  1. Identify parameters: $n=6$, $p=0.7$.
  2. We need $P(X \ge 5) = P(X=5) + P(X=6)$.
  3. Calculate $P(X=5) = \binom{6}{5} (0.7)^5 (0.3)^1 = 6 \times 0.16807 \times 0.3 = 0.3025$.
  4. Calculate $P(X=6) = \binom{6}{6} (0.7)^6 (0.3)^0 = 1 \times 0.1176 \times 1 = 0.1176$.
  5. Sum the probabilities: $0.3025 + 0.1176 = 0.4201$.

Answer: 0.4201

Problem 3. A software company finds that $5\%$ of its users encounter a specific bug. In a random sample of $100$ users, what is the expected number of users who encounter the bug, and what is the standard deviation?
Reveal solution
  1. Identify parameters: $n=100$, $p=0.05$.
  2. Calculate expectation: $E[X] = np = 100 \times 0.05 = 5$.
  3. Calculate variance: $\text{Var}(X) = np(1-p) = 100 \times 0.05 \times 0.95 = 4.75$.
  4. Calculate standard deviation: $\sigma = \sqrt{4.75} \approx 2.1794$.

Answer: E[X]=5, \sigma \approx 2.1794

L34. The geometric distribution — waiting for success

Module 2  2026-09-07  ·  12:45  ·  practice PDF

Practice problems (3)
Problem 1. A fair coin is flipped repeatedly. What is the probability that the first head appears on the 4th flip?
Reveal solution
  1. Identify the probability of success $p = 0.5$ and the trial number $k = 4$.
  2. Use the geometric PMF: $P(X=4) = (1-0.5)^{4-1} \cdot 0.5$.
  3. Calculate $(0.5)^3 \cdot 0.5 = 0.125 \cdot 0.5 = 0.0625$.

Answer: 0.0625

Problem 2. A software bug occurs randomly with a probability of $0.05$ per day. What is the probability that the first bug is detected within the first 10 days?
Reveal solution
  1. Identify $p = 0.05$ and $k = 10$.
  2. Use the cumulative formula: $P(X \le 10) = 1 - (1-0.05)^{10}$.
  3. Calculate $1 - (0.95)^{10} \approx 1 - 0.5987 = 0.4013$.

Answer: 0.4013

Problem 3. An archer hits a target with probability $0.3$. What is the expected number of shots they must take to hit the target for the first time, and what is the probability they take more than 5 shots?
Reveal solution
  1. The expected value is $E[X] = 1/p = 1/0.3 \approx 3.33$.
  2. The probability of taking more than 5 shots is the probability of failing the first 5 shots: $P(X > 5) = (1-0.3)^5$.
  3. Calculate $(0.7)^5 = 0.16807$.

Answer: E[X] \approx 3.33, P(X > 5) \approx 0.1681

L35. The negative binomial distribution

Module 2  2026-09-08  ·  14:07  ·  practice PDF

Practice problems (3)
Problem 1. A basketball player has a success rate of $0.3$ for three-point shots. What is the probability that their $4$th successful shot occurs on their $7$th attempt?
Reveal solution
  1. Identify parameters: $r = 4$, $k = 7$, and $p = 0.3$.
  2. Use the negative binomial formula: $P(X=7) = \binom{7-1}{4-1} (0.3)^4 (1-0.3)^{7-4}$.
  3. Calculate the combination: $\binom{6}{3} = 20$.
  4. Calculate the powers: $(0.3)^4 = 0.0081$ and $(0.7)^3 = 0.343$.
  5. Multiply together: $20 \cdot 0.0081 \cdot 0.343 = 0.055566$.

Answer: 0.0556

Problem 2. A software tester finds a critical bug in a module with probability $0.2$ per test case. How many test cases should the tester expect to run to find $6$ critical bugs?
Reveal solution
  1. Identify parameters: $r = 6$ and $p = 0.2$.
  2. Use the expected value formula for the negative binomial distribution: $E[X] = \frac{r}{p}$.
  3. Substitute the values: $E[X] = \frac{6}{0.2}$.
  4. Calculate the result: $6 \div 0.2 = 30$.

Answer: 30

Problem 3. A fair coin is flipped until $3$ tails appear. What is the probability that this happens on the $6$th flip?
Reveal solution
  1. Identify parameters: $r = 3$, $k = 6$, and $p = 0.5$.
  2. Use the formula: $P(X=6) = \binom{6-1}{3-1} (0.5)^3 (0.5)^{6-3}$.
  3. Calculate the combination: $\binom{5}{2} = 10$.
  4. Calculate the powers: $(0.5)^3 \cdot (0.5)^3 = (0.5)^6 = 0.015625$.
  5. Multiply together: $10 \cdot 0.015625 = 0.15625$.

Answer: 0.1563

L36. The Poisson distribution I — the law of rare events

Module 2  2026-09-09  ·  13:20  ·  practice PDF

Practice problems (3)
Problem 1. A small town's fire department receives an average of $3.5$ emergency calls per hour. What is the probability that they receive exactly $2$ calls in a given hour?
Reveal solution
  1. Identify the rate $\lambda = 3.5$ and the number of events $k = 2$.
  2. Apply the Poisson formula: $P(X=2) = \frac{3.5^2 e^{-3.5}}{2!}$.
  3. Calculate $3.5^2 = 12.25$ and $2! = 2$.
  4. Compute $P(X=2) = \frac{12.25 \times 0.0302}{2} \approx 0.1850$.

Answer: 0.1850

Problem 2. A book has an average of $0.2$ typos per page. What is the probability that a randomly selected $5$-page section contains exactly $1$ typo?
Reveal solution
  1. First, scale the rate to the $5$-page interval: $\lambda = 0.2 \times 5 = 1$.
  2. Identify $k = 1$.
  3. Apply the formula: $P(X=1) = \frac{1^1 e^{-1}}{1!}$.
  4. Simplify to $e^{-1} \approx 0.3679$.

Answer: 0.3679

Problem 3. A website receives an average of $4$ hits per minute. What is the probability that the website receives more than $1$ hit in a given minute?
Reveal solution
  1. Identify $\lambda = 4$. We want $P(X > 1)$.
  2. Use the complement: $P(X > 1) = 1 - [P(X=0) + P(X=1)]$.
  3. Calculate $P(X=0) = \frac{4^0 e^{-4}}{0!} = e^{-4} \approx 0.0183$.
  4. Calculate $P(X=1) = \frac{4^1 e^{-4}}{1!} = 4 e^{-4} \approx 0.0733$.
  5. Sum the probabilities: $0.0183 + 0.0733 = 0.0916$.
  6. Subtract from one: $1 - 0.0916 = 0.9084$.

Answer: 0.9084

L37. The Poisson distribution II — as binomial's limit

Module 2  2026-09-10  ·  15:38  ·  practice PDF

Practice problems (3)
Problem 1. A manufacturer finds that $0.4\%$ of their components are defective. In a random sample of $500$ components, what is the probability that exactly $2$ are defective? Use the Poisson approximation.
Reveal solution
  1. Identify $n = 500$ and $p = 0.004$.
  2. Calculate $\lambda = np = 500 \times 0.004 = 2$.
  3. Use the Poisson PMF for $k = 2$: $P(X=2) = \frac{2^2 e^{-2}}{2!}$.
  4. Compute $P(X=2) = \frac{4 \times 0.1353}{2} = 0.2707$.

Answer: 0.2707

Problem 2. A rare side effect occurs in $0.1\%$ of patients taking a medication. In a group of $2000$ patients, what is the probability that $3$ or fewer patients experience the side effect? Use the Poisson approximation.
Reveal solution
  1. Identify $n = 2000$ and $p = 0.001$.
  2. Calculate $\lambda = np = 2000 \times 0.001 = 2$.
  3. Find $P(X \le 3) = P(X=0) + P(X=1) + P(X=2) + P(X=3)$.
  4. Calculate each: $P(0) = e^{-2} \approx 0.1353$, $P(1) = 2e^{-2} \approx 0.2707$, $P(2) = \frac{4e^{-2}}{2} \approx 0.2707$, $P(3) = \frac{8e^{-2}}{6} \approx 0.1804$.
  5. Sum them: $0.1353 + 0.2707 + 0.2707 + 0.1804 = 0.8571$.

Answer: 0.8571

Problem 3. A lottery ticket has a $1$ in $10,000$ chance of winning a small prize. If you buy $10,000$ tickets, what is the probability that you win exactly $1$ prize? Compare the Poisson approximation to the exact Binomial result.
Reveal solution
  1. For Poisson: $n = 10,000, p = 0.0001 \implies \lambda = 1$.
  2. Calculate $P(X=1) = \frac{1^1 e^{-1}}{1!} = e^{-1} \approx 0.3679$.
  3. For Binomial: $P(X=1) = \binom{10000}{1} (0.0001)^1 (0.9999)^{9999}$.
  4. Calculate $10000 \times 0.0001 \times (0.9999)^{9999} = 1 \times 0.36788 \approx 0.3679$.
  5. The results are nearly identical.

Answer: 0.3679

L38. The hypergeometric distribution

Module 2  2026-09-11  ·  13:32  ·  practice PDF

Practice problems (3)
Problem 1. A box contains 15 lightbulbs, 3 of which are defective. If 4 bulbs are chosen at random without replacement, what is the probability that exactly 1 is defective?
Reveal solution
  1. Identify parameters: $N=15$, $K=3$, $n=4$, $k=1$.
  2. Calculate ways to pick 1 defective: $\binom{3}{1} = 3$.
  3. Calculate ways to pick 3 non-defective: $\binom{12}{3} = \frac{12 \times 11 \times 10}{3 \times 2 \times 1} = 220$.
  4. Calculate total ways to pick 4 bulbs: $\binom{15}{4} = \frac{15 \times 14 \times 13 \times 12}{4 \times 3 \times 2 \times 1} = 1365$.
  5. Compute probability: $P(X=1) = \frac{3 \times 220}{1365} = \frac{660}{1365} \approx 0.4835$.

Answer: 0.4835

Problem 2. In a group of 12 students, 5 are seniors and 7 are juniors. If a committee of 3 is chosen at random, what is the probability that the committee contains at least 2 seniors?
Reveal solution
  1. Identify parameters: $N=12$, $K=5$, $n=3$. We need $P(X \ge 2) = P(X=2) + P(X=3)$.
  2. For $k=2$: $P(X=2) = \frac{\binom{5}{2} \binom{7}{1}}{\binom{12}{3}} = \frac{10 \times 7}{220} = \frac{70}{220}$.
  3. For $k=3$: $P(X=3) = \frac{\binom{5}{3} \binom{7}{0}}{\binom{12}{3}} = \frac{10 \times 1}{220} = \frac{10}{220}$.
  4. Sum the probabilities: $\frac{70}{220} + \frac{10}{220} = \frac{80}{220} \approx 0.3636$.

Answer: 0.3636

Problem 3. A deck of 20 cards has 6 red cards and 14 black cards. If 5 cards are drawn without replacement, what is the probability that exactly 3 are red?
Reveal solution
  1. Identify parameters: $N=20$, $K=6$, $n=5$, $k=3$.
  2. Calculate ways to pick 3 red: $\binom{6}{3} = 20$.
  3. Calculate ways to pick 2 black: $\binom{14}{2} = \frac{14 \times 13}{2} = 91$.
  4. Calculate total ways to pick 5 cards: $\binom{20}{5} = 15504$.
  5. Compute probability: $P(X=3) = \frac{20 \times 91}{15504} = \frac{1820}{15504} \approx 0.1174$.

Answer: 0.1174

L39. Expected value clinic: the coupon collector

Module 2  2026-09-12  ·  12:50  ·  practice PDF

Practice problems (3)
Problem 1. You are collecting a set of $n=3$ unique stickers. What is the expected number of draws to collect all three?
Reveal solution
  1. Identify $n=3$.
  2. Calculate the 3rd harmonic number: $H_3 = 1 + 1/2 + 1/3 = 11/6$.
  3. Multiply by $n$: $E[T] = 3 \times (11/6) = 11/2 = 5.5$.

Answer: 5.5

Problem 2. A game has $n=5$ different character cards. If you already own 3 distinct characters, what is the expected number of additional cards you need to buy to complete the set?
Reveal solution
  1. You need the 4th and 5th characters.
  2. The probability of getting the 4th is $p_4 = (5-3)/5 = 2/5$. Expected time $E[T_4] = 5/2 = 2.5$.
  3. The probability of getting the 5th is $p_5 = (5-4)/5 = 1/5$. Expected time $E[T_5] = 5/1 = 5$.
  4. Total additional time is $2.5 + 5 = 7.5$.

Answer: 7.5

Problem 3. For a set of $n$ items, the expected time is $E[T] = n H_n$. If $n=100$, use the approximation $H_n \approx \ln(n) + 0.577$ to estimate the expected number of draws.
Reveal solution
  1. Substitute $n=100$ into the approximation: $H_{100} \approx \ln(100) + 0.577$.
  2. Calculate $\ln(100) \approx 4.605$.
  3. Sum them: $H_{100} \approx 4.605 + 0.577 = 5.182$.
  4. Multiply by $n$: $E[T] \approx 100 \times 5.182 = 518.2$.

Answer: 518.2

L40. Module 2 review + self-test

Module 2  2026-09-13  ·  13:36  ·  practice PDF

Practice problems (3)
Problem 1. A fair six-sided die is rolled 12 times. What is the probability of rolling exactly 3 sixes?
Reveal solution
  1. Identify parameters: $n=12$, $p=1/6$, $k=3$.
  2. Use Binomial PMF: $P(X=3) = \binom{12}{3} (1/6)^3 (5/6)^9$.
  3. Compute $\binom{12}{3} = 220$.
  4. Compute $(1/6)^3 \approx 0.00463$ and $(5/6)^9 \approx 0.1938$.
  5. Multiply: $220 \times 0.00463 \times 0.1938 \approx 0.1974$.

Answer: 0.1974

Problem 2. A bakery sells an average of 3 specialty cakes per day. What is the probability they sell 5 cakes tomorrow?
Reveal solution
  1. Identify as a Poisson process with $\lambda = 3$.
  2. We want $P(X=5)$.
  3. Use Poisson PMF: $P(X=5) = \frac{3^5 e^{-3}}{5!}$.
  4. Compute $3^5 = 243$ and $5! = 120$.
  5. Compute $e^{-3} \approx 0.0498$.
  6. Calculate: $(243 \times 0.0498) / 120 \approx 0.1008$.

Answer: 0.1008

Problem 3. A committee of 5 people is chosen from a group of 10 men and 8 women. What is the probability that exactly 3 women are chosen?
Reveal solution
  1. Identify as Hypergeometric: $N=18$, $K=8$ (women), $n=5$, $k=3$.
  2. Use formula: $P(X=3) = \frac{\binom{8}{3} \binom{10}{2}}{\binom{18}{5}}$.
  3. Compute $\binom{8}{3} = 56$ and $\binom{10}{2} = 45$.
  4. Compute $\binom{18}{5} = 8568$.
  5. Calculate: $(56 \times 45) / 8568 = 2520 / 8568 \approx 0.2941$.

Answer: 0.2941

Module 3 — Continuous Random Variables (14/14)

L41. From bars to curves: probability density

Module 3  2026-09-14  ·  14:02  ·  practice PDF

Practice problems (3)
Problem 1. Given the function $f(x) = \frac{3}{8}x^2$ for $0 \le x \le 2$ and $0$ otherwise, show that it is a valid probability density function and find $P(1 \le X \le 2)$.
Reveal solution
  1. Check non-negativity: $x^2$ is always non-negative, so $f(x) \ge 0$.
  2. Check total area: $\int_{0}^{2} \frac{3}{8}x^2 \, dx = [\frac{1}{8}x^3]_{0}^{2} = \frac{8}{8} - 0 = 1$.
  3. Compute probability: $P(1 \le X \le 2) = \int_{1}^{2} \frac{3}{8}x^2 \, dx = [\frac{1}{8}x^3]_{1}^{2} = \frac{8}{8} - \frac{1}{8} = \frac{7}{8}$.

Answer: 0.875

Problem 2. A continuous random variable has the PDF $f(x) = c(4x - 2x^2)$ for $0 \le x \le 2$ and $0$ otherwise. Find the value of the constant $c$ that makes this a valid PDF.
Reveal solution
  1. Set the total integral to 1: $\int_{0}^{2} c(4x - 2x^2) \, dx = 1$.
  2. Integrate: $c [2x^2 - \frac{2}{3}x^3]_{0}^{2} = 1$.
  3. Evaluate: $c (2(4) - \frac{2}{3}(8)) = c (8 - \frac{16}{3}) = c (\frac{24-16}{3}) = c \frac{8}{3}$.
  4. Solve for $c$: $c \frac{8}{3} = 1 \implies c = \frac{3}{8}$.

Answer: 3/8

Problem 3. For a random variable with PDF $f(x) = \frac{1}{\pi(1+x^2)}$ for $-\infty < x < \infty$, find the probability $P(0 \le X \le 1)$.
Reveal solution
  1. Set up the integral: $P(0 \le X \le 1) = \int_{0}^{1} \frac{1}{\pi(1+x^2)} \, dx$.
  2. Recognize the antiderivative: $\int \frac{1}{1+x^2} \, dx = \arctan(x)$.
  3. Evaluate: $\frac{1}{\pi} [\arctan(x)]_{0}^{1} = \frac{1}{\pi} (\arctan(1) - \arctan(0))$.
  4. Substitute values: $\frac{1}{\pi} (\frac{\pi}{4} - 0) = \frac{1}{4}$.

Answer: 0.25

L42. The pdf and CDF; probabilities as integrals

Module 3  2026-09-15  ·  11:53  ·  practice PDF

Practice problems (3)
Problem 1. Given the PDF $f(x) = 3x^2$ for $0 \le x \le 1$ and $0$ otherwise, find the CDF $F(x)$.
Reveal solution
  1. For $x < 0$, $F(x) = 0$.
  2. For $0 \le x \le 1$, $F(x) = \int_{0}^{x} 3t^2 \, dt$.
  3. The antiderivative of $3t^2$ is $t^3$.
  4. Evaluating from $0$ to $x$ gives $x^3 - 0^3 = x^3$.
  5. For $x > 1$, $F(x) = 1$.

Answer: F(x) = x^3 \text{ for } 0 \le x \le 1

Problem 2. A random variable has the CDF $F(x) = 1 - e^{-x}$ for $x \ge 0$. Find the PDF $f(x)$ and calculate $P(1 \le X \le 2)$.
Reveal solution
  1. The PDF is the derivative of the CDF: $f(x) = \frac{d}{dx}(1 - e^{-x}) = e^{-x}$.
  2. The probability $P(1 \le X \le 2) = F(2) - F(1)$.
  3. Substitute values: $(1 - e^{-2}) - (1 - e^{-1})$.
  4. Simplify: $e^{-1} - e^{-2} \approx 0.3679 - 0.1353 = 0.2326$.

Answer: f(x) = e^{-x}, P(1 \le X \le 2) \approx 0.2326

Problem 3. A PDF is given by $f(x) = \frac{1}{2}x$ for $0 \le x \le 2$. Find the value of $m$ such that $P(X \le m) = 0.5$ (the median).
Reveal solution
  1. First, find the CDF $F(x) = \int_{0}^{x} \frac{1}{2}t \, dt = [\frac{1}{4}t^2]_{0}^{x} = \frac{1}{4}x^2$.
  2. We want to find $m$ such that $F(m) = 0.5$.
  3. Set up the equation: $\frac{1}{4}m^2 = 0.5$.
  4. Multiply by 4: $m^2 = 2$.
  5. Solve for $m$: $m = \sqrt{2} \approx 1.414$.

Answer: m = \sqrt{2} \approx 1.414

L43. Expectation and variance of continuous variables

Module 3  2026-09-16  ·  13:15  ·  practice PDF

Practice problems (3)
Problem 1. A continuous random variable $X$ has the PDF $f(x) = \frac{3}{2}x^2$ for $0 \le x \le 1$ and $0$ otherwise. Find the mean $E[X]$ and the variance $Var(X)$.
Reveal solution
  1. Compute the mean: $E[X] = \int_{0}^{1} x(\frac{3}{2}x^2) \, dx = \int_{0}^{1} \frac{3}{2}x^3 \, dx = [\frac{3}{8}x^4]_{0}^{1} = \frac{3}{8}$.
  2. Compute the second moment: $E[X^2] = \int_{0}^{1} x^2(\frac{3}{2}x^2) \, dx = \int_{0}^{1} \frac{3}{2}x^4 \, dx = [\frac{3}{10}x^5]_{0}^{1} = \frac{3}{10}$.
  3. Compute variance: $Var(X) = E[X^2] - (E[X])^2 = \frac{3}{10} - (\frac{3}{8})^2 = \frac{3}{10} - \frac{9}{64}$.
  4. Find common denominator: $\frac{96}{320} - \frac{45}{320} = \frac{51}{320}$.

Answer: E[X] = \frac{3}{8}, Var(X) = \frac{51}{320}

Problem 2. A random variable $X$ has a PDF $f(x) = 2 - 2x$ for $0 \le x \le 1$. Calculate the expectation $E[X]$.
Reveal solution
  1. Set up the integral: $E[X] = \int_{0}^{1} x(2 - 2x) \, dx$.
  2. Expand the integrand: $\int_{0}^{1} (2x - 2x^2) \, dx$.
  3. Integrate: $[x^2 - \frac{2}{3}x^3]_{0}^{1}$.
  4. Evaluate: $1 - \frac{2}{3} = \frac{1}{3}$.

Answer: E[X] = \frac{1}{3}

Problem 3. For a random variable $X$ with PDF $f(x) = \frac{1}{2}e^{-x/2}$ for $x \ge 0$, find the variance $Var(X)$.
Reveal solution
  1. Find $E[X]$ using integration by parts: $\int_{0}^{\infty} x \frac{1}{2}e^{-x/2} \, dx = 2$.
  2. Find $E[X^2]$ using integration by parts twice: $\int_{0}^{\infty} x^2 \frac{1}{2}e^{-x/2} \, dx = 8$.
  3. Apply variance formula: $Var(X) = E[X^2] - (E[X])^2 = 8 - 2^2 = 8 - 4 = 4$.

Answer: Var(X) = 4

L44. The uniform distribution

Module 3  2026-09-17  ·  12:10  ·  practice PDF

Practice problems (3)
Problem 1. A random variable $X$ is uniformly distributed on the interval $[5, 15]$. Find the probability $P(8 \le X \le 12)$.
Reveal solution
  1. Identify the parameters: $a = 5$ and $b = 15$.
  2. Calculate the total width: $b - a = 15 - 5 = 10$.
  3. Calculate the target width: $12 - 8 = 4$.
  4. The probability is the ratio of the target width to the total width: $4 / 10 = 0.4$.

Answer: 0.4

Problem 2. Find the mean and variance of a uniform random variable $X$ distributed on the interval $[10, 20]$.
Reveal solution
  1. The mean is the average of the endpoints: $E[X] = (10 + 20) / 2 = 30 / 2 = 15$.
  2. The variance is the square of the width divided by 12: $Var(X) = (20 - 10)^2 / 12$.
  3. Compute the square: $10^2 = 100$.
  4. Divide by 12: $100 / 12 = 25 / 3 \approx 8.33$.

Answer: E[X] = 15, Var(X) = 8.33

Problem 3. A uniform random variable $X$ on the interval $[a, b]$ has a mean of 10 and a variance of 3. Find the values of $a$ and $b$.
Reveal solution
  1. From the mean: $(a + b) / 2 = 10 \implies a + b = 20$.
  2. From the variance: $(b - a)^2 / 12 = 3 \implies (b - a)^2 = 36$.
  3. Taking the square root: $b - a = 6$.
  4. Solve the system: $a + b = 20$ and $b - a = 6$. Adding the equations gives $2b = 26$, so $b = 13$.
  5. Subtracting gives $2a = 14$, so $a = 7$.

Answer: a = 7, b = 13

L45. The exponential distribution — memorylessness

Module 3  2026-09-18  ·  14:57  ·  practice PDF

Practice problems (3)
Problem 1. A lightbulb has a mean lifetime of $100$ hours. Assuming the lifetime follows an exponential distribution, what is the probability that the bulb lasts more than $150$ hours?
Reveal solution
  1. Identify the mean $E[X] = 100$.
  2. Calculate the rate $\lambda = 1/100 = 0.01$.
  3. Use the survival function $P(X > x) = e^{-\lambda x}$.
  4. Substitute $x = 150$ and $\lambda = 0.01$: $P(X > 150) = e^{-0.01 \cdot 150} = e^{-1.5}$.

Answer: $e^{-1.5} \approx 0.2231$

Problem 2. The time between arrivals of emails to a server follows an exponential distribution with a rate of $\lambda = 2$ emails per minute. What is the probability that the next email arrives within the first $30$ seconds?
Reveal solution
  1. Convert the time to minutes to match the rate: $30$ seconds $= 0.5$ minutes.
  2. Use the CDF $F(x) = 1 - e^{-\lambda x}$.
  3. Substitute $\lambda = 2$ and $x = 0.5$: $F(0.5) = 1 - e^{-2 \cdot 0.5} = 1 - e^{-1}$.

Answer: $1 - e^{-1} \approx 0.6321$

Problem 3. A radioactive isotope has a mean decay time of $500$ years. Given that a specific atom has already survived for $200$ years, what is the probability it will survive for at least another $500$ years?
Reveal solution
  1. Identify the mean $E[X] = 500$, so $\lambda = 1/500$.
  2. Recognize the memoryless property: $P(X > 200 + 500 \mid X > 200) = P(X > 500)$.
  3. Calculate $P(X > 500) = e^{-\lambda \cdot 500} = e^{-(1/500) \cdot 500} = e^{-1}$.

Answer: $e^{-1} \approx 0.3679$

L46. Exponential and Poisson: two views of one process

Module 3  2026-09-19  ·  13:08  ·  practice PDF

Practice problems (3)
Problem 1. A computer server crashes an average of $2$ times per month. What is the probability that the server goes at least $3$ months without a crash?
Reveal solution
  1. Identify the rate $\lambda = 2$ crashes per month.
  2. We want the probability that the time until the first crash $T$ is greater than $3$.
  3. Use the exponential survival function $P(T > t) = e^{-\lambda t}$.
  4. Substitute $\lambda = 2$ and $t = 3$ to get $e^{-(2)(3)} = e^{-6}$.

Answer: $e^{-6} \approx 0.0025$

Problem 2. Customers arrive at a bank at a rate of $12$ per hour. What is the probability that exactly $4$ customers arrive in a $15$-minute interval?
Reveal solution
  1. Convert the rate to the given time unit: $\lambda = 12$ per hour is $3$ per $15$ minutes.
  2. Alternatively, $\mu = \lambda t = 12 \times (15/60) = 3$.
  3. Use the Poisson PMF for $k = 4$ and $\mu = 3$.
  4. Calculate $P(X=4) = \frac{e^{-3} 3^4}{4!} = \frac{81 e^{-3}}{24} = \frac{27}{8} e^{-3}$.

Answer: \frac{27}{8} e^{-3} \approx 0.1680

Problem 3. A lightbulb fails at a rate of $0.1$ times per year. What is the probability that the second failure occurs after $20$ years?
Reveal solution
  1. The second failure occurs after $20$ years if and only if there are $0$ or $1$ failures in the first $20$ years.
  2. Calculate the expected number of failures: $\mu = \lambda t = 0.1 \times 20 = 2$.
  3. Use the Poisson distribution to find $P(X=0) + P(X=1)$.
  4. Compute $e^{-2} \frac{2^0}{0!} + e^{-2} \frac{2^1}{1!} = e^{-2} + 2e^{-2} = 3e^{-2}$.

Answer: $3e^{-2} \approx 0.4060$

L47. The normal distribution I — meet the bell curve

Module 3  2026-09-20  ·  13:27  ·  practice PDF

Practice problems (3)
Problem 1. A random variable $X$ follows a normal distribution with mean $\mu = 50$ and standard deviation $\sigma = 4$. Find the interval that contains the middle $95\%$ of the probability.
Reveal solution
  1. The empirical rule states that the middle $95\%$ of a normal distribution lies within 2 standard deviations of the mean.
  2. Calculate the lower bound: $50 - 2(4) = 50 - 8 = 42$.
  3. Calculate the upper bound: $50 + 2(4) = 50 + 8 = 58$.

Answer: [42, 58]

Problem 2. The weights of apples in an orchard are normally distributed with $\mu = 150$ grams and $\sigma = 12$ grams. What percentage of apples weigh more than $174$ grams?
Reveal solution
  1. First, find the z-score for $174$ grams: $z = (174 - 150) / 12 = 24 / 12 = 2$.
  2. The value $174$ is exactly 2 standard deviations above the mean.
  3. The empirical rule says $95\%$ of data is within 2 standard deviations, meaning $5\%$ is outside this range.
  4. Because the curve is symmetric, half of that $5\%$ is in the upper tail: $5\% / 2 = 2.5\%$.

Answer: 2.5%

Problem 3. A process produces parts with a normal distribution of diameters. The variance is $0.0016$ mm$^2$ and the mean is $10.00$ mm. If a part is rejected for being more than $3$ standard deviations from the mean, what is the range of acceptable diameters?
Reveal solution
  1. First, find the standard deviation $\sigma$ from the variance: $\sigma = \sqrt{0.0016} = 0.04$ mm.
  2. The acceptable range is $\mu \pm 3\sigma$.
  3. Lower bound: $10.00 - 3(0.04) = 10.00 - 0.12 = 9.88$ mm.
  4. Upper bound: $10.00 + 3(0.04) = 10.00 + 0.12 = 10.12$ mm.

Answer: [9.88, 10.12]

L48. The normal distribution II — why root two pi?

Module 3  2026-09-21  ·  12:33  ·  practice PDF

Practice problems (3)
Problem 1. Given a normal distribution with $\mu = 5$ and $\sigma = \sqrt{2}$, calculate the exact value of the normalization constant.
Reveal solution
  1. The normalization constant is given by the formula $\frac{1}{\sigma\sqrt{2\pi}}$
  2. Substitute $\sigma = \sqrt{2}$ into the formula: $\frac{1}{\sqrt{2}\sqrt{2\pi}}$
  3. Simplify the denominator: $\sqrt{2} \cdot \sqrt{2} \cdot \sqrt{\pi} = 2\sqrt{\pi}$
  4. The constant is $\frac{1}{2\sqrt{\pi}}$

Answer: $\frac{1}{2\sqrt{\pi}}$

Problem 2. If the standard deviation of a normal distribution is doubled, how does the maximum height of the PDF change?
Reveal solution
  1. The maximum height of the PDF occurs at $x = \mu$ and is equal to the constant $\frac{1}{\sigma\sqrt{2\pi}}$
  2. Let the original height be $H_1 = \frac{1}{\sigma\sqrt{2\pi}}$
  3. Let the new standard deviation be $\sigma' = 2\sigma$
  4. The new height is $H_2 = \frac{1}{2\sigma\sqrt{2\pi}} = \frac{1}{2} H_1$

Answer: The maximum height is halved.

Problem 3. Show that for any $\mu$ and $\sigma$, the integral $\int_{-\infty}^{\infty} \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} \, dx = 1$ using the substitution $u = \frac{x-\mu}{\sigma\sqrt{2}}$.
Reveal solution
  1. Start with the integral $I = \int_{-\infty}^{\infty} \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} \, dx$
  2. Apply substitution $u = \frac{x-\mu}{\sigma\sqrt{2}}$, which means $dx = \sigma\sqrt{2} \, du$
  3. Substitute into the integral: $I = \int_{-\infty}^{\infty} \frac{1}{\sigma\sqrt{2\pi}} e^{-u^2} (\sigma\sqrt{2} \, du)$
  4. Cancel $\sigma$ and simplify the constants: $I = \frac{\sqrt{2}}{\sqrt{2\pi}} \int_{-\infty}^{\infty} e^{-u^2} \, du = \frac{1}{\sqrt{\pi}} \int_{-\infty}^{\infty} e^{-u^2} \, du$
  5. Using the Gaussian integral result $\int_{-\infty}^{\infty} e^{-u^2} \, du = \sqrt{\pi}$, we get $I = \frac{1}{\sqrt{\pi}} \cdot \sqrt{\pi} = 1$

Answer: The integral equals 1.

L49. Standardisation and the z-table; 68-95-99.7

Module 3  2026-09-22  ·  13:24  ·  practice PDF

Practice problems (3)
Problem 1. A random variable $X$ follows a normal distribution with mean $\mu = 50$ and standard deviation $\sigma = 5$. Find the probability $P(X > 62)$.
Reveal solution
  1. Calculate the z-score: $z = \frac{62 - 50}{5} = \frac{12}{5} = 2.4$.
  2. Find the cumulative probability from the z-table: $P(Z < 2.4) \approx 0.9918$.
  3. Since we want the probability of being greater than 62, subtract from 1: $P(X > 62) = 1 - 0.9918 = 0.0082$.

Answer: 0.0082

Problem 2. For a normal distribution with $\mu = 100$ and $\sigma = 15$, use the empirical rule to estimate the probability that a value falls between 70 and 130.
Reveal solution
  1. Determine how many standard deviations 70 and 130 are from the mean.
  2. For 70: $z = \frac{70 - 100}{15} = -2$.
  3. For 130: $z = \frac{130 - 100}{15} = 2$.
  4. The empirical rule states that approximately 95.45% of data falls within 2 standard deviations.

Answer: 0.9545

Problem 3. A population is normally distributed with $\mu = 200$ and $\sigma = 20$. Find the value $x$ such that $P(X < x) = 0.025$.
Reveal solution
  1. Find the z-score that corresponds to a cumulative area of 0.025 in the z-table.
  2. The z-score for 0.025 is $z = -1.96$.
  3. Use the formula $x = \mu + z\sigma$.
  4. Calculate $x = 200 + (-1.96)(20) = 200 - 39.2 = 160.8$.

Answer: 160.8

L50. Normal computations clinic

Module 3  2026-09-23  ·  14:18  ·  practice PDF

Practice problems (3)
Problem 1. Apple weights are normally distributed with $\mu = 150$ g and $\sigma = 10$ g. Find the probability that a randomly selected apple weighs more than $165$ g.
Reveal solution
  1. Calculate the z-score: $z = (165 - 150) / 10 = 1.5$.
  2. Find the cumulative probability for $z = 1.5$ from the table: $P(Z < 1.5) = 0.9332$.
  3. Since we want the probability of weighing more, use the complement: $1 - 0.9332 = 0.0668$.

Answer: 0.0668

Problem 2. A battery's life is normally distributed with $\mu = 50$ hours and $\sigma = 5$ hours. What is the probability a battery lasts between $42$ and $58$ hours?
Reveal solution
  1. Calculate z-scores for both bounds: $z_1 = (42 - 50) / 5 = -1.6$ and $z_2 = (58 - 50) / 5 = 1.6$.
  2. Find cumulative probabilities: $P(Z < 1.6) = 0.9452$ and $P(Z < -1.6) = 0.0548$.
  3. Subtract the lower from the upper: $0.9452 - 0.0548 = 0.8904$.

Answer: 0.8904

Problem 3. IQ scores are normally distributed with $\mu = 100$ and $\sigma = 15$. What is the minimum score required to be in the top $2.5\%$ of the population?
Reveal solution
  1. The top $2.5\%$ means the area to the left is $1 - 0.025 = 0.975$.
  2. Find the z-score for $0.975$ in the table: $z = 1.96$.
  3. Use the inverse formula: $x = 100 + (1.96)(15)$.
  4. Calculate: $100 + 29.4 = 129.4$.

Answer: 129.4

L51. Transformations of random variables

Module 3  2026-09-24  ·  14:13  ·  practice PDF

Practice problems (3)
Problem 1. Let $X$ be a random variable uniformly distributed on $[0, 1]$. Find the PDF of $Y = X^3$.
Reveal solution
  1. The PDF of $X$ is $f_X(x) = 1$ for $0 \le x \le 1$.
  2. The range of $Y$ is $[0^3, 1^3] = [0, 1]$.
  3. The CDF of $Y$ is $F_Y(y) = P(X^3 \le y) = P(X \le y^{1/3}) = y^{1/3}$.
  4. The PDF is the derivative: $f_Y(y) = \frac{d}{dy} y^{1/3} = \frac{1}{3} y^{-2/3}$.

Answer: f_Y(y) = \frac{1}{3y^{2/3}} \text{ for } 0 < y \le 1

Problem 2. Let $X$ be uniformly distributed on $[0, 2]$. Find the PDF of $Y = e^X$.
Reveal solution
  1. The PDF of $X$ is $f_X(x) = 1/2$ for $0 \le x \le 2$.
  2. The range of $Y$ is $[e^0, e^2] = [1, e^2]$.
  3. The CDF of $Y$ is $F_Y(y) = P(e^X \le y) = P(X \le \ln y)$.
  4. Since $X$ is uniform on $[0, 2]$, $F_X(x) = x/2$. Thus $F_Y(y) = \frac{\ln y}{2}$.
  5. The PDF is $f_Y(y) = \frac{d}{dy} \frac{\ln y}{2} = \frac{1}{2y}$.

Answer: f_Y(y) = \frac{1}{2y} \text{ for } 1 \le y \le e^2

Problem 3. Let $X$ be uniformly distributed on $[1, 2]$. Find the PDF of $Y = 1/X$.
Reveal solution
  1. The PDF of $X$ is $f_X(x) = 1$ for $1 \le x \le 2$.
  2. The range of $Y$ is $[1/2, 1/1] = [1/2, 1]$.
  3. The CDF of $Y$ is $F_Y(y) = P(1/X \le y) = P(X \ge 1/y)$.
  4. This is $1 - P(X < 1/y) = 1 - F_X(1/y)$.
  5. Since $F_X(x) = x - 1$ for $x \in [1, 2]$, we have $F_Y(y) = 1 - (1/y - 1) = 2 - 1/y$.
  6. The PDF is $f_Y(y) = \frac{d}{dy} (2 - 1/y) = 1/y^2$.

Answer: f_Y(y) = \frac{1}{y^2} \text{ for } 1/2 \le y \le 1

L52. The Gamma and Beta distributions

Module 3  2026-09-25  ·  13:45  ·  practice PDF

Practice problems (3)
Problem 1. Let $X$ be a Gamma random variable with shape $\alpha = 2$ and rate $\beta = 0.5$. Calculate $P(X < 1)$.
Reveal solution
  1. The PDF is $f(x) = \frac{0.5^2}{\Gamma(2)} x^{2-1} e^{-0.5x} = 0.25 x e^{-0.5x}$.
  2. Integrate $\int_0^1 0.25 x e^{-0.5x} dx$ using integration by parts.
  3. Let $u = 0.25x$ and $dv = e^{-0.5x} dx$, so $du = 0.25 dx$ and $v = -2e^{-0.5x}$.
  4. The integral is $[-0.5x e^{-0.5x}]_0^1 - \int_0^1 -0.5 e^{-0.5x} dx$.
  5. This evaluates to $-0.5 e^{-0.5} + [-e^{-0.5x}]_0^1 = -0.5 e^{-0.5} - e^{-0.5} + 1 = 1 - 1.5 e^{-0.5}$.

Answer: 1 - 1.5 e^{-0.5} \approx 0.0902

Problem 2. A random variable $X$ follows a Beta distribution with $\alpha = 3$ and $\beta = 2$. Find the probability $P(X > 0.5)$.
Reveal solution
  1. First find $B(3, 2) = \frac{\Gamma(3)\Gamma(2)}{\Gamma(5)} = \frac{2 \cdot 1}{24} = \frac{1}{12}$.
  2. The PDF is $f(x) = 12 x^{3-1} (1-x)^{2-1} = 12 x^2 (1-x) = 12x^2 - 12x^3$.
  3. Integrate from $0.5$ to $1$: $\int_{0.5}^1 (12x^2 - 12x^3) dx$.
  4. The antiderivative is $4x^3 - 3x^4$.
  5. Evaluate at boundaries: $(4(1)^3 - 3(1)^4) - (4(0.5)^3 - 3(0.5)^4) = 1 - (0.5 - 0.1875) = 1 - 0.3125 = 0.6875$.

Answer: 0.6875

Problem 3. If $X_1, X_2, X_3$ are independent exponential random variables with rate $\lambda = 4$, what is the PDF of $Y = X_1 + X_2 + X_3$?
Reveal solution
  1. The sum of $k$ independent exponential variables with rate $\beta$ follows a Gamma distribution with shape $\alpha = k$ and rate $\beta$.
  2. Here $k = 3$ and $\beta = 4$.
  3. The PDF is $f(y) = \frac{4^3}{\Gamma(3)} y^{3-1} e^{-4y}$.
  4. Since $\Gamma(3) = 2! = 2$, the constant is $64 / 2 = 32$.
  5. The final PDF is $f(y) = 32 y^2 e^{-4y}$ for $y > 0$.

Answer: f(y) = 32 y^2 e^{-4y}

L53. Quantiles, percentiles, and the median

Module 3  2026-09-26  ·  12:55  ·  practice PDF

Practice problems (3)
Problem 1. Find the 75th percentile of an exponential distribution with rate $\lambda = 2$.
Reveal solution
  1. Set the CDF equal to 0.75: $1 - e^{-2x} = 0.75$.
  2. Rearrange to isolate the exponential: $e^{-2x} = 0.25$.
  3. Take the natural logarithm of both sides: $-2x = \ln(0.25)$.
  4. Solve for $x$: $x = \frac{\ln(0.25)}{-2} = \frac{-1.3863}{-2} \approx 0.6931$.

Answer: 0.6931

Problem 2. A random variable $X$ is uniformly distributed on the interval $[20, 100]$. Find the median.
Reveal solution
  1. The CDF for a uniform distribution is $F(x) = \frac{x - a}{b - a}$.
  2. Substitute $a = 20$ and $b = 100$: $F(x) = \frac{x - 20}{80}$.
  3. Set $F(x) = 0.5$ for the median: $\frac{x - 20}{80} = 0.5$.
  4. Multiply by 80: $x - 20 = 40$.
  5. Solve for $x$: $x = 60$.

Answer: 60

Problem 3. For an exponential distribution with rate $\lambda = 1$, find the value $x$ such that $P(X > x) = 0.10$.
Reveal solution
  1. The condition $P(X > x) = 0.10$ is equivalent to $P(X \le x) = 0.90$.
  2. Set the CDF equal to 0.90: $1 - e^{-x} = 0.90$.
  3. Isolate the exponential: $e^{-x} = 0.10$.
  4. Take the natural logarithm: $-x = \ln(0.10)$.
  5. Solve for $x$: $x = -(-2.3026) = 2.3026$.

Answer: 2.3026

L54. Module 3 review + self-test

Module 3  2026-09-27  ·  14:01  ·  practice PDF

Practice problems (3)
Problem 1. Find the value of the constant $k$ such that $f(x) = k x^3$ for $1 \le x \le 2$ (and $0$ otherwise) is a valid probability density function.
Reveal solution
  1. Set the total integral equal to 1: $\int_{1}^{2} k x^3 \, dx = 1$.
  2. Compute the integral: $k [\frac{1}{4} x^4]_{1}^{2} = 1$.
  3. Evaluate the bounds: $k (\frac{16}{4} - \frac{1}{4}) = 1$.
  4. Solve for $k$: $k (\frac{15}{4}) = 1 \implies k = \frac{4}{15}$.

Answer: k = 4/15

Problem 2. For an exponential distribution with rate $\lambda = 0.5$, find the median waiting time.
Reveal solution
  1. The CDF of an exponential distribution is $F(x) = 1 - e^{-\lambda x}$.
  2. Set $F(m) = 0.5$: $1 - e^{-0.5 m} = 0.5$.
  3. Rearrange: $e^{-0.5 m} = 0.5$.
  4. Take the natural log: $-0.5 m = \ln(0.5)$.
  5. Solve for $m$: $m = \frac{\ln(0.5)}{-0.5} = -2 \ln(0.5) = 2 \ln(2) \approx 1.386$.

Answer: m \approx 1.386

Problem 3. Let $X$ be a uniform random variable on $[0, 1]$. Find the PDF of $Y = X^2$.
Reveal solution
  1. Find the CDF of $Y$: $F_Y(y) = P(X^2 \le y) = P(X \le \sqrt{y})$.
  2. Since $X$ is uniform on $[0, 1]$, $P(X \le \sqrt{y}) = \sqrt{y}$ for $0 \le y \le 1$.
  3. Differentiate the CDF to find the PDF: $f_Y(y) = \frac{d}{dy} \sqrt{y}$.
  4. The result is $f_Y(y) = \frac{1}{2\sqrt{y}}$ for $0 < y \le 1$.

Answer: f_Y(y) = \frac{1}{2\sqrt{y}}

Module 4 — Joint Distributions & Dependence (12/12)

L55. Joint distributions — randomness in two dimensions

Module 4  2026-09-28  ·  13:25  ·  practice PDF

Practice problems (3)
Problem 1. Given the joint PMF $p(x, y) = \frac{x+y}{21}$ for $x \in \{1, 2\}$ and $y \in \{1, 2, 3\}$, find the marginal PMF $p_X(x)$ for $x=1$ and $x=2$.
Reveal solution
  1. For $x=1$, sum $p(1, y)$ for $y=1, 2, 3$: $\frac{1+1}{21} + \frac{1+2}{21} + \frac{1+3}{21} = \frac{2+3+4}{21} = \frac{9}{21} = 3/7$.
  2. For $x=2$, sum $p(2, y)$ for $y=1, 2, 3$: $\frac{2+1}{21} + \frac{2+2}{21} + \frac{2+3}{21} = \frac{3+4+5}{21} = \frac{12}{21} = 4/7$.

Answer: $p_X(1) = 3/7, p_X(2) = 4/7$

Problem 2. A joint PDF is given by $f(x, y) = 2$ for $0 \le x \le 1$ and $0 \le y \le x$, and $0$ otherwise. Find the marginal PDF $f_Y(y)$.
Reveal solution
  1. The region is a triangle with vertices $(0,0), (1,0), (1,1)$.
  2. To find $f_Y(y)$, we integrate $f(x, y)$ with respect to $x$.
  3. For a fixed $y$, $x$ ranges from $y$ to $1$.
  4. $\int_{y}^{1} 2 \, dx = [2x]_{y}^{1} = 2(1 - y)$.
  5. The marginal PDF is $f_Y(y) = 2(1-y)$ for $0 \le y \le 1$.

Answer: $f_Y(y) = 2(1-y)$ for $0 \le y \le 1$

Problem 3. For the joint PDF $f(x, y) = 8xy$ for $0 \le y \le x \le 1$, calculate the probability $P(X < 0.5)$.
Reveal solution
  1. We integrate the joint PDF over the region where $0 \le x \le 0.5$ and $0 \le y \le x$.
  2. Inner integral: $\int_{0}^{x} 8xy \, dy = [4xy^2]_{0}^{x} = 4x^3$.
  3. Outer integral: $\int_{0}^{0.5} 4x^3 \, dx = [x^4]_{0}^{0.5} = (0.5)^4 = 0.0625$.

Answer: 0.0625

L56. Marginal and conditional distributions

Module 4  2026-09-29  ·  14:11  ·  practice PDF

Practice problems (3)
Problem 1. Given the joint probability table $p(x, y)$ where $x \in \{0, 1, 2\}$ and $y \in \{0, 1, 2\}$ with values $p(0,0)=0.1, p(0,1)=0.1, p(0,2)=0.1, p(1,0)=0.1, p(1,1)=0.2, p(1,2)=0.1, p(2,0)=0.1, p(2,1)=0.1, p(2,2)=0.1$, find the marginal distribution $p_X(x)$ and the conditional probability $p(X=1 | Y=1)$.
Reveal solution
  1. Sum the rows to find $p_X(x)$: $p_X(0) = 0.1+0.1+0.1 = 0.3$, $p_X(1) = 0.1+0.2+0.1 = 0.4$, $p_X(2) = 0.1+0.1+0.1 = 0.3$.
  2. Check sum: $0.3+0.4+0.3 = 1.0$.
  3. For $p(X=1 | Y=1)$, find the marginal $p_Y(1) = p(0,1)+p(1,1)+p(2,1) = 0.1+0.2+0.1 = 0.4$.
  4. Then $p(X=1 | Y=1) = p(1,1) / p_Y(1) = 0.2 / 0.4 = 0.5$.

Answer: p_X(0)=0.3, p_X(1)=0.4, p_X(2)=0.3; p(X=1|Y=1)=0.5

Problem 2. A joint PDF is given by $f(x, y) = 4xy$ for $0 < x < 1$ and $0 < y < 1$. Find the marginal PDF $f_X(x)$ and the conditional PDF $f_{Y|X}(y | x)$.
Reveal solution
  1. Integrate $f(x, y)$ over $y$: $f_X(x) = \int_{0}^{1} 4xy \, dy = [2xy^2]_{0}^{1} = 2x$.
  2. Check: $\int_{0}^{1} 2x \, dx = [x^2]_{0}^{1} = 1$. Correct.
  3. Find conditional: $f_{Y|X}(y | x) = f(x, y) / f_X(x) = (4xy) / (2x) = 2y$.

Answer: f_X(x)=2x, f_{Y|X}(y|x)=2y

Problem 3. If $X$ and $Y$ are independent random variables with marginal PDFs $f_X(x) = e^{-x}$ for $x > 0$ and $f_Y(y) = 2e^{-2y}$ for $y > 0$, what is the conditional PDF $f_{X|Y}(x | y)$?
Reveal solution
  1. Since $X$ and $Y$ are independent, the conditional distribution of $X$ given $Y$ is simply the marginal distribution of $X$.
  2. Therefore, $f_{X|Y}(x | y) = f_X(x) = e^{-x}$ for $x > 0$.

Answer: f_{X|Y}(x|y)=e^{-x}

L57. Independence of random variables

Module 4  2026-09-30  ·  11:41  ·  practice PDF

Practice problems (3)
Problem 1. Given the joint PMF $p(0,0)=0.2, p(0,1)=0.2, p(1,0)=0.1, p(1,1)=0.5$, are $X$ and $Y$ independent?
Reveal solution
  1. Compute marginal $p_X(0) = 0.2 + 0.2 = 0.4$ and $p_X(1) = 0.1 + 0.5 = 0.6$.
  2. Compute marginal $p_Y(0) = 0.2 + 0.1 = 0.3$ and $p_Y(1) = 0.2 + 0.5 = 0.7$.
  3. Check $p(0,0) = 0.2$. The product $p_X(0) p_Y(0) = 0.4 \times 0.3 = 0.12$.
  4. Since $0.2 \neq 0.12$, the variables are dependent.

Answer: Dependent

Problem 2. A joint PDF is given by $f(x, y) = 6x^2 y$ for $0 < x < 1$ and $0 < y < 1$. Are $X$ and $Y$ independent?
Reveal solution
  1. Find marginal $f_X(x) = \int_0^1 6x^2 y \, dy = [3x^2 y^2]_0^1 = 3x^2$.
  2. Find marginal $f_Y(y) = \int_0^1 6x^2 y \, dx = [2x^3 y]_0^1 = 2y$.
  3. Check product: $f_X(x) f_Y(y) = 3x^2 \times 2y = 6x^2 y$.
  4. The product equals the joint PDF and the support is a rectangle, so they are independent.

Answer: Independent

Problem 3. Consider the joint PDF $f(x, y) = 2$ for $0 < x < 1$ and $x < y < 1$. Without calculating marginals, are $X$ and $Y$ independent? Explain.
Reveal solution
  1. Identify the support of the distribution: $S = \{ (x, y) : 0 < x < 1, x < y < 1 \}$.
  2. Observe that the range of $y$ depends on the value of $x$ (specifically, $y$ must be greater than $x$).
  3. Because the support is a triangle and not a rectangle aligned with the axes, the variables are dependent.

Answer: Dependent

L58. Covariance — do they move together?

Module 4  2026-10-01  ·  14:04  ·  practice PDF

Practice problems (3)
Problem 1. Given the joint probabilities $p(0,0)=0.2, p(0,1)=0.3, p(1,0)=0.1, p(1,1)=0.4$, calculate $\text{Cov}(X, Y)$.
Reveal solution
  1. Find marginals: $p_X(0)=0.5, p_X(1)=0.5$ and $p_Y(0)=0.3, p_Y(1)=0.7$.
  2. Compute means: $E[X]=0.5$ and $E[Y]=0.7$.
  3. Compute $E[XY]$: only $p(1,1)$ contributes, so $E[XY]=1 \cdot 1 \cdot 0.4 = 0.4$.
  4. Apply formula: $\text{Cov}(X, Y) = 0.4 - (0.5)(0.7) = 0.4 - 0.35 = 0.05$.

Answer: 0.05

Problem 2. If $X$ and $Y$ are independent random variables with $\text{Var}(X)=2$ and $\text{Var}(Y)=3$, what is $\text{Cov}(X, Y)$?
Reveal solution
  1. Recall that for independent variables, $E[XY] = E[X]E[Y]$.
  2. Substitute this into the covariance formula: $\text{Cov}(X, Y) = E[X]E[Y] - E[X]E[Y] = 0$.

Answer: 0

Problem 3. Suppose $X$ and $Y$ have a joint PDF $f(x,y) = 4xy$ for $0 \le x,y \le 1$ and $0$ otherwise. Calculate $\text{Cov}(X, Y)$.
Reveal solution
  1. Find marginal $f_X(x) = \int_0^1 4xy \, dy = [2xy^2]_0^1 = 2x$.
  2. Compute $E[X] = \int_0^1 x(2x) \, dx = [2x^3/3]_0^1 = 2/3$. By symmetry, $E[Y] = 2/3$.
  3. Compute $E[XY] = \int_0^1 \int_0^1 xy(4xy) \, dx \, dy = \int_0^1 \int_0^1 4x^2y^2 \, dx \, dy = \int_0^1 [4x^3y^2/3]_0^1 \, dy = \int_0^1 4y^2/3 \, dy = [4y^3/9]_0^1 = 4/9$.
  4. Apply formula: $\text{Cov}(X, Y) = 4/9 - (2/3)(2/3) = 4/9 - 4/9 = 0$.

Answer: 0

L59. Correlation — the standardised story (and its limits)

Module 4  2026-10-02  ·  12:49  ·  practice PDF

Practice problems (3)
Problem 1. Given $\text{Cov}(X, Y) = 12$, $\sigma_X = 4$, and $\sigma_Y = 3$, calculate the correlation coefficient $\rho_{X,Y}$.
Reveal solution
  1. Use the formula $\rho = \frac{\text{Cov}(X, Y)}{\sigma_X \sigma_Y}$.
  2. Substitute the values: $\rho = \frac{12}{4 \times 3}$.
  3. Calculate the denominator: $4 \times 3 = 12$.
  4. Divide: $12 / 12 = 1$.

Answer: 1

Problem 2. Two variables $X$ and $Y$ have a correlation of $\rho = -0.7$. If the standard deviation of $X$ is doubled while all other properties remain the same, what happens to the correlation coefficient?
Reveal solution
  1. The correlation formula is $\rho = \frac{\text{Cov}(X, Y)}{\sigma_X \sigma_Y}$.
  2. If $\sigma_X$ is doubled, the covariance $\text{Cov}(X, Y) = E[(X-\mu_X)(Y-\mu_Y)]$ also doubles because the deviations $(X-\mu_X)$ are doubled.
  3. The new correlation is $\rho_{new} = \frac{2 \times \text{Cov}(X, Y)}{(2 \sigma_X) \sigma_Y}$.
  4. The factor of 2 in the numerator and denominator cancels out.

Answer: The correlation remains -0.7.

Problem 3. Let $X$ be a random variable with mean 0 and variance 1. Let $Y = X^2$. Show that $\rho_{X,Y} = 0$ if the distribution of $X$ is symmetric about 0.
Reveal solution
  1. The correlation is $\rho = \frac{\text{Cov}(X, Y)}{\sigma_X \sigma_Y}$.
  2. $\text{Cov}(X, Y) = E[XY] - E[X]E[Y]$.
  3. Since $E[X] = 0$, $\text{Cov}(X, Y) = E[X \cdot X^2] = E[X^3]$.
  4. For a symmetric distribution about 0, the expected value of any odd power of $X$ is 0.
  5. Therefore, $\text{Cov}(X, Y) = 0$, which implies $\rho = 0$.

Answer: \rho = 0

L60. Sums of random variables; convolution intuition

Module 4  2026-10-03  ·  14:16  ·  practice PDF

Practice problems (3)
Problem 1. Let $X$ and $Y$ be independent random variables. $X$ takes values $0$ and $1$ with probabilities $P(X=0)=0.4$ and $P(X=1)=0.6$. $Y$ takes values $1$ and $2$ with probabilities $P(Y=1)=0.7$ and $P(Y=2)=0.3$. Find the probability mass function of $Z = X + Y$.
Reveal solution
  1. Identify possible values of $Z$: $0+1=1$, $0+2=2$, $1+1=2$, $1+2=3$. So $Z \in \{1, 2, 3\}$.
  2. Compute $P(Z=1)$: Only $X=0$ and $Y=1$ works. $0.4 \times 0.7 = 0.28$.
  3. Compute $P(Z=2)$: $X=0, Y=2$ or $X=1, Y=1$. $(0.4 \times 0.3) + (0.6 \times 0.7) = 0.12 + 0.42 = 0.54$.
  4. Compute $P(Z=3)$: Only $X=1$ and $Y=2$ works. $0.6 \times 0.3 = 0.18$.
  5. Check sum: $0.28 + 0.54 + 0.18 = 1.0$.

Answer: P(Z=1)=0.28, P(Z=2)=0.54, P(Z=3)=0.18

Problem 2. Two fair four-sided dice (numbered $1$ to $4$) are rolled. Let $Z$ be the sum of the results. What is $P(Z=5)$?
Reveal solution
  1. The total number of outcomes is $4 \times 4 = 16$.
  2. List pairs $(x, y)$ that sum to $5$: $(1, 4), (2, 3), (3, 2), (4, 1)$.
  3. There are $4$ such pairs.
  4. The probability is $4/16 = 1/4$.

Answer: 0.25

Problem 3. Suppose $X$ and $Y$ are dependent variables with joint PMF $P(X=1, Y=1)=0.1$, $P(X=1, Y=2)=0.4$, $P(X=2, Y=1)=0.3$, and $P(X=2, Y=2)=0.2$. Find the variance of $Z = X + Y$.
Reveal solution
  1. Find PMF of $Z$: $P(Z=2)=0.1$, $P(Z=3)=0.4+0.3=0.7$, $P(Z=4)=0.2$.
  2. Compute $E[Z] = (2 \times 0.1) + (3 \times 0.7) + (4 \times 0.2) = 0.2 + 2.1 + 0.8 = 3.1$.
  3. Compute $E[Z^2] = (2^2 \times 0.1) + (3^2 \times 0.7) + (4^2 \times 0.2) = 0.4 + 6.3 + 3.2 = 9.9$.
  4. Compute $\text{Var}(Z) = E[Z^2] - (E[Z])^2 = 9.9 - (3.1)^2 = 9.9 - 9.61 = 0.29$.

Answer: 0.29

L61. Expectation and variance of sums — the key identities

Module 4  2026-10-04  ·  12:30  ·  practice PDF

Practice problems (3)
Problem 1. Two random variables $X$ and $Y$ have variances $\text{Var}(X) = 5$ and $\text{Var}(Y) = 8$. Their covariance is $\text{Cov}(X, Y) = 3$. Calculate $\text{Var}(X+Y)$.
Reveal solution
  1. Identify the formula for the variance of a sum: $\text{Var}(X+Y) = \text{Var}(X) + \text{Var}(Y) + 2\text{Cov}(X, Y)$.
  2. Substitute the given values: $5 + 8 + 2(3)$.
  3. Calculate the sum: $13 + 6 = 19$.

Answer: 19

Problem 2. Suppose $X$ and $Y$ are independent random variables with $\text{Var}(X) = 12$ and $\text{Var}(Y) = 7$. Find $\text{Var}(X+Y)$.
Reveal solution
  1. Since $X$ and $Y$ are independent, their covariance $\text{Cov}(X, Y) = 0$.
  2. The formula simplifies to $\text{Var}(X+Y) = \text{Var}(X) + \text{Var}(Y)$.
  3. Substitute the values: $12 + 7 = 19$.

Answer: 19

Problem 3. Two variables $X$ and $Y$ have $\text{Var}(X) = 9$, $\text{Var}(Y) = 16$, and a correlation coefficient $\rho = -0.5$. Find $\text{Var}(X+Y)$.
Reveal solution
  1. First, find the covariance using $\text{Cov}(X, Y) = \rho \sigma_X \sigma_Y$.
  2. Calculate standard deviations: $\sigma_X = \sqrt{9} = 3$ and $\sigma_Y = \sqrt{16} = 4$.
  3. Compute covariance: $-0.5 \times 3 \times 4 = -6$.
  4. Apply the variance of sums formula: $9 + 16 + 2(-6)$.
  5. Calculate the final result: $25 - 12 = 13$.

Answer: 13

L62. The bivariate normal — the 3D bell

Module 4  2026-10-05  ·  12:14  ·  practice PDF

Practice problems (3)
Problem 1. Suppose $X$ and $Y$ follow a bivariate normal distribution with $\mu_X = 10$, $\mu_Y = 50$, $\sigma_X = 2$, $\sigma_Y = 10$, and $\rho = -0.4$. Find the conditional expectation $E[Y \mid X = 12]$.
Reveal solution
  1. First, calculate the z-score of $X$: $z_X = (12 - 10) / 2 = 1$.
  2. Use the conditional mean formula: $E[Y \mid X=x] = \mu_Y + \rho \sigma_Y z_X$.
  3. Substitute the values: $50 + (-0.4) \cdot 10 \cdot 1$.
  4. Calculate the result: $50 - 4 = 46$.

Answer: 46

Problem 2. For the same distribution as Problem 1, calculate the conditional variance $\text{Var}(Y \mid X = 12)$.
Reveal solution
  1. Use the conditional variance formula: $\text{Var}(Y \mid X) = \sigma_Y^2 (1 - \rho^2)$.
  2. Substitute the values: $10^2 \cdot (1 - (-0.4)^2)$.
  3. Calculate the square: $100 \cdot (1 - 0.16)$.
  4. Final result: $100 \cdot 0.84 = 84$.

Answer: 84

Problem 3. If two variables $X$ and $Y$ are bivariate normal with $\rho = 1$, what is the relationship between $z_X$ and $z_Y$? What does this imply about the shape of the 3D probability surface?
Reveal solution
  1. If $\rho = 1$, the conditional mean formula gives $E[z_Y \mid z_X] = 1 \cdot z_X$, so $z_Y = z_X$.
  2. The conditional variance becomes $\sigma_Y^2 (1 - 1^2) = 0$.
  3. This means for any given $X$, there is only one possible value for $Y$.
  4. The 3D surface collapses from a bell into a 2D plane (a ridge) slicing through the 3D space.

Answer: $z_X = z_Y$; the surface collapses into a 2D ridge.

L63. Conditional expectation — the best guess

Module 4  2026-10-06  ·  15:01  ·  practice PDF

Practice problems (3)
Problem 1. A joint PMF is given by $P(X=1, Y=1)=0.2$, $P(X=1, Y=2)=0.3$, $P(X=2, Y=1)=0.1$, and $P(X=2, Y=2)=0.4$. Compute $E[Y \mid X=1]$.
Reveal solution
  1. Find the marginal $P(X=1) = 0.2 + 0.3 = 0.5$.
  2. Find conditional probabilities: $P(Y=1 \mid X=1) = 0.2/0.5 = 0.4$ and $P(Y=2 \mid X=1) = 0.3/0.5 = 0.6$.
  3. Compute expectation: $E[Y \mid X=1] = 1(0.4) + 2(0.6) = 0.4 + 1.2 = 1.6$.

Answer: 1.6

Problem 2. Given the joint density $f_{X,Y}(x,y) = 2$ for $0 < x < 1$ and $0 < y < x$, and $0$ otherwise, find the function $g(x) = E[Y \mid X=x]$.
Reveal solution
  1. Find marginal $f_X(x) = \int_0^x 2 \, dy = 2x$.
  2. Find conditional density $f_{Y \mid X}(y \mid x) = 2 / (2x) = 1/x$ for $0 < y < x$.
  3. Compute expectation: $E[Y \mid X=x] = \int_0^x y(1/x) \, dy = [y^2/(2x)]_0^x = x^2/(2x) = x/2$.

Answer: x/2

Problem 3. If $X$ and $Y$ are independent random variables, prove that $E[Y \mid X] = E[Y]$.
Reveal solution
  1. By independence, the conditional density $f_{Y \mid X}(y \mid x) = f_Y(y)$.
  2. Substitute this into the conditional expectation formula: $E[Y \mid X=x] = \int y f_Y(y) \, dy$.
  3. The resulting integral is the definition of the marginal expectation $E[Y]$.

Answer: E[Y]

L64. The law of iterated expectation

Module 4  2026-10-07  ·  12:54  ·  practice PDF

Practice problems (3)
Problem 1. Let $X$ be a random variable such that $P(X=1) = 0.6$ and $P(X=2) = 0.4$. Given $X$, $Y$ follows a binomial distribution with parameters $n=X$ and $p=0.4$. Find $E[Y]$.
Reveal solution
  1. First, find the conditional expectation $E[Y \mid X]$. For a binomial distribution, the mean is $np$, so $E[Y \mid X] = X \times 0.4$.
  2. Next, apply the Law of Iterated Expectation: $E[Y] = E[E[Y \mid X]] = E[0.4 X]$.
  3. Use linearity of expectation: $E[Y] = 0.4 E[X]$.
  4. Compute $E[X] = (1 \times 0.6) + (2 \times 0.4) = 0.6 + 0.8 = 1.4$.
  5. Finally, $E[Y] = 0.4 \times 1.4 = 0.56$.

Answer: 0.56

Problem 2. Suppose $X$ is uniformly distributed on the interval $[0, 10]$. Given $X=x$, $Y$ is uniformly distributed on the interval $[0, x]$. Find $E[Y]$.
Reveal solution
  1. Find the conditional expectation $E[Y \mid X=x]$. Since $Y$ is uniform on $[0, x]$, the mean is $x/2$.
  2. Thus, $E[Y \mid X] = X/2$.
  3. Apply the Law of Iterated Expectation: $E[Y] = E[X/2] = \frac{1}{2} E[X]$.
  4. Since $X$ is uniform on $[0, 10]$, $E[X] = (0+10)/2 = 5$.
  5. Therefore, $E[Y] = \frac{1}{2} \times 5 = 2.5$.

Answer: 2.5

Problem 3. Let $X$ follow a Poisson distribution with $\lambda = 3$. Given $X$, $Y$ follows a Poisson distribution with parameter $\lambda = X$. Find $E[Y]$.
Reveal solution
  1. Find the conditional expectation $E[Y \mid X]$. Since $Y$ given $X$ is Poisson with parameter $X$, $E[Y \mid X] = X$.
  2. Apply the Law of Iterated Expectation: $E[Y] = E[E[Y \mid X]] = E[X]$.
  3. Since $X$ is Poisson with $\lambda = 3$, $E[X] = 3$.
  4. Therefore, $E[Y] = 3$.

Answer: 3

L65. Covariance clinic — portfolio variance

Module 4  2026-10-08  ·  13:12  ·  practice PDF

Practice problems (3)
Problem 1. A portfolio consists of two assets with weights $w_X = 0.6$ and $w_Y = 0.4$. The standard deviations are $\sigma_X = 0.15$ and $\sigma_Y = 0.25$, and the correlation is $\rho = 0.3$. Calculate the portfolio variance $\text{Var}(R)$.
Reveal solution
  1. Identify values: $w=0.6, \sigma_X=0.15, \sigma_Y=0.25, \rho=0.3$.
  2. Compute first term: $0.6^2 \times 0.15^2 = 0.36 \times 0.0225 = 0.0081$.
  3. Compute second term: $0.4^2 \times 0.25^2 = 0.16 \times 0.0625 = 0.01$.
  4. Compute interaction term: $2 \times 0.6 \times 0.4 \times 0.3 \times 0.15 \times 0.25 = 0.48 \times 0.3 \times 0.0375 = 0.0054$.
  5. Sum the terms: $0.0081 + 0.01 + 0.0054 = 0.0235$.

Answer: 0.0235

Problem 2. Two assets have equal weights $w=0.5$. Both have a standard deviation of $0.2$. If the assets are perfectly negatively correlated ($\rho = -1$), what is the portfolio standard deviation $\sigma_P$?
Reveal solution
  1. Identify values: $w=0.5, \sigma_X=0.2, \sigma_Y=0.2, \rho=-1$.
  2. Compute variance: $\text{Var}(R) = 0.5^2(0.2^2) + 0.5^2(0.2^2) + 2(0.5)(0.5)(-1)(0.2)(0.2)$.
  3. Simplify: $0.25(0.04) + 0.25(0.04) - 0.5(0.04) = 0.01 + 0.01 - 0.02 = 0$.
  4. The standard deviation is $\sqrt{0} = 0$.

Answer: 0

Problem 3. An investor wants to combine a risky asset $X$ ($\sigma_X = 0.4$) with a risk-free asset $Y$ ($\sigma_Y = 0$). If they put $30\%$ of their money in asset $X$, what is the portfolio standard deviation $\sigma_P$?
Reveal solution
  1. Identify values: $w=0.3, \sigma_X=0.4, \sigma_Y=0, \rho=0$ (since $Y$ is constant).
  2. Apply formula: $\text{Var}(R) = 0.3^2(0.4^2) + 0.7^2(0^2) + 2(0.3)(0.7)(0)(0.4)(0)$.
  3. Simplify: $\text{Var}(R) = 0.09 \times 0.16 = 0.0144$.
  4. Compute standard deviation: $\sigma_P = \sqrt{0.0144} = 0.12$.

Answer: 0.12

L66. Module 4 review + self-test

Module 4  2026-10-09  ·  12:55  ·  practice PDF

Practice problems (3)
Problem 1. Given the joint density $f_{X,Y}(x,y) = 8xy$ for $0 < y < x < 1$ and $0$ otherwise, find the marginal density $f_X(x)$ and the marginal density $f_Y(y)$.
Reveal solution
  1. To find $f_X(x)$, integrate $8xy$ with respect to $y$ from $0$ to $x$.
  2. $\int_0^x 8xy dy = [4xy^2]_0^x = 4x^3$.
  3. To find $f_Y(y)$, integrate $8xy$ with respect to $x$ from $y$ to $1$.
  4. $\int_y^1 8xy dx = [4x^2y]_y^1 = 4y(1 - y^2) = 4y - 4y^3$.

Answer: $f_X(x) = 4x^3, f_Y(y) = 4y - 4y^3$

Problem 2. For the joint density $f_{X,Y}(x,y) = 8xy$ for $0 < y < x < 1$, compute the covariance $\text{Cov}(X,Y)$.
Reveal solution
  1. Compute $E[X] = \int_0^1 x(4x^3) dx = [4x^5/5]_0^1 = 0.8$.
  2. Compute $E[Y] = \int_0^1 y(4y - 4y^3) dy = [4y^3/3 - 4y^5/5]_0^1 = 4/3 - 4/5 = 8/15 \approx 0.533$.
  3. Compute $E[XY] = \int_0^1 \int_0^x xy(8xy) dy dx = \int_0^1 [8x^2 y^3/3]_0^x dx = \int_0^1 8x^5/3 dx = [8x^6/18]_0^1 = 4/9 \approx 0.444$.
  4. $\text{Cov}(X,Y) = E[XY] - E[X]E[Y] = 4/9 - (4/5)(8/15) = 4/9 - 32/75 = (100 - 96)/225 = 4/225$.

Answer: $\text{Cov}(X,Y) = 4/225$

Problem 3. Suppose $X$ is a random variable and $Y|X=x$ follows a normal distribution with mean $x$ and variance $1$. If $X$ itself follows a normal distribution with mean $0$ and variance $1$, use the Law of Iterated Expectations to find $E[Y]$.
Reveal solution
  1. We are given the conditional expectation $E[Y|X=x] = x$.
  2. Therefore, the conditional expectation as a random variable is $E[Y|X] = X$.
  3. By the Law of Iterated Expectations, $E[Y] = E[ E[Y|X] ]$.
  4. Substituting the conditional expectation, we get $E[Y] = E[X]$.
  5. Since $X$ has a mean of $0$, $E[Y] = 0$.

Answer: $E[Y] = 0$

Module 5 — Limit Theorems (10/10)

L67. The sample mean as a random variable

Module 5  2026-10-10  ·  12:44  ·  practice PDF

Practice problems (3)
Problem 1. A population has a mean $\mu = 80$ and a standard deviation $\sigma = 12$. If a random sample of size $n = 36$ is taken, what is the standard error of the sample mean $\bar{X}$?
Reveal solution
  1. Identify the given values: $\sigma = 12$ and $n = 36$.
  2. Use the formula for standard error: $\text{SE}_{\bar{X}} = \frac{\sigma}{\sqrt{n}}$.
  3. Substitute the values: $\text{SE}_{\bar{X}} = \frac{12}{\sqrt{36}}$.
  4. Calculate the square root: $\sqrt{36} = 6$.
  5. Divide: $12 / 6 = 2$.

Answer: 2

Problem 2. The variance of a population is $\sigma^2 = 400$. If the sample mean $\bar{X}$ has a variance of $4$, what was the sample size $n$ used?
Reveal solution
  1. Use the formula for the variance of the sample mean: $\text{Var}(\bar{X}) = \frac{\sigma^2}{n}$.
  2. Substitute the known values: $4 = \frac{400}{n}$.
  3. Multiply both sides by $n$: $4n = 400$.
  4. Divide by $4$: $n = 100$.

Answer: 100

Problem 3. A researcher wants to estimate the average height of a plant species. The population standard deviation is $\sigma = 5$ cm. They want the standard error of the sample mean to be no more than $0.5$ cm. What is the minimum sample size $n$ required?
Reveal solution
  1. Set up the inequality for standard error: $\frac{\sigma}{\sqrt{n}} \le 0.5$.
  2. Substitute $\sigma = 5$: $\frac{5}{\sqrt{n}} \le 0.5$.
  3. Rearrange to solve for $\sqrt{n}$: $\sqrt{n} \ge \frac{5}{0.5}$.
  4. Simplify the fraction: $\sqrt{n} \ge 10$.
  5. Square both sides: $n \ge 100$.

Answer: 100

L68. Markov and Chebyshev inequalities

Module 5  2026-10-11  ·  13:11  ·  practice PDF

Practice problems (3)
Problem 1. A non-negative random variable $X$ has an expected value $E[X] = 12$. Use Markov's Inequality to find the maximum possible probability that $X$ is at least $36$.
Reveal solution
  1. Identify the knowns: $E[X] = 12$ and $a = 36$.
  2. Apply Markov's Inequality: $P(X \ge a) \le \frac{E[X]}{a}$.
  3. Substitute the values: $P(X \ge 36) \le \frac{12}{36}$.
  4. Simplify the fraction: $\frac{12}{36} = \frac{1}{3}$.

Answer: 1/3

Problem 2. A random variable $Y$ has a mean $\mu = 50$ and a variance $\sigma^2 = 16$. What is the maximum probability that $Y$ falls outside the interval $[38, 62]$?
Reveal solution
  1. Find the standard deviation: $\sigma = \sqrt{16} = 4$.
  2. Determine the distance from the mean to the boundary: $62 - 50 = 12$ (or $50 - 38 = 12$).
  3. Calculate $k$, the number of standard deviations: $k = \frac{12}{4} = 3$.
  4. Apply Chebyshev's Inequality: $P(|Y - 50| \ge 12) \le \frac{1}{3^2}$.
  5. Compute the result: $\frac{1}{9} \approx 0.1111$.

Answer: 1/9

Problem 3. A population has a mean $\mu$ and standard deviation $\sigma$. If we take a sample of size $n = 400$, what is the maximum probability that the sample mean $\bar{X}$ differs from $\mu$ by more than $0.05\sigma$?
Reveal solution
  1. Recall the standard error of the mean: $\text{SE} = \frac{\sigma}{\sqrt{n}} = \frac{\sigma}{\sqrt{400}} = \frac{\sigma}{20} = 0.05\sigma$.
  2. The distance we are interested in is $\epsilon = 0.05\sigma$.
  3. Calculate $k$ by dividing the distance by the standard error: $k = \frac{0.05\sigma}{0.05\sigma} = 1$.
  4. Apply Chebyshev's Inequality: $P(|\bar{X} - \mu| \ge 0.05\sigma) \le \frac{1}{1^2}$.
  5. The result is $1$, which means the probability is at most $100\%$. (Note: This shows that for this specific sample size and distance, the universal bound is not restrictive).

Answer: 1

L69. The Law of Large Numbers — why casinos always win

Module 5  2026-10-12  ·  13:17  ·  practice PDF

Practice problems (3)
Problem 1. A population has a mean $\mu$ and a standard deviation $\sigma = 0.5$. Use Chebyshev's inequality to find the minimum sample size $n$ such that the probability that the sample mean $\bar{X}_n$ differs from $\mu$ by more than $0.1$ is less than $0.05$.
Reveal solution
  1. We use the bound $P(|\bar{X}_n - \mu| \ge \epsilon) \le \frac{\sigma^2}{n\epsilon^2}$.
  2. Substitute the given values: $\epsilon = 0.1$ and $\sigma = 0.5$.
  3. Set the inequality: $\frac{0.5^2}{n \cdot 0.1^2} < 0.05$.
  4. Simplify the constants: $\frac{0.25}{n \cdot 0.01} < 0.05$, which becomes $\frac{25}{n} < 0.05$.
  5. Solve for $n$: $n > \frac{25}{0.05} = 500$.

Answer: n > 500

Problem 2. A game has an expected value of $E[X] = -2$ dollars with a standard deviation of $\sigma = 10$ dollars. If a casino hosts $n = 10,000$ games, what is the maximum probability that the average loss per game is actually a profit for the player (i.e., $\bar{X}_n \ge 0$)?
Reveal solution
  1. The deviation from the mean $\mu = -2$ to the threshold $0$ is $\epsilon = 2$.
  2. The variance of the sample mean is $\text{Var}(\bar{X}_n) = \frac{\sigma^2}{n} = \frac{10^2}{10000} = \frac{100}{10000} = 0.01$.
  3. Apply Chebyshev's inequality: $P(|\bar{X}_n - (-2)| \ge 2) \le \frac{0.01}{2^2}$.
  4. Calculate the result: $\frac{0.01}{4} = 0.0025$.

Answer: 0.0025

Problem 3. Suppose you have a sequence of independent and identically distributed random variables $X_i$ with mean $\mu$ and variance $\sigma^2$. Prove that for any $\epsilon > 0$, the probability $P(|\bar{X}_n - \mu| < \epsilon)$ approaches $1$ as $n \to \infty$.
Reveal solution
  1. Start with the complement: $P(|\bar{X}_n - \mu| < \epsilon) = 1 - P(|\bar{X}_n - \mu| \ge \epsilon)$.
  2. Use the Law of Large Numbers bound: $P(|\bar{X}_n - \mu| \ge \epsilon) \le \frac{\sigma^2}{n\epsilon^2}$.
  3. Therefore, $P(|\bar{X}_n - \mu| < \epsilon) \ge 1 - \frac{\sigma^2}{n\epsilon^2}$.
  4. Take the limit as $n \to \infty$: $\lim_{n \to \infty} (1 - \frac{\sigma^2}{n\epsilon^2}) = 1 - 0 = 1$.
  5. Since the probability is bounded above by $1$ and below by a value approaching $1$, it must converge to $1$.

Answer: The probability converges to 1.

L70. The Central Limit Theorem I — the miracle, watched live

Module 5  2026-10-13  ·  13:47  ·  practice PDF

Practice problems (3)
Problem 1. A fair six-sided die is rolled $n=40$ times. Using the population mean $\mu = 3.5$ and variance $\sigma^2 = 2.9167$, find the probability that the sample mean $\bar{X}$ is between $3.3$ and $3.7$.
Reveal solution
  1. Calculate the standard error: $\text{SE} = \sqrt{2.9167 / 40} \approx 0.2700$.
  2. Find the z-score for $3.3$: $z_1 = (3.3 - 3.5) / 0.2700 \approx -0.74$.
  3. Find the z-score for $3.7$: $z_2 = (3.7 - 3.5) / 0.2700 \approx 0.74$.
  4. Find the area between $z = -0.74$ and $z = 0.74$ using the normal table: $\Phi(0.74) - \Phi(-0.74) \approx 0.7704 - 0.2296 = 0.5408$.

Answer: 0.5408

Problem 2. A population has a mean $\mu = 100$ and a standard deviation $\sigma = 20$. If a sample of $n=64$ is taken, what is the probability that the sample mean $\bar{X}$ is greater than $105$?
Reveal solution
  1. Calculate the standard error: $\text{SE} = 20 / \sqrt{64} = 20 / 8 = 2.5$.
  2. Calculate the z-score: $z = (105 - 100) / 2.5 = 5 / 2.5 = 2.0$.
  3. Find the probability $P(Z > 2.0) = 1 - \Phi(2.0) \approx 1 - 0.9772 = 0.0228$.

Answer: 0.0228

Problem 3. The number of emails received per hour follows an exponential distribution with a mean of $\mu = 2$ emails per hour. If we monitor the process for $n=100$ hours, what is the probability that the average number of emails per hour is less than $1.8$?
Reveal solution
  1. For an exponential distribution, the mean $\mu = 1/\lambda$ and the variance $\sigma^2 = 1/\lambda^2$. Since $\mu = 2$, then $\sigma^2 = 2^2 = 4$.
  2. Calculate the standard error: $\text{SE} = \sqrt{4 / 100} = 2 / 10 = 0.2$.
  3. Calculate the z-score: $z = (1.8 - 2.0) / 0.2 = -0.2 / 0.2 = -1.0$.
  4. Find the probability $P(Z < -1.0) = \Phi(-1.0) \approx 0.1587$.

Answer: 0.1587

L71. The Central Limit Theorem II — why the normal appears everywhere

Module 5  2026-10-14  ·  12:45  ·  practice PDF

Practice problems (3)
Problem 1. A set of 20 independent random variables each have a mean $\mu = 5$ and a variance $\sigma^2 = 4$. Use the Central Limit Theorem to find the probability that their sum $S$ is greater than 120.
Reveal solution
  1. Calculate the mean of the sum: $E[S] = 20 \times 5 = 100$.
  2. Calculate the variance of the sum: $\text{Var}(S) = 20 \times 4 = 80$.
  3. Calculate the standard deviation of the sum: $\sigma_S = \sqrt{80} \approx 8.9443$.
  4. Find the z-score for 120: $z = (120 - 100) / 8.9443 \approx 2.236$.
  5. Find the probability $P(Z > 2.236)$ using the standard normal table: $1 - 0.9873 = 0.0127$.

Answer: 0.0127

Problem 2. A population has a mean of 50 and a standard deviation of 10. If the population is highly skewed, would a sample size of $n=5$ be sufficient to use the normal approximation for the sample mean? Explain why or why not.
Reveal solution
  1. The Central Limit Theorem states that the sampling distribution approaches normality as $n$ increases.
  2. For symmetric populations, this happens quickly (small $n$).
  3. For highly skewed populations, a larger $n$ (typically $n \ge 30$) is required to overcome the skewness.
  4. Since $n=5$ is very small and the population is highly skewed, the approximation would be poor.

Answer: No, because high skewness requires a larger sample size (typically $n \ge 30$) for the sampling distribution to become approximately normal.

Problem 3. Consider a random variable $X$ with a probability density function $f(x) = 1/(\pi(1+x^2))$ for all real $x$. If we sum 100 independent copies of $X$, will the resulting distribution be approximately normal? Why?
Reveal solution
  1. The given PDF is that of a Cauchy distribution.
  2. The integral for the variance $\int x^2 f(x) dx$ diverges, meaning the variance is infinite.
  3. The Central Limit Theorem requires the population to have a finite variance $\sigma^2 < \infty$.
  4. Since the variance is infinite, the sum will not converge to a normal distribution regardless of the sample size.

Answer: No, because the distribution has infinite variance, which violates the primary requirement of the Central Limit Theorem.

L72. CLT in action: normal approximation to the binomial

Module 5  2026-10-15  ·  12:25  ·  practice PDF

Practice problems (3)
Problem 1. A biased coin has a probability of heads $p = 0.6$. If the coin is flipped $n = 80$ times, use the normal approximation with continuity correction to find the probability of getting $45$ or fewer heads.
Reveal solution
  1. Check conditions: $np = 80 \times 0.6 = 48$ and $nq = 80 \times 0.4 = 32$. Both are $\ge 5$.
  2. Parameters: $\mu = 48$, $\sigma = \sqrt{80 \times 0.6 \times 0.4} = \sqrt{19.2} \approx 4.38$.
  3. Continuity correction: $P(X \le 45) \approx P(Y < 45.5)$.
  4. Z-score: $Z = \frac{45.5 - 48}{4.38} = \frac{-2.5}{4.38} \approx -0.57$.
  5. Probability: $P(Z < -0.57) \approx 0.2843$.

Answer: 0.2843

Problem 2. A factory produces lightbulbs with a $5\%$ defect rate. In a sample of $200$ bulbs, what is the probability that more than $12$ are defective? Use the normal approximation with continuity correction.
Reveal solution
  1. Check conditions: $np = 200 \times 0.05 = 10$ and $nq = 200 \times 0.95 = 190$. Both are $\ge 5$.
  2. Parameters: $\mu = 10$, $\sigma = \sqrt{200 \times 0.05 \times 0.95} = \sqrt{9.5} \approx 3.08$.
  3. Continuity correction: $P(X > 12) \approx P(Y > 12.5)$.
  4. Z-score: $Z = \frac{12.5 - 10}{3.08} = \frac{2.5}{3.08} \approx 0.81$.
  5. Probability: $P(Z > 0.81) = 1 - 0.7910 = 0.2090$.

Answer: 0.2090

Problem 3. A multiple-choice test has $50$ questions, each with $4$ options. If a student guesses randomly on every question, what is the probability they get between $10$ and $15$ questions correct, inclusive? Use the normal approximation with continuity correction.
Reveal solution
  1. Check conditions: $np = 50 \times 0.25 = 12.5$ and $nq = 50 \times 0.75 = 37.5$. Both are $\ge 5$.
  2. Parameters: $\mu = 12.5$, $\sigma = \sqrt{50 \times 0.25 \times 0.75} = \sqrt{9.375} \approx 3.06$.
  3. Continuity correction: $P(10 \le X \le 15) \approx P(9.5 < Y < 15.5)$.
  4. Z-scores: $Z_1 = \frac{9.5 - 12.5}{3.06} \approx -0.98$ and $Z_2 = \frac{15.5 - 12.5}{3.06} \approx 0.98$.
  5. Probability: $P(-0.98 < Z < 0.98) = 0.8365 - 0.1635 = 0.6730$.

Answer: 0.6730

L73. Simulation as a tool: Monte Carlo methods

Module 5  2026-10-16  ·  13:26  ·  practice PDF

Practice problems (3)
Problem 1. In a Buffon's needle experiment, the needle length $L$ is exactly half the line spacing $d$. In a simulation of $500$ drops, $112$ needles cross a line. Use this result to estimate the value of $\pi$.
Reveal solution
  1. The theoretical probability is $P = \frac{2L}{\pi d}$. Substituting $L = d/2$, we get $P = \frac{2(d/2)}{\pi d} = \frac{1}{\pi}$.
  2. The observed fraction is $\frac{112}{500} = 0.224$.
  3. Setting the theoretical probability equal to the observed fraction: $\frac{1}{\pi} \approx 0.224$.
  4. Solving for $\pi$, we get $\pi \approx \frac{1}{0.224} \approx 4.464$.

Answer: 4.464

Problem 2. We want to estimate the area of the region where $y \le x^2$ within the unit square ($0 \le x \le 1, 0 \le y \le 1$). If $1000$ random points are generated and $330$ fall within the region, what is the estimated area?
Reveal solution
  1. The area of the bounding box (the unit square) is $1 \times 1 = 1$.
  2. The fraction of points falling inside the region is $\frac{330}{1000} = 0.33$.
  3. The estimated area is $\text{Area}_{\text{box}} \times \text{fraction} = 1 \times 0.33 = 0.33$.

Answer: 0.33

Problem 3. A region is defined by $x^2 + y^2 \le 1$ and $y \ge 0$. We enclose this in a box where $-1 \le x \le 1$ and $0 \le y \le 1$. If we throw $2000$ darts and $1580$ land inside the region, estimate the value of $\pi$.
Reveal solution
  1. The area of the box is $2 \times 1 = 2$.
  2. The estimated area of the region is $2 \times \frac{1580}{2000} = 2 \times 0.79 = 1.58$.
  3. The region is a semi-circle of radius $1$, so its exact area is $\frac{1}{2}\pi(1)^2 = \frac{\pi}{2}$.
  4. Setting $\frac{\pi}{2} \approx 1.58$, we find $\pi \approx 1.58 \times 2 = 3.16$.

Answer: 3.16

L74. Random walks and the drunkard's return

Module 5  2026-10-17  ·  13:45  ·  practice PDF

Practice problems (3)
Problem 1. A random walker in one dimension starts at $0$. After $12$ steps, what is the probability that the walker is at position $4$?
Reveal solution
  1. Let $r$ be right steps and $l$ be left steps. We need $r - l = 4$ and $r + l = 12$.
  2. Adding the equations: $2r = 16$, so $r = 8$. Then $l = 4$.
  3. The probability is $\binom{12}{8} (0.5)^{12}$.
  4. $\binom{12}{8} = 495$.
  5. $495 / 4096 \approx 0.1208$.

Answer: 0.1208

Problem 2. In a two dimensional random walk, a walker takes $2$ steps. What is the probability they return to the origin $(0,0)$?
Reveal solution
  1. Total paths are $4^2 = 16$.
  2. To return, the walker must move in opposite directions: (Right, Left), (Left, Right), (Up, Down), or (Down, Up).
  3. There are $4$ such paths.
  4. Probability is $4 / 16 = 0.25$.

Answer: 0.25

Problem 3. A one dimensional walker takes $100$ steps. Using the normal approximation, what is the probability that the walker ends up at a position $S_{100} > 20$?
Reveal solution
  1. The mean is $E[S_{100}] = 0$.
  2. The standard deviation is $\sigma = \sqrt{100} = 10$.
  3. We calculate the z-score: $Z = (20 - 0) / 10 = 2$.
  4. We need $P(Z > 2)$.
  5. Using the standard normal table, $P(Z \le 2) \approx 0.9772$.
  6. The probability is $1 - 0.9772 = 0.0228$.

Answer: 0.0228

L75. Limit theorem clinic

Module 5  2026-10-18  ·  13:23  ·  practice PDF

Practice problems (3)
Problem 1. A fair six-sided die is rolled $n=100$ times. Use the Central Limit Theorem to estimate the probability that the sample mean $\bar{X}$ is between $3.2$ and $3.8$.
Reveal solution
  1. The mean of a single die is $\mu = 3.5$ and the variance is $\sigma^2 = 35/12 \approx 2.0833$.
  2. The standard deviation of the mean is $\sigma_{\bar{X}} = \sqrt{2.0833/100} \approx 0.1443$.
  3. Calculate z-scores: $z_1 = (3.2 - 3.5)/0.1443 \approx -2.08$ and $z_2 = (3.8 - 3.5)/0.1443 \approx 2.08$.
  4. Find the area between these z-scores: $P(-2.08 < Z < 2.08) \approx 0.9812 - 0.0188 = 0.9624$.

Answer: 0.9624

Problem 2. You are given a random variable $Y$ with mean $\mu = 50$ and standard deviation $\sigma = 10$. Without knowing the distribution of $Y$, what is the maximum possible probability that $Y$ is outside the interval $[20, 80]$?
Reveal solution
  1. The interval $[20, 80]$ is centered at the mean $50$.
  2. The distance from the mean to the boundary is $80 - 50 = 30$.
  3. Express this distance in terms of standard deviations: $k = 30/10 = 3$.
  4. Apply Chebyshev's inequality: $P(|Y - 50| \ge 30) \le 1/3^2 = 1/9$.

Answer: 1/9

Problem 3. A complex system fails if the sum of three independent components' lifetimes, each with a mean of $100$ hours and variance of $400$, is less than $250$ hours. Why is the Central Limit Theorem a poor choice here, and how would a Monte Carlo simulation help?
Reveal solution
  1. The sample size $n=3$ is very small, which violates the general rule of thumb ($n \ge 30$) for the CLT to be reliable unless the components are already normally distributed.
  2. A Monte Carlo simulation would allow us to generate thousands of triplets of lifetimes based on the actual distribution of the components.
  3. By summing these triplets and counting the proportion that fall below $250$, we get an empirical probability that doesn't rely on the normal approximation.

Answer: n=3 is too small for CLT; simulation provides empirical evidence without distribution assumptions.

L76. Module 5 review + self-test

Module 5  2026-10-19  ·  12:22  ·  practice PDF

Practice problems (3)
Problem 1. A sample of $n=50$ independent observations is taken from a distribution with mean $\mu=10$ and variance $\sigma^2=4$. Use the Central Limit Theorem to estimate the probability that the sample mean $\bar{X}$ is greater than $10.5$.
Reveal solution
  1. Identify the parameters: $\mu=10$, $\sigma=2$, $n=50$.
  2. Calculate the standard error: $\sigma_{\bar{X}} = \frac{2}{\sqrt{50}} \approx 0.2828$.
  3. Calculate the z-score: $z = \frac{10.5 - 10}{0.2828} \approx 1.768$.
  4. Find the probability $P(Z > 1.768)$ using the normal table, which is approximately $0.0385$.

Answer: 0.0385

Problem 2. A random variable $X$ has a mean of $100$ and a standard deviation of $15$. Without knowing the distribution of $X$, what is the maximum possible probability that $X$ is less than $55$ or greater than $145$?
Reveal solution
  1. The range is $100 \pm 45$.
  2. Calculate $k$ as the number of standard deviations: $k = \frac{45}{15} = 3$.
  3. Apply Chebyshev's inequality: $P(|X - 100| \ge 45) \le \frac{1}{3^2}$.
  4. Compute the result: $\frac{1}{9} \approx 0.1111$.

Answer: 0.1111

Problem 3. A particle performs a 1D random walk starting at $0$. In each step, it moves $+1$ with probability $0.7$ and $-1$ with probability $0.3$. After $n=100$ steps, what is the probability that the particle is at position $S_{100} \ge 50$? Use the normal approximation with continuity correction.
Reveal solution
  1. Expected value of one step: $E[X] = 0.7 - 0.3 = 0.4$.
  2. Variance of one step: $\text{Var}(X) = 1 - (0.4)^2 = 0.84$.
  3. For $n=100$: $\mu_{S} = 100(0.4) = 40$ and $\sigma_{S} = \sqrt{100(0.84)} = \sqrt{84} \approx 9.165$.
  4. Apply continuity correction: $P(S_{100} \ge 50) \approx P(S_{norm} \ge 49.5)$.
  5. Calculate z-score: $z = \frac{49.5 - 40}{9.165} \approx 1.036$.
  6. Find $P(Z > 1.036) \approx 0.1501$.

Answer: 0.1501

Module 6 — Estimation (12/12)

L77. From probability to statistics: the inference U-turn

Module 6  2026-10-20  ·  12:03  ·  practice PDF

Practice problems (3)
Problem 1. A researcher knows that a certain drug has a $20\%$ success rate. They want to find the probability that at least $3$ out of $10$ patients recover. Is this a forward probability problem or an inverse inference problem? Explain why.
Reveal solution
  1. Identify the knowns: The success rate $p = 0.2$ is given.
  2. Identify the goal: Find the probability of a specific data outcome (at least $3$ recoveries).
  3. Since we move from a known parameter to a predicted outcome, it is a forward problem.

Answer: Forward probability problem.

Problem 2. A quality control engineer tests $50$ components and finds that $2$ are defective. They want to estimate the overall defect rate of the entire production line. Is this a forward probability problem or an inverse inference problem? Explain why.
Reveal solution
  1. Identify the knowns: The data is fixed ($2$ defects out of $50$).
  2. Identify the goal: Estimate the population parameter $p$.
  3. Since we move from observed data to an unknown parameter, it is an inverse inference problem.

Answer: Inverse inference problem.

Problem 3. Consider a scenario where you are told that a population follows a normal distribution with $\mu = 100$ and $\sigma = 15$. You are asked to find the percentage of the population with a score above $130$. Then, you are told you have a sample of $30$ people with an average score of $105$, and you are asked to guess the true population mean. Contrast these two tasks in terms of the 'inference U-turn'.
Reveal solution
  1. Task 1: Parameters $\mu=100, \sigma=15$ are known. We predict the data (percentage above $130$). This is the forward direction.
  2. Task 2: Data (sample mean $105$) is known. We estimate the parameter $\mu$. This is the inverse direction.
  3. The shift from Task 1 to Task 2 represents the U-turn from probability to statistics.

Answer: Task 1 is forward (probability); Task 2 is inverse (inference).

L78. Populations, samples, and sampling distributions

Module 6  2026-10-21  ·  12:45  ·  practice PDF

Practice problems (3)
Problem 1. A population has a standard deviation of $\sigma = 24$. If a random sample of size $n = 64$ is taken, what is the standard error of the sample mean?
Reveal solution
  1. Identify the population standard deviation $\sigma = 24$ and sample size $n = 64$.
  2. Use the formula $SE = \frac{\sigma}{\sqrt{n}}$.
  3. Calculate the square root of 64, which is 8.
  4. Divide 24 by 8 to get 3.

Answer: 3

Problem 2. A population has a mean $\mu = 50$ and a standard deviation $\sigma = 10$. For a sample of size $n = 25$, what is the probability that the sample mean $\bar{X}$ is less than 48?
Reveal solution
  1. Calculate the standard error: $SE = \frac{10}{\sqrt{25}} = \frac{10}{5} = 2$.
  2. Calculate the z-score for $\bar{X} = 48$: $z = \frac{48 - 50}{2} = \frac{-2}{2} = -1$.
  3. Find the probability $P(Z < -1)$ using the standard normal distribution.
  4. The area to the left of $z = -1$ is approximately $0.1587$.

Answer: 0.1587

Problem 3. You want to estimate a population mean with a standard deviation of $\sigma = 12$. You want the standard error of your sample mean to be no more than 1.5. What is the minimum sample size $n$ required?
Reveal solution
  1. Set up the inequality $SE = \frac{12}{\sqrt{n}} \le 1.5$.
  2. Rearrange to solve for $\sqrt{n}$: $\sqrt{n} \ge \frac{12}{1.5}$.
  3. Calculate $12 / 1.5 = 8$.
  4. Square both sides to find $n$: $n \ge 8^2 = 64$.

Answer: 64

L79. Point estimation; bias and variance of estimators

Module 6  2026-10-22  ·  12:00  ·  practice PDF

Practice problems (3)
Problem 1. Consider a sample $X_1, X_2$ from a population with mean $\mu$. We propose the estimator $\hat{\theta} = \frac{X_1 + 2X_2}{3}$. Is this estimator unbiased for $\mu$?
Reveal solution
  1. Find the expected value: $E[\hat{\theta}] = E[\frac{X_1 + 2X_2}{3}]$
  2. Use linearity of expectation: $E[\hat{\theta}] = \frac{1}{3}(E[X_1] + 2E[X_2])$
  3. Substitute $E[X_1] = \mu$ and $E[X_2] = \mu$: $E[\hat{\theta}] = \frac{1}{3}(\mu + 2\mu) = \frac{3\mu}{3} = \mu$
  4. Since $E[\hat{\theta}] = \mu$, the bias is zero.

Answer: Yes, it is unbiased.

Problem 2. An estimator $\hat{\theta}$ has a variance of $0.25$ and a bias of $0.5$. Calculate the Mean Squared Error (MSE) of this estimator.
Reveal solution
  1. Identify the given values: $\text{Var}(\hat{\theta}) = 0.25$ and $\text{Bias}(\hat{\theta}) = 0.5$
  2. Use the MSE formula: $\text{MSE} = \text{Var}(\hat{\theta}) + [\text{Bias}(\hat{\theta})]^2$
  3. Substitute the values: $\text{MSE} = 0.25 + (0.5)^2$
  4. Compute the square: $0.5^2 = 0.25$
  5. Sum the results: $0.25 + 0.25 = 0.5$

Answer: 0.5

Problem 3. Suppose we estimate the population mean $\mu$ using $\hat{\theta} = \bar{X} + \frac{1}{n}$, where $\bar{X}$ is the sample mean and $n$ is the sample size. Find the bias of this estimator and determine if it is unbiased as $n$ approaches infinity.
Reveal solution
  1. Find the expectation: $E[\hat{\theta}] = E[\bar{X} + \frac{1}{n}] = E[\bar{X}] + \frac{1}{n}$
  2. Since $E[\bar{X}] = \mu$, we have $E[\hat{\theta}] = \mu + \frac{1}{n}$
  3. Calculate bias: $\text{Bias} = E[\hat{\theta}] - \mu = (\mu + \frac{1}{n}) - \mu = \frac{1}{n}$
  4. Take the limit as $n \to \infty$: $\lim_{n \to \infty} \frac{1}{n} = 0$

Answer: The bias is $1/n$; it becomes unbiased in the limit as $n$ approaches infinity.

L80. Why divide by n-1? The sample variance mystery, solved

Module 6  2026-10-23  ·  12:02  ·  practice PDF

Practice problems (3)
Problem 1. Given the sample data $X = \{2, 4, 6, 8\}$, calculate the unbiased sample variance $s^2$.
Reveal solution
  1. Calculate the sample mean: $\bar{X} = (2+4+6+8)/4 = 5$.
  2. Calculate squared deviations: $(2-5)^2=9$, $(4-5)^2=1$, $(6-5)^2=1$, $(8-5)^2=9$.
  3. Sum the squared deviations: $9+1+1+9 = 20$.
  4. Divide by $n-1 = 3$: $s^2 = 20/3 \approx 6.67$.

Answer: 6.67

Problem 2. A researcher takes a sample of size $n=10$ and finds the biased variance (dividing by $n$) to be $18$. What is the unbiased sample variance $s^2$?
Reveal solution
  1. The biased variance is $s^2_{\text{biased}} = 18$.
  2. The relationship is $s^2 = \frac{n}{n-1} s^2_{\text{biased}}$.
  3. Substitute the values: $s^2 = \frac{10}{9} \times 18$.
  4. Calculate: $s^2 = 10 \times 2 = 20$.

Answer: 20

Problem 3. Explain why the bias of the sample variance decreases as the sample size $n$ increases, and calculate the ratio of the unbiased estimator to the biased estimator for $n=100$.
Reveal solution
  1. The bias exists because the sample mean is used instead of the population mean, which underestimates the spread.
  2. The correction factor is $\frac{n}{n-1}$.
  3. As $n \to \infty$, the term $\frac{n}{n-1} \to 1$, meaning the correction becomes smaller.
  4. For $n=100$, the ratio is $100/99 \approx 1.0101$.

Answer: 1.0101

L81. Maximum likelihood I — the principle

Module 6  2026-10-24  ·  14:44  ·  practice PDF

Practice problems (3)
Problem 1. A coin is flipped 4 times, resulting in 3 heads and 1 tail. Find the Maximum Likelihood Estimate for the probability of heads $\theta$.
Reveal solution
  1. The likelihood is $\mathcal{L}(\theta) = \theta^3(1-\theta)^1$.
  2. The log-likelihood is $l(\theta) = 3\ln(\theta) + \ln(1-\theta)$.
  3. The derivative is $l'(\theta) = \frac{3}{\theta} - \frac{1}{1-\theta}$.
  4. Setting $l'(\theta) = 0$ gives $3(1-\theta) = \theta$, so $3 - 3\theta = \theta$.
  5. Solving for $\theta$ gives $4\theta = 3$, so $\theta = 0.75$.

Answer: $\hat{\theta}_{MLE} = 0.75$

Problem 2. For an exponential distribution with density $f(x|\lambda) = \lambda e^{-\lambda x}$, you observe a single data point $x = 5$. Find the MLE for $\lambda$.
Reveal solution
  1. The likelihood is $\mathcal{L}(\lambda) = \lambda e^{-5\lambda}$.
  2. The log-likelihood is $l(\lambda) = \ln(\lambda) - 5\lambda$.
  3. The derivative is $l'(\lambda) = \frac{1}{\lambda} - 5$.
  4. Setting $l'(\lambda) = 0$ gives $\frac{1}{\lambda} = 5$.
  5. Solving for $\lambda$ gives $\lambda = 0.2$.

Answer: $\hat{\lambda}_{MLE} = 0.2$

Problem 3. Suppose you have a Poisson distribution and observe two samples: $x_1 = 2$ and $x_2 = 4$. Find the MLE for $\lambda$.
Reveal solution
  1. The likelihood is $\mathcal{L}(\lambda) = \frac{e^{-\lambda}\lambda^2}{2!} \cdot \frac{e^{-\lambda}\lambda^4}{4!}$.
  2. The log-likelihood is $l(\lambda) = -2\lambda + 6\ln(\lambda) - \ln(2! \cdot 4!)$.
  3. The derivative is $l'(\lambda) = -2 + \frac{6}{\lambda}$.
  4. Setting $l'(\lambda) = 0$ gives $\frac{6}{\lambda} = 2$.
  5. Solving for $\lambda$ gives $\lambda = 3$.

Answer: $\hat{\lambda}_{MLE} = 3$

L82. Maximum likelihood II — worked derivations

Module 6  2026-10-25  ·  14:18  ·  practice PDF

Practice problems (3)
Problem 1. A basketball player makes $12$ out of $15$ free throws. Using the Bernoulli MLE derivation, find the estimate $\hat{p}$ for the probability of success.
Reveal solution
  1. Identify the number of trials $n = 15$ and the number of successes $\sum x_i = 12$.
  2. Use the derived Bernoulli MLE formula $\hat{p} = \frac{\sum x_i}{n}$.
  3. Calculate $\hat{p} = \frac{12}{15}$.
  4. Simplify the fraction to $0.8$.

Answer: 0.8

Problem 2. A call center receives an average of $x_1=5, x_2=8, x_3=2$ calls per minute over three minutes. Find the MLE $\hat{\lambda}$ for the Poisson rate of calls per minute.
Reveal solution
  1. Identify the sample data: $5, 8, 2$ with $n = 3$.
  2. Use the Poisson MLE formula $\hat{\lambda} = \frac{\sum x_i}{n}$.
  3. Sum the observations: $5 + 8 + 2 = 15$.
  4. Divide by the sample size: $15 / 3 = 5$.

Answer: 5

Problem 3. Suppose you have a sample of $n$ observations from a Normal distribution with known variance $\sigma^2$. Show that the log-likelihood $l(\mu)$ is maximized when $\mu$ equals the sample mean $\bar{X}$.
Reveal solution
  1. Write the log-likelihood: $l(\mu) = -\frac{n}{2}\ln(2\pi\sigma^2) - \frac{1}{2\sigma^2} \sum (x_i - \mu)^2$.
  2. Differentiate with respect to $\mu$: $\frac{d}{d\mu} l(\mu) = \frac{1}{\sigma^2} \sum (\mu - x_i)$.
  3. Set the derivative to zero: $\sum (\mu - x_i) = 0$.
  4. Expand the sum: $n\mu - \sum x_i = 0$.
  5. Solve for $\mu$: $\mu = \frac{\sum x_i}{n} = \bar{X}$.

Answer: \hat{\mu} = \bar{X}

L83. Confidence intervals I — the idea

Module 6  2026-10-26  ·  13:11  ·  practice PDF

Practice problems (3)
Problem 1. A researcher calculates a $95\%$ confidence interval for the average weight of a fruit to be $[140\text{g}, 160\text{g}]$. Which of the following is the correct interpretation? A) There is a $95\%$ probability that the true mean weight is between $140\text{g}$ and $160\text{g}$. B) $95\%$ of all fruits in the population weigh between $140\text{g}$ and $160\text{g}$. C) If we repeated this sampling process many times, $95\%$ of the resulting intervals would contain the true mean weight.
Reveal solution
  1. Option A is incorrect because the true mean is a fixed constant, not a random variable; it is either in the interval or it is not.
  2. Option B is incorrect because the confidence interval estimates the population mean, not the distribution of individual values.
  3. Option C correctly describes the confidence level as the long-run success rate of the interval-generating procedure.

Answer: C

Problem 2. Suppose you have a $95\%$ confidence interval for a population mean. If you decide to increase the confidence level to $99\%$ while keeping the sample size and the data the same, what happens to the width of the interval?
Reveal solution
  1. To be more confident that the interval captures the true mean, we must account for more of the sampling distribution.
  2. This requires a larger multiplier for the margin of error.
  3. A larger multiplier increases the distance from the point estimate to the boundaries.

Answer: The interval becomes wider.

Problem 3. A scientist finds that a sample of size $n=25$ gives a $95\%$ confidence interval width of $10$ units. If the scientist increases the sample size to $n=100$ and finds the same sample mean and standard deviation, what is the new width of the $95\%$ confidence interval?
Reveal solution
  1. The width of the interval is proportional to the standard error, which is $\frac{\sigma}{\sqrt{n}}$.
  2. The original width is proportional to $1/\sqrt{25} = 1/5$.
  3. The new width is proportional to $1/\sqrt{100} = 1/10$.
  4. The ratio of the new width to the old width is $(1/10) / (1/5) = 1/2$.
  5. Therefore, the new width is $10 \times 0.5 = 5$.

Answer: 5 units

L84. Confidence intervals II — for a mean, sigma known

Module 6  2026-10-27  ·  13:42  ·  practice PDF

Practice problems (3)
Problem 1. A researcher finds that a sample of $n = 36$ lightbulbs has a mean life of $\bar{x} = 72$ hours. The population standard deviation is known to be $\sigma = 6$ hours. Calculate a $99\%$ confidence interval for the true population mean.
Reveal solution
  1. Identify the knowns: $\bar{x} = 72$, $\sigma = 6$, $n = 36$.
  2. For $99\%$ confidence, the critical value $z$ is $2.58$.
  3. Calculate the standard error: $\text{SE} = 6 / \sqrt{36} = 6 / 6 = 1$.
  4. Calculate the margin of error: $\text{ME} = 2.58 \times 1 = 2.58$.
  5. Construct the interval: $72 \pm 2.58$.

Answer: [69.42, 74.58]

Problem 2. A company knows the population standard deviation of the weight of its cereal boxes is $\sigma = 0.5$ ounces. A sample of $n = 64$ boxes has a mean weight of $\bar{x} = 16.2$ ounces. Find the $95\%$ confidence interval for the population mean.
Reveal solution
  1. Identify the knowns: $\bar{x} = 16.2$, $\sigma = 0.5$, $n = 64$.
  2. For $95\%$ confidence, $z = 1.96$.
  3. Calculate the standard error: $\text{SE} = 0.5 / \sqrt{64} = 0.5 / 8 = 0.0625$.
  4. Calculate the margin of error: $\text{ME} = 1.96 \times 0.0625 = 0.1225$.
  5. Construct the interval: $16.2 \pm 0.1225$.

Answer: [16.0775, 16.3225]

Problem 3. You want to estimate the average height of a plant species with $95\%$ confidence. You know $\sigma = 3$ cm. If you want the margin of error to be no more than $0.5$ cm, what is the minimum sample size $n$ required?
Reveal solution
  1. Set up the margin of error formula: $\text{ME} = z \frac{\sigma}{\sqrt{n}}$.
  2. Substitute the knowns: $0.5 = 1.96 \times \frac{3}{\sqrt{n}}$.
  3. Solve for $\sqrt{n}$: $\sqrt{n} = (1.96 \times 3) / 0.5 = 5.88 / 0.5 = 11.76$.
  4. Square both sides: $n = 11.76^2 = 138.2976$.
  5. Since $n$ must be an integer, round up to the nearest whole number.

Answer: 139

L85. The t-distribution; intervals with sigma unknown

Module 6  2026-10-28  ·  12:30  ·  practice PDF

Practice problems (3)
Problem 1. A sample of $n=15$ measurements has a mean of $\bar{x}=82$ and a sample standard deviation of $s=6$. Compute a $95\%$ confidence interval for the population mean. Use $t^*(df=14, 95\%) = 2.145$.
Reveal solution
  1. Identify the given values: $\bar{x}=82$, $s=6$, $n=15$.
  2. Calculate the standard error: $\text{SE} = 6 / \sqrt{15} \approx 1.549$.
  3. Calculate the margin of error: $\text{ME} = 2.145 \times 1.549 \approx 3.323$.
  4. Construct the interval: $82 \pm 3.323$.

Answer: [78.677, 85.323]

Problem 2. A researcher finds that $n=20$ samples of a chemical have an average purity of $98.5\%$ with a sample standard deviation of $0.8\%$. Find the $99\%$ confidence interval. Use $t^*(df=19, 99\%) = 2.861$.
Reveal solution
  1. Identify the given values: $\bar{x}=98.5$, $s=0.8$, $n=20$.
  2. Calculate the standard error: $\text{SE} = 0.8 / \sqrt{20} \approx 0.1789$.
  3. Calculate the margin of error: $\text{ME} = 2.861 \times 0.1789 \approx 0.512$.
  4. Construct the interval: $98.5 \pm 0.512$.

Answer: [97.988, 99.012]

Problem 3. You have a sample of $n=5$ items with $\bar{x}=10$ and $s=2$. You want the margin of error to be no more than $1.5$. Is a $90\%$ confidence interval sufficient? Use $t^*(df=4, 90\%) = 2.132$.
Reveal solution
  1. Calculate the standard error: $\text{SE} = 2 / \sqrt{5} \approx 0.8944$.
  2. Calculate the margin of error for $90\%$ confidence: $\text{ME} = 2.132 \times 0.8944 \approx 1.907$.
  3. Compare the calculated margin of error $1.907$ to the required $1.5$.
  4. Since $1.907 > 1.5$, the interval is too wide.

Answer: No, the margin of error is $1.907$, which exceeds $1.5$.

L86. Confidence intervals for proportions; polls

Module 6  2026-10-29  ·  15:17  ·  practice PDF

Practice problems (3)
Problem 1. A survey of $n = 500$ people finds that $340$ support a new law. Calculate the $95\%$ confidence interval for the population proportion of support.
Reveal solution
  1. Calculate the sample proportion: $\hat{p} = 340 / 500 = 0.68$.
  2. Find the standard error: $\text{SE} = \sqrt{(0.68 \times 0.32) / 500} \approx 0.0209$.
  3. Use $z^* = 1.96$ for $95\%$ confidence: $\text{MOE} = 1.96 \times 0.0209 \approx 0.041$.
  4. Construct the interval: $0.68 \pm 0.041$.

Answer: [0.639, 0.721]

Problem 2. A quality control manager wants to estimate the proportion of defective parts in a batch. To be $90\%$ confident that the estimate is within $3\%$ of the true proportion, what is the minimum sample size needed? (Use the conservative estimate for $\hat{p}$).
Reveal solution
  1. Identify values: $z^* = 1.645$ for $90\%$ confidence, $\text{MOE} = 0.03$, and $\hat{p} = 0.5$.
  2. Apply the formula: $n = (1.645 / 0.03)^2 \times 0.25$.
  3. Calculate: $n = (54.833)^2 \times 0.25 \approx 3006.7$.
  4. Round up to the nearest whole number.

Answer: 3007

Problem 3. A poll of $1200$ people shows that $45\%$ prefer Brand A. If the margin of error is $2.8\%$ at a $95\%$ confidence level, would the interval for the proportion of people who prefer Brand A include $50\%$?
Reveal solution
  1. The sample proportion is $\hat{p} = 0.45$.
  2. The margin of error is $\text{MOE} = 0.028$.
  3. The confidence interval is $0.45 \pm 0.028$, which is $[0.422, 0.478]$.
  4. Check if $0.50$ is within the range $[0.422, 0.478]$.

Answer: No

L87. Sample size planning

Module 6  2026-10-30  ·  13:28  ·  practice PDF

Practice problems (3)
Problem 1. Find the minimum sample size $n$ required to estimate a population proportion with a margin of error of $0.04$ at a $95\%$ confidence level, assuming no prior knowledge of the proportion.
Reveal solution
  1. Identify the critical value for $95\%$ confidence: $z^* = 1.96$.
  2. Use the conservative estimate $\hat{p} = 0.5$, so $\hat{p}(1-\hat{p}) = 0.25$.
  3. Plug values into the formula: $n = \frac{0.25(1.96)^2}{(0.04)^2}$.
  4. Calculate: $n = \frac{0.9604}{0.0016} = 600.25$.
  5. Round up to the nearest integer: $n = 601$.

Answer: 601

Problem 2. A researcher believes the proportion of a certain trait in a population is approximately $30\%$. How many people must be sampled to be $90\%$ confident that the estimate is within $3\%$ of the true proportion?
Reveal solution
  1. Identify the critical value for $90\%$ confidence: $z^* = 1.645$.
  2. Use the prior estimate $\hat{p} = 0.3$, so $\hat{p}(1-\hat{p}) = 0.3 \times 0.7 = 0.21$.
  3. Set the margin of error $\text{MOE} = 0.03$.
  4. Plug into the formula: $n = \frac{(1.645)^2 (0.21)}{(0.03)^2}$.
  5. Calculate: $n = \frac{2.706025 \times 0.21}{0.0009} = \frac{0.56826525}{0.0009} \approx 631.41$.
  6. Round up to the nearest integer: $n = 632$.

Answer: 632

Problem 3. You want to reduce your margin of error from $5\%$ to $2.5\%$ while keeping the confidence level and the proportion estimate the same. By what factor must the sample size $n$ increase?
Reveal solution
  1. The formula for $n$ is $n = \frac{C}{\text{MOE}^2}$ where $C$ is a constant for a fixed $z^*$ and $\hat{p}$.
  2. Let $n_1$ be the size for $\text{MOE}_1 = 0.05$ and $n_2$ be the size for $\text{MOE}_2 = 0.025$.
  3. The ratio is $\frac{n_2}{n_1} = \frac{C / (0.025)^2}{C / (0.05)^2} = \frac{(0.05)^2}{(0.025)^2}$.
  4. Simplify the ratio: $\left( \frac{0.05}{0.025} \right)^2 = 2^2 = 4$.
  5. The sample size must increase by a factor of 4.

Answer: 4

L88. Module 6 review + self-test

Module 6  2026-10-31  ·  12:50  ·  practice PDF

Practice problems (3)
Problem 1. A sample of $n=12$ measurements has a mean of $\bar{x}=84$ and a sample standard deviation of $s=6$. Compute a $99\%$ confidence interval for the population mean.
Reveal solution
  1. Identify that $\sigma$ is unknown, so use the t-distribution with $\text{df} = 12 - 1 = 11$.
  2. Find the critical value $t^*$ for $99\%$ confidence and $11$ degrees of freedom, which is approximately $3.106$.
  3. Calculate the standard error: $\text{SE} = 6 / \sqrt{12} \approx 1.732$.
  4. Calculate the margin of error: $\text{MOE} = 3.106 \times 1.732 \approx 5.38$.
  5. The interval is $84 \pm 5.38$.

Answer: [78.62, 89.38]

Problem 2. In a survey of $500$ people, $210$ stated they prefer tea over coffee. Calculate a $95\%$ confidence interval for the population proportion of tea lovers.
Reveal solution
  1. Calculate the sample proportion: $\hat{p} = 210 / 500 = 0.42$.
  2. Identify the critical value $z^*$ for $95\%$ confidence, which is $1.96$.
  3. Calculate the standard error: $\text{SE} = \sqrt{(0.42 \times 0.58) / 500} \approx 0.0220$.
  4. Calculate the margin of error: $\text{MOE} = 1.96 \times 0.0220 \approx 0.043$.
  5. The interval is $0.42 \pm 0.043$.

Answer: [0.377, 0.463]

Problem 3. A pollster wants to estimate a population proportion with a margin of error of $2\%$ at a $90\%$ confidence level. What is the minimum sample size required if no prior estimate of the proportion is available?
Reveal solution
  1. Use the conservative estimate $\hat{p} = 0.5$.
  2. Identify the critical value $z^*$ for $90\%$ confidence, which is $1.645$.
  3. Set the margin of error $\text{MOE} = 0.02$.
  4. Apply the formula: $n = (1.645 / 0.02)^2 \times 0.5 \times 0.5$.
  5. Calculate: $n = (82.25)^2 \times 0.25 = 6765.0625 \times 0.25 = 1691.26$.
  6. Round up to the nearest whole number.

Answer: 1692

Module 7 — Hypothesis Testing (0/14)
L89. The logic of hypothesis testing tomorrow 08:00
L90. Null and alternative; test statistics and rejection regions
L91. The p-value — what it is and what it absolutely is not
L92. z-tests for means and proportions
L93. Type I and Type II errors; power
L94. The t-test I — one sample
L95. The t-test II — two samples; paired designs
L96. Chi-squared tests I — goodness of fit
L97. Chi-squared tests II — independence in tables
L98. ANOVA — comparing several means (first look)
L99. p-hacking, multiple comparisons, and the replication crisis
L100. Practical vs statistical significance; effect sizes
L101. Testing clinic — choosing the right test
L102. Module 7 review + self-test
Module 8 — Regression (0/12)
L103. Correlation revisited; Anscombe's quartet
L104. Simple linear regression I — the least squares line
L105. Simple linear regression II — deriving the coefficients
L106. Interpreting slope, intercept, and R-squared
L107. Residual analysis — when the model lies
L108. Inference for regression: is the slope real?
L109. Prediction vs confidence intervals for regression
L110. Multiple regression — the matrix formulation
L111. Regression pitfalls
L112. Regression to the mean
L113. Regression clinic — a full analysis
L114. Module 8 review + self-test
Module 9 — Bayesian Basics (0/4)
L115. Bayesian thinking: probability as degree of belief
L116. Conjugate updating: the Beta-Binomial
L117. Bayesian vs frequentist — the actual argument
L118. Epilogue and grand review