Practice Maths

Topic Review — Discrete Random Variables — Solutions

← Discrete Random Variables

This review covers all lessons in this topic: discrete random variables and probability functions, mean/variance/standard deviation, Bernoulli distributions, and binomial distributions. Questions are mixed in difficulty. Click each answer to reveal the worked solution.

Review Questions

  1. A discrete random variable X has the following probability distribution:
    x1234
    P(X=x)0.10.30.40.2
    Verify this is a valid probability distribution and find P(X ≥ 3).
    Validity: All probabilities are non-negative ✓ and 0.1 + 0.3 + 0.4 + 0.2 = 1.0 ✓
    P(X ≥ 3) = P(X=3) + P(X=4) = 0.4 + 0.2 = 0.6
  2. A bag contains 3 red and 2 blue balls. One ball is drawn. Let X = 1 if red, X = 0 if blue. Write the probability distribution of X and state what type of random variable this is.
    P(X=1) = 3/5 = 0.6,   P(X=0) = 2/5 = 0.4
    x01
    P(X=x)0.40.6
    This is a Bernoulli random variable with p = 0.6.
  3. Find the value of k that makes the following a valid probability distribution, where P(X=x) = kx for x = 1, 2, 3, 4, 5.
    Sum of all probabilities = 1:
    k(1) + k(2) + k(3) + k(4) + k(5) = 1
    15k = 1
    k = 1/15
  4. For a Bernoulli random variable with p = 0.35, find E(X), Var(X) and SD(X).
    E(X) = p = 0.35
    Var(X) = p(1−p) = 0.35 × 0.65 = 0.2275
    SD(X) = √0.2275 ≈ 0.477
  5. A discrete random variable X has E(X) = 4 and E(X²) = 20. Find Var(X) and SD(X).
    Var(X) = E(X²) − [E(X)]² = 20 − 4² = 20 − 16 = 4
    SD(X) = √4 = 2
  6. Let X ~ Bin(8, 0.3). Find: (a) P(X = 2)   (b) P(X ≤ 1)   (c) E(X) and SD(X).
    (a) P(X=2) = C(8,2)(0.3)²(0.7)6 = 28 × 0.09 × 0.117649 ≈ 0.2965
    (b) P(X≤1) = P(X=0) + P(X=1)
    P(X=0) = (0.7)8 ≈ 0.0576
    P(X=1) = 8(0.3)(0.7)7 ≈ 0.1977
    P(X≤1) ≈ 0.0576 + 0.1977 ≈ 0.2553
    (c) E(X) = np = 8 × 0.3 = 2.4
    Var(X) = np(1−p) = 8 × 0.3 × 0.7 = 1.68;   SD(X) = √1.68 ≈ 1.296
  7. A fair coin is tossed 6 times. Let X = number of heads. Find P(X = 4) and P(at least 4 heads).
    X ~ Bin(6, 0.5)
    P(X=4) = C(6,4)(0.5)4(0.5)² = 15 × (1/64) = 15/64 ≈ 0.2344
    P(X≥4) = P(X=4) + P(X=5) + P(X=6)
    P(X=5) = C(6,5)(0.5)6 = 6/64
    P(X=6) = (0.5)6 = 1/64
    P(X≥4) = 15/64 + 6/64 + 1/64 = 22/64 = 11/32 ≈ 0.344
  8. A random variable X has the probability distribution:
    x0123
    P(X=x)0.20.40.30.1
    Calculate E(X) and Var(X).
    E(X) = 0(0.2) + 1(0.4) + 2(0.3) + 3(0.1) = 0 + 0.4 + 0.6 + 0.3 = 1.3
    E(X²) = 0(0.2) + 1(0.4) + 4(0.3) + 9(0.1) = 0 + 0.4 + 1.2 + 0.9 = 2.5
    Var(X) = E(X²) − [E(X)]² = 2.5 − 1.69 = 0.81
  9. In a multiple-choice test, each question has 4 options and one correct answer. If a student randomly guesses on 10 questions, find the probability they get exactly 3 correct. What is the expected number of correct answers?
    X ~ Bin(10, 0.25) where p = 1/4 (probability of correct guess)
    P(X=3) = C(10,3)(0.25)³(0.75)7 = 120 × 0.015625 × 0.13348 ≈ 0.2503
    E(X) = np = 10 × 0.25 = 2.5 correct answers
  10. A factory produces items of which 5% are defective. A quality inspector samples 20 items. Let X = number of defective items.
    • (a) State the distribution of X and its parameters.
    • (b) Find the probability that at most 1 item is defective.
    • (c) Find E(X) and interpret this in context.
    (a) X ~ Bin(20, 0.05)
    (b) P(X≤1) = P(X=0) + P(X=1)
    P(X=0) = (0.95)20 ≈ 0.3585
    P(X=1) = 20(0.05)(0.95)19 ≈ 0.3774
    P(X≤1) ≈ 0.3585 + 0.3774 ≈ 0.736
    (c) E(X) = 20 × 0.05 = 1. On average, the inspector expects to find 1 defective item per sample of 20.
  11. The probability that a basketball player scores on any given free throw is 0.7. She takes 5 free throws. Find the probability she scores on more than 3 throws.
    X ~ Bin(5, 0.7)
    P(X>3) = P(X=4) + P(X=5)
    P(X=4) = C(5,4)(0.7)4(0.3) = 5 × 0.2401 × 0.3 ≈ 0.3602
    P(X=5) = (0.7)5 ≈ 0.1681
    P(X>3) ≈ 0.3602 + 0.1681 ≈ 0.5282
  12. Let X ~ Bin(n, p) with E(X) = 6 and Var(X) = 4.2. Find n and p.
    E(X) = np = 6   …(i)
    Var(X) = np(1−p) = 4.2   …(ii)
    Dividing (ii) by (i): 1 − p = 4.2/6 = 0.7, so p = 0.3
    From (i): n = 6/0.3 = n = 20
    Distribution: X ~ Bin(20, 0.3)
  13. A Bernoulli trial succeeds with probability p. If the mean of the distribution is 0.4, find:
    • (a) The value of p
    • (b) P(X = 1)
    • (c) The variance
    (a) For Bernoulli: E(X) = p = 0.4
    (b) P(X=1) = p = 0.4
    (c) Var(X) = p(1−p) = 0.4 × 0.6 = 0.24
  14. A spinner has outcomes 1, 2, 3, 4, 5 each equally likely. X is the outcome of one spin. Calculate E(X), E(X²), Var(X) and SD(X).
    Each outcome has probability 1/5.
    E(X) = (1+2+3+4+5)/5 = 15/5 = 3
    E(X²) = (1+4+9+16+25)/5 = 55/5 = 11
    Var(X) = E(X²) − [E(X)]² = 11 − 9 = 2
    SD(X) = √2 ≈ 1.414
  15. A school estimates that 60% of students bring a lunch from home. A class of 12 students is selected. Let X = number of students who bring lunch.
    • (a) Find P(X = 7).
    • (b) Find P(5 ≤ X ≤ 8).
    • (c) Find the most likely number of students who bring lunch (the mode).
    X ~ Bin(12, 0.6)
    (a) P(X=7) = C(12,7)(0.6)7(0.4)5 = 792 × 0.02799 × 0.01024 ≈ 0.2270
    (b) Using CAS or formula:
    P(X=5) = C(12,5)(0.6)5(0.4)7 ≈ 0.1009
    P(X=6) = C(12,6)(0.6)6(0.4)6 ≈ 0.1766
    P(X=7) ≈ 0.2270 (from above)
    P(X=8) = C(12,8)(0.6)8(0.4)4 ≈ 0.2128
    P(5≤X≤8) ≈ 0.1009 + 0.1766 + 0.2270 + 0.2128 ≈ 0.7173
    (c) E(X) = 12 × 0.6 = 7.2. The mode is X = 7 (the integer closest to np when np is not an integer).