Menu
Sign up Sign in

AI SL · 13.2

Probability Distributions

13.2.6

Mean, variance and binomial practice

13.2.6

Mean, variance and binomial practice

Target: I can find the mean, variance and standard deviation of a binomial distribution from n and p. (+6 more)

By the end of this section

Key points

Mean and variance

  • If X ~ B(n, p), the mean is \(E(X) = np\).
  • The variance is \(Var(X) = np(1-p)\). The standard deviation is the square root of the variance.
  • The mean does not have to be a whole number, but X is always a whole number.
  • n and p are the parameters of the distribution. X is the random variable.

Choosing the calculation

  • Exactly k: binomial pdf. At most k or fewer than k: binomial cdf, with fewer than k meaning \(P(X \le k-1)\).
  • At least k: \(1 - P(X \le k-1)\). More than k: \(1 - P(X \le k)\).
  • At least one success: \(1 - P(X = 0)\).
  • More than the mean: find np first, then use the next whole number up. For a mean of 8.4, \(P(X > 8.4) = P(X \ge 9)\).

Working backwards, and one binomial inside another

  • Given the mean np and n, find \(p = \text{mean} \div n\), then use the distribution.
  • Given the mean and the variance, divide: \(1-p = \text{variance} \div \text{mean}\). Then \(n = \text{mean} \div p\).
  • A second binomial can use a probability from the first: if a pack fails with probability q, the number of failed packs out of N is \(B(N, q)\). Use the unrounded q.
  • To find the smallest n for \(P(X \ge 1) > c\): \(P(X \ge 1) = 1 - P(X = 0)\), so look for the first n with \(P(X = 0) < 1 - c\). Make a table of the calculator's values for increasing n. n is a whole number.
  • To find how many tickets can be sold: the risk is \(P(X > \text{seats}) = 1 - P(X \le \text{seats})\). Find the largest n that keeps it below the limit. A mean of at most the number of seats is not enough: the risk can still be large.

Assumptions in context

  • State the four conditions in the words of the question: a fixed number of items, each a success or a failure, independent, with the same probability.
  • To criticise an assumption, say how one item could affect another, such as items sharing a van, a room or a machine.
  • Say "assume the model is valid" when a question tells you to carry on.

On the calculator

Binomial pdf and cdf

  • Enter n, p and x for an exact value, or n, p, lower and upper for a range.
  • Write the settings you used as part of your working.

Screenshot and video to come

Using an answer in the next part

  • Keep the unrounded value from the calculator for the next calculation.
  • In working, write the rounded value followed by … to show that more digits were kept.

Screenshot and video to come

Searching for n

  • Make a table of the binomial pdf or cdf for increasing values of n, keeping p and the value of x fixed.
  • Read down the table to the boundary, and write the two values either side of it in your working.

Screenshot and video to come

Explore: the binomial distribution

n trials, each a success with probability p. X is the number of successes. Choose which values of X to add up, or press a bar.

=

E(X) = np
Var(X) = np(1 − p)
Standard deviation

Move a slider to change the distribution.

  1. Set p = 0.5. What do you notice about the shape? What happens as p moves towards 0 or towards 1?
  2. Where is the tallest bar, compared with E(X) = np?
  3. Set lower = 3 and upper = n. Which single "at most" probability would you take away from 1 to get the same answer?
  4. Keep p fixed and make n larger. What happens to the spread, and to the height of the tallest bar?

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
Mean and standard deviation

A library finds that each book borrowed is returned late with probability 0.18, independently. Of 45 books borrowed, X are returned late. Find the mean and the standard deviation of X.

Working
  1. The distribution

    X ~ B(45, 0.18)

    n = 45, p = 0.18.

  2. Mean

    E(X) = np = 45 × 0.18 = 8.1

    The mean need not be a whole number.

  3. Variance

    Var(X) = np(1 − p) = 45 × 0.18 × 0.82 = 6.642

    Multiply by 1 − p as well.

  4. Standard deviation

    SD = √6.642 = 2.58

    The standard deviation is the square root of the variance.

Video walkthrough coming
The full distribution

Each of 5 students independently arrives late to a lesson with probability 0.4. X is the number of students who arrive late. Write down the probability distribution of X as a table, and find P(X = 3).

00.050.10.150.20.250.30.35−0.50.51.52.53.54.55.5xP(X = x)
Working
  1. Define X

    X ~ B(5, 0.4)

    X takes the values 0 to 5.

  2. List every value

    From the calculator: binomial pdf with n = 5, p = 0.4, x left blank gives P(X = 0) to P(X = 5)

    One pdf with x left blank gives all six probabilities.

  3. x012345P(X = x)0.07780.2590.3460.2300.07680.0102
    The table

    x = 0 to 5: 0.0778, 0.259, 0.346, 0.230, 0.0768, 0.0102

    The bar chart above shows the same values.

  4. Check and read

    The total is 1. P(X = 3) = 0.230

    A distribution always adds up to 1.

Video walkthrough coming
At least one, then a binomial of packs

A pack holds 12 batteries. Each battery is a dud with probability 0.02, independently. (a) Find the probability that a pack has at least one dud. (b) A shop buys 15 packs. A pack counts as failed if it has at least one dud. Find the probability that at least 2 of the 15 packs fail. The box asks for part (a).

Working
  1. Define X

    X = number of duds in a pack. X ~ B(12, 0.02)

    (a) 12 trials, p = 0.02.

  2. The complement

    P(X ≥ 1) = 1 − P(X = 0)

    At least one is everything except none.

  3. Calculator

    From the calculator: binomial pdf with n = 12, p = 0.02, x = 0; P(X = 0) = 0.7847 so P(X ≥ 1) = 1 − 0.7847 = 0.215

    Keep the unrounded value for part (b).

  4. A binomial of packs

    Y = number of failed packs. Y ~ B(15, 0.2153…)

    (b) Each pack fails with probability 0.2153…, independently. This is a second binomial built on the first.

  5. Complement again

    P(Y ≥ 2) = 1 − P(Y ≤ 1); From the calculator: binomial cdf with n = 15, p = 0.2153…, lower = 0, upper = 1; P(Y ≤ 1) = 0.1348, so P(Y ≥ 2) = 1 − 0.1348 = 0.865

    Use the stored, unrounded value for p.

Video walkthrough coming
How many trials?

A scratch card wins a prize with probability 0.08, independently of other cards. Mia buys n cards. Find the smallest value of n for which the probability that she wins at least one prize is greater than 0.9.

Working
  1. Write the condition

    X = number of winning cards. X ~ B(n, 0.08) Need P(X ≥ 1) > 0.9

    n is the unknown, so there is no single calculation to type.

  2. Use the complement

    P(X ≥ 1) = 1 − P(X = 0) > 0.9, so P(X = 0) < 0.1

    None is easier to find than at least one.

  3. Table

    From the calculator: table of binomial pdf with p = 0.08, x = 0, for increasing n. n = 27: P(X = 0) = 0.1053. n = 28: P(X = 0) = 0.0968

    Look for the first n where the value drops below 0.1.

  4. Answer

    n = 27: P(X ≥ 1) = 0.8947 (too small). n = 28: P(X ≥ 1) = 0.9032. Smallest n = 28

    The chance only rises as n grows, so the first n that works is the smallest.

Video walkthrough coming
Selling extra tickets

A coach has 80 seats. Each person who buys a ticket turns up independently with probability 0.9. The company sells n tickets. Find the largest n for which the probability that more than 80 people turn up is less than 0.1.

Working
  1. Write the condition

    X = number who turn up. X ~ B(n, 0.9) Need P(X > 80) < 0.1

    The n in the distribution is the unknown.

  2. Use the cdf

    P(X > 80) = 1 − P(X ≤ 80)

    More than 80 is everything except 80 or fewer.

  3. Table

    From the calculator: table of binomial cdf with p = 0.9, lower = 0, upper = 80, for increasing n. n = 84: P(X > 80) = 0.0264. n = 85: 0.0643. n = 86: 0.1288

    The risk rises with n. Look for the last n below 0.1.

  4. Answer

    n = 85

    85 tickets are the most the company can sell and keep the risk below 10%.

Video walkthrough coming
More than the expected number

X ~ B(24, 0.35). Find the probability that X is greater than its mean.

Working
  1. The mean

    E(X) = np = 24 × 0.35 = 8.4

    Find the mean first.

  2. Whole numbers

    P(X > 8.4) = P(X ≥ 9) = 1 − P(X ≤ 8)

    X is a whole number, so X greater than 8.4 means 9 or more.

  3. Calculator

    From the calculator: binomial cdf with n = 24, p = 0.35, lower = 0, upper = 8

    Lower 0, upper 8.

  4. Answer

    P(X ≤ 8) = 0.5257, so P(X ≥ 9) = 1 − 0.5257 = 0.474

Video walkthrough coming
Find p from the mean

A seed company tests batches of 40 seeds. On average 28 seeds in a batch germinate. Assume X, the number that germinate, is binomial. Find the probability that fewer than 25 seeds germinate in the next batch.

Working
  1. Use the mean

    np = 28, n = 40, so p = 28 ÷ 40 = 0.7

    The average is the mean, np.

  2. The distribution

    X ~ B(40, 0.7)

    Now n and p are both known.

  3. Calculator

    P(X < 25) = P(X ≤ 24); From the calculator: binomial cdf with n = 40, p = 0.7, lower = 0, upper = 24

    Lower 0, upper 24.

  4. Answer

    P(X ≤ 24) = 0.115

Video walkthrough coming
Find n and p

X ~ B(n, p). The mean of X is 14 and the standard deviation of X is √9.1. Find the probability that X takes the value of its mean.

Working
  1. Two equations

    np = 14 and np(1 − p) = 9.1

    The variance is the standard deviation squared: 9.1.

  2. Divide

    1 − p = 9.1 ÷ 14 = 0.65, so p = 0.35

    Dividing the second by the first removes n.

  3. Find n

    n = 14 ÷ 0.35 = 40

    X ~ B(40, 0.35).

  4. Calculator

    From the calculator: binomial pdf with n = 40, p = 0.35, x = 14; P(X = 14) = 0.131

Video walkthrough coming
Guessing a quiz

A quiz has 40 questions, each with 4 possible answers. Sam guesses every answer at random. Find the probability that he gets fewer than 8 correct, and state the assumptions you made.

Working
  1. Define X

    X = number correct. p = 1/4 = 0.25, X ~ B(40, 0.25)

    Each guess has 4 equally likely answers, one right.

  2. Assumptions

    Each guess is made at random; guesses are independent; every question has exactly one correct answer out of 4.

    These are the binomial conditions in the context of the quiz.

  3. Calculator

    P(X < 8) = P(X ≤ 7); From the calculator: binomial cdf with n = 40, p = 0.25, lower = 0, upper = 7

    Lower 0, upper 7.

  4. Answer

    P(X ≤ 7) = 0.182

    If Sam knew some answers, p would be higher: the model would not fit.

Video walkthrough coming