To Notes

IT 223 -- Feb 25, 2026

Review Exercises

  1. The probability that a part on an assembly line is defective is 5%. What is the probability that
    1. exactly 3 parts are defective out of 15. Use R to check your answers. Answer:
      P(k successes out of n) = nCk pk (1-p)n-k
            = 15C3 * 0.053 * (1-0.05)15-3
            = 15!/(3!*12!) * 0.053 * 0.9512
            = (15*14*13) /(3*2*1) * 0.053 * 0.9512
            = 5 * 7 * 13 * 0.000125 * 0.540360 = 0.03073298 = 3%.
      This probability can also be computed with the R dbinom function:
      > dbinom(3, 15, 0.05)
      [1] 0.03073298
      
    2. exactly 2 parts are defective out of 15. Answer:
      P(k successes out of n) = nCk pk (1-p)n-k
            = 15C2 * 0.052 * (1-0.05)15-2
            = 15*14*13/(2!*13!) * 0.052 * 0.9513 = 13%.
      Using dbinom:
      > dbinom(2, 15, 0.05)
      [1] 0.1347523
      
    3. exactly 1 part is defective out of 15.Answer: P(k successes out of n) = nCk pk (1-p)n-k
            = 15C1 * 0.051 * (1-0.05)15-1
            = 15!/(1!*14!) * 0.051 * 0.9514 = 0.3657562 = 37%.
      This probability is computed using R like this:
      > dbinom(1, 15, 0.05)
      [1] 0.3657562
      
    4. no parts are defective out of 15. Answer: P(k successes out of n) = nCk pk (1-p)n-k
            = 15C0 * 0.050 * (1-0.05)15-0
            = 15!/(0!*15!) * 0.050 * 0.9515 = 0.4632912 = 46%.
      This probability is computed using R like this:
      > dbinom(0, 15, 0.05)
      [1] 0.4632912
      
    5. 3 or fewer parts are defective. Answer:
      P(3 or fewer defective parts:
      > pbinom(3, 15, 0.05) + pbinom(2, 15, 0.05) + 
      + pbinom(1, 15, 0.05) + pbinom(0, 15, 0.05)
      
      This gives us
          0.03073298 + 0.1347523 + 0.3657562 + 0.4632912 = 0.9945327 = 99%.
      To verify this answer with R:
      > # The R statement pbinom function computes the
      > # probability of 3 or fewer sucesses out of 15
      > # when the probability of success is 0.05.
      > pbinom(3, 15, 0.05)
      [1] 0.9945327
      
  2. State the Law of Large Numbers (LLN). Who first proved it?
    Answer: Jakob Bernoulli in 1713.
  3. State the Central Limit Theorem (CLT). Who first proved it?
    Answer: Abraham de Moivre proved the CLT for the binomial distribution in 1733.
    Alexandr Lyapunov proved the modern form of the CLT in 1901.
  4. A random sample of 500 voters registered in Chicago is collected. 236 of them say they will vote for Candidate A for mayor. Find a 95% confidence interval for the true probability that a registered voter will vote for candidate A. Compute this confidence interval using S = the number of voters in the sample that said they will vote for Candiate A. X = S / n = 0.472. Compute the confidence interval with two methods: Method 1 uses the sum S and Method 2 uses the average X. You should obtain the same answer using either method.

    Answer: Method 1 is to compute the confidence interval for the true value of p using S:
    n = 500   S = 236   E(S) = np = 500*p
    p^ = S / n = 236 / 500 = 0.472
    σS = √n * p * (1-p) = √500 * 0.472 * (1-0.472) = 11.1628
    zS = (S - E(S)) / σS = (244 - 500 * p) / 11.1628
    Now -2 ≤ ZS ≤ 2 95% of the time. Solve for p:
    -2 ≤ (236 - 500 * p) / 11.1628 ≤ 2
    -2 * 11.1628 ≤ 236 - 500 * p ≤ 2 * 11.1628
    -22.3256 - 236 ≤ - 500 * p ≤ 22.3256 - 236
    -258.3256 ≤ -500 * p ≤ -213.6744
    -258.3256 / -500  ≥ p  ≥ -213.6744 / -500
    0.5166512 ≥ p ≥ 0.4273488.
    The 95% confidence interval for p is [0.4273488, 0.5166512] = [43%, 52%].
    Because values on either side of 50% are in the confidence interval, we don't have enough evidence to conclude if Candidate A will win the election.

    Method 2 is to compute the 95% confidence interval for the true value of p using the average X of the 500 outcomes instead of S.
    n = 500   X = 236 / 500 = 0.472   E(X) = p
    p^ = X = 236 / 500 = 0.472
    σxbar = √(p * (1-p)) / n = √0.472 * (1 - 0.472) / 500 = 0.0223256
    zxbar = (x - E(x)) / σxbar = (0.236 - p) / 0.0223256.
    Now -2 ≤ zxbar ≤ 2 95% of the time. Solve for p:
    -2 ≤ (0.472 - p) / 0.0223256 ≤ 2
    -2 * 0.0223256 ≤ 0.472 - p ≤ 2 * 0.0223256
    -0.0446512 - 0.472 ≤ -p ≤ 0.0446512 - 0.472
    -0.5166512 ≤ -p ≤ -0.4273488
    0.5166512 ≥ p ≥ 0.4273488
    0.4273488 ≤ p ≤ 0.5166512
    The 95% confidence interval for p is [0.4273488, 0.5166512] = [43%, 52%].

    This is the same result as we obtained with Method 1.

    Collecting a true random sample for election polling is not easy. When the Gallup polling company started predicting election results in 1936, other polling companies were collecting random samples from phone books and club membership lists. This skewed the sample because, in 1936, only wealthy people were likely to have phones or belong to clubs.

    The Gallup company used quota sampling from the population of census data, which means that persons are sampled from social and economic substrata of the population. Today, it is easier to select random names from phone directories because about 98% of the population has a phone.  Nevertheless, collecting a good random sample for predicting an election is not easy. Polling companies are always striving to improve their methods.

Tests of Hypothesis

The z-test

More about p-values

Practice Problems