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 43 of 118 · Module 3: Continuous Random Variables

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 (3/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 tomorrow 08:00
L45. The exponential distribution — memorylessness
L46. Exponential and Poisson: two views of one process
L47. The normal distribution I — meet the bell curve
L48. The normal distribution II — why root two pi?
L49. Standardisation and the z-table; 68-95-99.7
L50. Normal computations clinic
L51. Transformations of random variables
L52. The Gamma and Beta distributions
L53. Quantiles, percentiles, and the median
L54. Module 3 review + self-test
Module 4 — Joint Distributions & Dependence (0/12)
L55. Joint distributions — randomness in two dimensions
L56. Marginal and conditional distributions
L57. Independence of random variables
L58. Covariance — do they move together?
L59. Correlation — the standardised story (and its limits)
L60. Sums of random variables; convolution intuition
L61. Expectation and variance of sums — the key identities
L62. The bivariate normal — the 3D bell
L63. Conditional expectation — the best guess
L64. The law of iterated expectation
L65. Covariance clinic — portfolio variance
L66. Module 4 review + self-test
Module 5 — Limit Theorems (0/10)
L67. The sample mean as a random variable
L68. Markov and Chebyshev inequalities
L69. The Law of Large Numbers — why casinos always win
L70. The Central Limit Theorem I — the miracle, watched live
L71. The Central Limit Theorem II — why the normal appears everywhere
L72. CLT in action: normal approximation to the binomial
L73. Simulation as a tool: Monte Carlo methods
L74. Random walks and the drunkard's return
L75. Limit theorem clinic
L76. Module 5 review + self-test
Module 6 — Estimation (0/12)
L77. From probability to statistics: the inference U-turn
L78. Populations, samples, and sampling distributions
L79. Point estimation; bias and variance of estimators
L80. Why divide by n-1? The sample variance mystery, solved
L81. Maximum likelihood I — the principle
L82. Maximum likelihood II — worked derivations
L83. Confidence intervals I — the idea
L84. Confidence intervals II — for a mean, sigma known
L85. The t-distribution; intervals with sigma unknown
L86. Confidence intervals for proportions; polls
L87. Sample size planning
L88. Module 6 review + self-test
Module 7 — Hypothesis Testing (0/14)
L89. The logic of hypothesis testing
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