STAT 101 Lecture Notes
Sample Size Determination
- When conducting research, determining the appropriate sample size is crucial.
- The required sample size depends on:
- How accurate the estimation needs to be.
- How confident you need to be in the estimate.
Margin of Error and Sample Size
- Margin of Error: Calculated by multiplying a -value by the standard error.
- Formula:
- Rearranging the margin of error formula allows us to solve for (sample size).
- Formula:
Factors Affecting Sample Size
- Confidence Level:
- A higher confidence level requires a larger value.
- Accuracy:
- Determined by the margin of error; a smaller margin of error requires a larger sample size.
Issue: Estimating Before Sampling
- Problem: The formula for includes , the sample proportion, which is unknown until the sample is taken.
Solutions for Estimating
- Previous Research: Use from a similar study.
- Pilot Study: Run a small pilot study (e.g., 10-30 cases) to estimate .
- Maximize :
- The maximum value of occurs when .
Determining Sample Size
- Determine the desired confidence level (which affects ).
- Determine the desired accuracy (margin of error).
- Estimate using one of the methods above.
- Calculate the required sample size using the formula.
Tongue Rolling Data
- Data collected: 96 people can roll their tongues, 23 cannot.
- Total sample size: 119.
- Sample proportion: .
Data Visualization and Summary
- Data type: Categorical (Yes/No).
- Appropriate plot: Bar chart.
- Y-axis: Frequency.
Point Estimate
- Point estimate: The sample proportion, .
Confidence Interval
- Confidence level: 95% (commonly used).
- value for 95% confidence: 1.96.
- Formula for Confidence Interval:
- Where
Calculating Confidence Interval in Excel
- Sample proportion: 96/119 ≈ 0.806723
- Standard error:
- Margin of error:
- Lower limit:
- Upper limit:
- Confidence interval: (0.74, 0.88)
Interpretation
- We are 95% confident that the true proportion of STAT101 students who can roll their tongue is between 74% and 88%.
Connection to Dominant Traits
- Tongue rolling is said to be a dominant trait, theoretically present in 75% of people.
- Since 0.75 falls within the calculated confidence interval (0.74, 0.88), our data does not provide evidence against this theory.
Home Field Advantage
- Investigating whether there is a home-field advantage in sports (e.g., baseball).
- Advantage: More likely to win at home.
Determining Advantage
- Look at the proportion of games won at home.
- Null hypothesis (no advantage): proportion of home wins = 50% (0.5).
- Baseball data: 2,430 games, home team won in 54.9% of games.
- Sample size
- Sample proportion of wins
Hypothesis Testing
- We use a hypothesis test to determine if there is enough evidence for a home-field advantage.
- A hypothesis test is used to find evidence against a null hypothesis in support of an alternative one.
General Setup for Hypothesis Test for a Proportion
- Null hypothesis (): , where is the hypothesized proportion.
- Alternative hypothesis:
- One-tailed test: p > p0 or
- Two-tailed test:
Standard Error in Hypothesis Testing
- Assumption: The null hypothesis is true.
- Use (hypothesized proportion) instead of in the standard error calculation.
- Formula:
Test Statistic (Z-score)
- Standardize the sample statistic (p-hat) to calculate a z-score.
- Formula:
Checking Assumptions
- Verify and to ensure the sampling distribution of is approximately normal.
- Forgot to check this for the tongue-rolling confidence interval (corrected afterwards).
Home Field Advantage Hypothesis Test (Continued)
Hypotheses
- Null Hypothesis (): The proportion of home wins is 0.5 ().
- Alternative Hypothesis (): There is a home-field advantage, so the proportion of home wins is greater than 0.5 (p > 0.5). This is a one-tailed test.
- Significance Level: (5%).
Test Statistic
- Calculate the z-score (standardized test statistic).
- Formula: