Lecture Notes on Confidence Intervals and Sample Size

Questions on Sections 7.1, 7.2, and 7.3

  • The instructor opens the session by asking if there are any questions on sections 7.1, 7.2, and 7.3.

Determining the Type of Problem

  • When approaching a problem, it is important to determine whether the data is numeric or categorical.

    • If the data is numeric, you will typically be dealing with means.

    • If the data is categorical, you will be dealing with proportions.

Numeric Data (Means)

  • When working with means, determine whether the population standard deviation is known or if only the sample standard deviation is available.

    • If the population standard deviation is known, use a z-interval.

    • If only the sample standard deviation is known, use a t-interval.

Example Problem: T-Interval

  • The example is from section 7.3, focusing on t-intervals. The problem involves finding a confidence interval for the mean.

  • Given:

    • Sample size: 29

    • Sample mean: 3784

    • Sample standard deviation: 476

  • Since only the sample standard deviation is provided, a t-interval is appropriate.

Steps to Solve

  1. Go to stat then tests and choose option 8, TInterval.

  2. Select the option to input summary statistics.

  3. Enter the provided statistics:

    • Sample mean (xˉ\bar{x}): 3784

    • Standard deviation (ss): 476

    • Sample size (nn): 29

    • Confidence level (CC): 99% (0.99)

  4. Calculate to find the confidence interval.

Result

  • The confidence interval is between $3540 and $4028 (rounded to the nearest dollar).

Interpretive Statement

  • "We are 99% confident that the mean annual medical cost to treat insomnia is between $3540 and $4028."

Section 7.4: Proportions

  • Section 7.4 covers proportions, where the calculator function used is one prop z interval.

  • Proportions are used when dealing with categorical data rather than numeric data.

Example Scenario: Political Candidacy

  • The instructor uses a hypothetical scenario of running for the made-up office of "dog catcher" in Norwalk.

  • The question posed is whether voters support candidate Lalani (yes or no).

  • In a survey of 300 voters, 93 support candidate Lalani. The sample proportion is 93/300 = 0.31 (31%).

Types of Proportion Problems

  1. Constructing a confidence interval.

  2. Finding the minimum sample size.

Constructing a Confidence Interval

  • To construct a confidence interval, use the calculator function one prop z interval.

Steps to Solve
  1. Go to stat, tests, and choose option A, one prop z interval.

  2. The input screen will ask for x, n, and C-level.

    • x: Number of successes (93)

    • n: Sample size (300)

    • C-level: Confidence level (95% or 0.95)

Result
  • The confidence interval is between 0.258 and 0.362.

Interpretation
  • "We are 95% confident that the proportion of Norwalk voters who support Candidate Lalani is between 25.8% and 36.2%."

Calculating Proportions

  • If not directly given, calculate the sample proportion (p) by dividing the number of successes by the total number of responses: p=xnp = \frac{x}{n}.

  • q=1pq = 1 - p, where q represents the proportion of failures.

Example Problem

  • 50% of 50 employers think employees are fairly paid, while only 21% of 200 employees agree. Find the 99% confidence interval for the proportion for each group.

Solution
  1. Employers

    • x = 50% of 50 = 25

    • n = 50

  2. Employees

    • x = 21% of 200 = 42

    • n = 200

Calculations and Interpretations
  1. Employers:

    • Using one prop z interval with x = 25, n = 50, and C-level = 0.99 gives a confidence interval of 0.318 to 0.682.

    • Interpretation: "We are 99% confident that the proportion of employers who think people are fairly paid is between 31.8% and 68.2%."

  2. Employees:

    • Using one prop z interval with x = 42, n = 200, and C-level = 0.99 gives a confidence interval of 0.136 to 0.284.

Minimum Sample Size

  • When determining the minimum sample size, you are deciding how many individuals (people or things) to sample.

Formula

  • The formula for minimum sample size (n) is derived from the margin of error portion of the confidence interval formula: n=pq(zE)2n = p \cdot q \cdot (\frac{z}{E})^2

    • p: Sample proportion

    • q: 1 - p

    • z: Z-score (critical value)

    • E: Margin of error

Prior Estimate Available

  • If a prior estimate of the proportion is available, use that value in the formula.

No Prior Estimate Available

  • If no prior estimate is available, use p=0.5p = 0.5 and q=0.5q = 0.5.

Example Problem

  • A recent study indicates that 23% of 194 women surveyed over the age of 55 were widows. Determine the minimum sample size needed for a 90% confidence interval with a margin of error within 5%.

Solution with Prior Estimate
  1. Find the critical z-value for a 90% confidence interval: z = 1.645.

  2. Identify the given values:

    • E = 0.05 (5% margin of error)

    • p=0.23p = 0.23 (prior estimate)

    • q=0.77q = 0.77

  3. Plug the values into the formula:
    n=0.230.77(1.6450.05)2n = 0.23 \cdot 0.77 \cdot (\frac{1.645}{0.05})^2

  4. Calculate:
    n=191.69n = 191.69

  5. Always round up. Therefore, n=192n = 192.

Solution without Prior Estimate
  1. Use p=0.5p = 0.5 and q=0.5q = 0.5.

  2. Plug the values into the formula:
    n=0.50.5(1.6450.05)2n = 0.5 \cdot 0.5 \cdot (\frac{1.645}{0.05})^2

  3. Calculate:
    n=270.6n = 270.6

  4. Round up. Therefore, n=271n = 271.

Additional Notes

  • Always round up in minimum sample size calculations.

  • Ensure that percentages are converted to decimal form before using them in formulas.