Chapter 5: Confidence Intervals

Chapter 5: Confidence Intervals

Introduction to Confidence Intervals

  • Objective: To estimate the average change in sleep duration for adults trying a new experimental sleep aid.

  • Sample Data:

    • Number of participants: 132

    • Average increase in sleep duration reported: 30.38 minutes/night

    • Standard deviation of change in sleep duration: 21.50 minutes

Key Concepts

Unit of Observation
  • Population of Interest: Adults using the new sleep aid.

  • Variable (and Type): Change in sleep duration (quantitative).

Testing vs. Estimating
  • Hypothesis Testing:

    • Focuses on examining a specific hypothesis.

    • Questions include:

    • Is there evidence that this sleep aid increases sleep on average?

    • Is there evidence that this die is biased toward lower numbers?

  • Estimation:

    • Complements hypothesis testing by providing confidence intervals around parameter estimates.

    • Questions include:

    • By how much does sleep increase while on this medication?

    • What amount of bias does the sleep aid seem to have?

    • If no specific parameter is interesting to test, only an interval estimate may be presented.

Estimation Process
  • Point Estimate:

    • Defined as the best single guess for the parameter.

    • Symbolically, in the sleep example, the parameter is represented as μ\mu.

    • The point estimate for this parameter is the mean sleep increase: x^=30.38\hat{x} = 30.38 minutes.

  • Interval Estimate:

    • Extends beyond the point estimate to account for error in the estimation.

    • We need to calculate the standard error (SE) to determine how much error we expect.

    • Example representation: We might say we estimate the mean is approximately x^±E\hat{x} \pm E minutes, where EE is the margin of error.

Confidence Interval Construction

Standard Error Calculation
  • The standard error formula is used to quantify the expected error in our estimate:

    • SE=snSE = \frac{s}{\sqrt{n}}

    • Where ss is the sample standard deviation and nn is the sample size.

Choosing the Correct Interval Width
  • The number of standard errors we extend to create a confidence interval reflects our confidence level.

    • For a normally distributed sample with large sample size, properties include:

    • 68% of sample means will fall within 1 SE of the mean μ\mu.

    • 90% of sample means will fall within 1.645 SE of the mean μ\mu.

    • 95% of sample means will fall within 1.960 SE of the mean μ\mu.

    • 98% of sample means will fall within 2.326 SE of the mean μ\mu.

    • 99% of sample means will fall within 2.576 SE of the mean μ\mu.

Margin of Error and Confidence Interval Formula
  • Margin of Error is the range that extends from the point estimate based on the selected confidence level.

  • To construct a confidence interval for μ\mu, we use the formula:

    • x^±zC%×SE\hat{x} \pm z_{C\%} \times SE

    • Where zC%z_{C\%} corresponds to the z-score for the chosen confidence level.

Interpreting Confidence Intervals

Representation of Confidence Intervals
  • When interpreting a confidence interval, we assume our sample is representative of the population.

  • Example statements:

    1. We are 95% confident that the average increase in sleep duration for these 132 people who took this sleep aid is between 26.7 and 34.0 minutes.

    2. We are 95% confident that the average increase in sleep duration among all people who might take this sleep aid is between 26.7 and 34.0 minutes.

  • Key Difference: The first statement refers specifically to the sample, while the second refers to the wider population.

Important Distinction
  • Incorrect Statement: We are confident that 95% of sleep aid users will report an increase in sleep duration between 26.7 and 34.0 minutes.

    • This statement implies individual outcomes rather than the population average, which would require different statistical approaches.

Confidence Interval Calculations
  • For normally distributed populations, we could use properties of the normal distribution to estimate individual outcomes via functions like:

    • x±1.96×σx \pm 1.96 \times \sigma or xˉ±1.96×s\bar{x} \pm 1.96 \times s for individual users.

Writing Clear Interpretations
  • When writing confidence intervals, it is crucial to define whether we are estimating a population parameter or expecting individual outcomes.

Reflection Questions

  • 5.1: What do we call our single best estimate for a parameter?

  • 5.2: What is the margin of error within a confidence interval? How can it be calculated from bounds?

  • 5.3: Why is the statement “I’m 95% confident my sample statistic will be inside my confidence interval” misleading?

  • 5.4: Is the statement about individuals being within standard errors of the mean correct? If not, how can it be addressed?

Misinterpretations of Confidence Intervals

  • It’s incorrect to say “there is a 95% chance that the parameter is in our interval.” Instead, say:

    • “When following this approach, we are 95% confident that we will get an interval containing the parameter.”

  • Acceptable interpretation: “We are 95% confident that the parameter is between X and Y.” This clarifies that confidence refers to the process rather than the specific interval.

T-intervals vs. Z-intervals for Means

Using Sample Standard Deviation
  • In cases where σ\sigma must be estimated based on sample data (small sample sizes), a t-distribution should be used instead of a standard normal distribution (z-distribution).

  • Standard Error using sample standard deviation:

    • SExˉsnSE_{\bar{x}} \approx \frac{s}{\sqrt{n}}

  • T-score instead of Z-score:

    • The number of standard errors extended for a t-interval will be called a t-score, which depends on degrees of freedom (df) and the confidence level associated with the standard error.

Example of T-scores
  • As sample size increases, t-scores will approach their z-scores.

  • T-scores for common confidence levels:

    • For df = 5, t95%=2.571t_{95\%} = 2.571

    • For df = 10, t95%=2.228t_{95\%} = 2.228

    • For df = 20, t95%=2.086t_{95\%} = 2.086

Building a T-Interval
  • The formula for t-interval for the population mean:

    • xˉ±tC%×sn\bar{x} \pm t_{C\%} \times \frac{s}{\sqrt{n}}

    • Where t has df = n - 1.

Example Data and Conditions
  • A study involving 64 patients with high cholesterol:

    • Average cholesterol drop: 19.0 mg/dL

    • Standard deviation of cholesterol change: 14.3 mg/dL

  • Confirm the use of either z or t-intervals based on:

    • Knowledge of standard deviation

    • Distribution characteristics

Conditions for Creating Confidence Intervals
For Z-intervals:
  • σ\sigma is known or well estimated (large samples).

  • Sample means distribution is normal or n ≥ 30 for CLT.

For T-intervals:
  • Standard deviation estimated by sample standard deviation (s).

  • Sample means distribution is normal or n ≥ 30 for CLT.

Conclusion on Sample Representation
  • Ensure that samples taken are representative of the populations being generalized to.

Estimating Proportions

Honeybee Dance Party Investigation
  • Study aimed to see if cocaine affects dance frequency in honeybees:

    • Total trips recorded: 51

    • Trips resulting in a dance: 39

  • Parameters:

    • Point estimate determined to gauge dance change due to cocaine.

    • Standard error calculated using the formula:

    • SEp^p^(1p^)nSE_{\hat{p}} \approx \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

Z-interval for Proportion
  • For increasing sample sizes, proportions trend toward normal distribution.

  • To calculate confidence intervals for proportions, use the z-interval formula:

    • Confidence Interval (Wald Interval): p^±ZC%×SEp^\hat{p} \pm Z_{C\%} \times SE_{\hat{p}}

Simulation of Confidence Intervals

Behavioral Observations
  • Exploration of confidence intervals via simulator to analyze:

    1. Effect of increasing confidence level on interval width.

    2. Impact of larger sample sizes on confidence behavior.

    3. Understanding matching coverage rates with chosen confidence levels.

Confidence Intervals for Proportions

Modified Guidelines
  • Wald intervals suitable in large sample contexts:

    • Typically, n100n ≥ 100 for reliability.

    • Success/failure counts should meet criteria (10 successes, 10 failures).

  • Clopper-Pearson intervals give alternatives when ensuring proper confidence with respect to sample size.

  • Agresti-Coull modifications improve reliability, especially with edge proportions and smaller samples.

Application to Honeybee Study
  • Explore the effects of cocaine using adjusted Agresti-Coull methods for developing confidence intervals more accurately.

Relationship Between Confidence Intervals and Hypothesis Testing

  • The confidence interval can suggest whether the average weight change could reasonably yield a null hypothesis of 0.

  • Confidence intervals reflect the hypotheses that could be rejected with a specific alpha level related to a non-directional test.

Reflection Questions on Connections
  • Questions posed regarding reliability of Wald intervals and construction advantages of Agresti-Coull intervals over Wald.

  • Apply concepts to real data scenarios for deeper understanding of their implications and interpretations.

Additional Practice Questions

  • Practical questions presented regarding specific gene risks and related confidence interval calculations to reinforce understanding of confidence and interval estimation techniques.

  • Given statistical data for semi-truck driver delivery times, have students create confidence intervals from sample data using respective t and z-interval methods dependent on calculated parameters and sample sizes.