STAT 124 - Analysis of a Single Sample
Introduction to Statistics
Course Information
Course Code: STAT 124
Institution: University of British Columbia (UBC)
Focus: Analysis of a Single Sample
Analysis of One Sample - Example
Problem Statement
Sample Size: 200 university students.
Observations: 31 students are business majors, 169 others are not.
Data Summary
Observed Data
Total Sample Size ($n$): 200
Business Majors: 31
Other Majors: 169
Sample Proportion ($\, \, ar{p}$): or 15.5%
Standard Error and Margin of Error
Calculation of Standard Error (SE)
Standard Error Formula:
Calculation:
Margin of Error (ME) for 95% Confidence Level
Critical Value ($z$): 1.96
Margin of Error Formula:
Calculation:
Confidence Interval Interpretation
Calculation of 95% Confidence Interval
Confidence Interval Formula:
Calculation:
Interpretation
We are 95% confident that the true proportion of business majors in the entire university population lies between 10.5% and 20.5%.
Defining the Standard Error
Conceptual Definition
Standard Error (SE) measures the dispersion of sample proportions around the true population proportion.
Significance:
Quantifies sampling error.
Indicates how much we expect our sample proportion ($ar{p}$) to miss the true population proportion ($p$).
Represents the standard deviation of the sampling distribution.
Mathematical Formula for Standard Error
Formula Overview
Standard Error Formula:
Components:
$p$: Proportion of successes.
$1 - p$: Proportion of failures.
$n$: Sample size (number of observations).
The Law of Large Numbers
Importance of Sample Size
Larger sample sizes lead to decreased Standard Error because $n$ is in the denominator.
Example: To halve the Standard Error, you must quadruple the sample size.
Precision vs. Accuracy
A small Standard Error indicates high precision, suggesting that multiple samples will yield similar results.
The Concept of Interval Estimation
Definitions
Point Estimate: A single value (e.g., 51%) used to estimate a population parameter.
Problem with Point Estimates: Samples vary, making point estimates likely to be slightly inaccurate.
Solution: Use an Interval Estimate to provide a range of plausible values.
Definition of Confidence Interval: A range derived from sample data likely to contain the unknown population parameter.
Constructing the Confidence Interval
Construction Methodology
The Confidence Interval ($CI$) is constructed by adding and subtracting a Margin of Error from the sample proportion ($ar{p}$):
Trade-offs in Construction
Confidence Level: Increasing the confidence level (e.g., from 95% to 99%) results in a wider interval.
Sample Size: Increasing $n$ narrows the interval (greater precision).
Correct Interpretation of Confidence Intervals
Understanding 95% Confidence
Interpretation: “95% of all possible samples of this size will produce an interval that captures the true population proportion.”
Common Misconceptions
Incorrect Interpretation: “There is a 95% probability the true proportion is between A and B.” (The true proportion is fixed, not a variable)
Correct Interpretation: “We used a process that is successful 95% of the time.”
Hypothesis Testing Approach
Application of Hypothesis Testing
This data can be utilized to test claims about the population.
Null Hypothesis ($H0$): $p = p0$ (e.g.,
The university claims 20% of students are business majors).
Alternative Hypothesis ($Ha$): $p eq p0$.
The Research Question
Claim vs. Observed Data
University Claim: 20% business majors ($p_0 = 0.20$).
Observed: In our sample of $n = 200$, 15.5% ($ar{p} = 0.155$).
Hypotheses Formulation
Null Hypothesis ($H_0$): $p = 0.20$
Alternative Hypothesis ($H_a$): $p
eq 0.20$
Calculating the Z-Statistic
Formula and Calculation Steps
Z-Statistic Formula:
Steps:
Difference calculation:
Standard Error calculation:
Compute $z$:
Statistical Decision
Results Overview
Calculated $z$: -1.59
Critical $z$ (at $ ext{α} = 0.05$): ±1.96
Conclusion
Decision: Fail to Reject $H_0$
Interpretation: Since $|-1.59| < 1.96$, the result is not statistically significant. There is insufficient evidence to claim the actual proportion differs from 20%.
Practical Significance vs. Statistical Significance
Insights
Despite the result not being statistically significant, a 4.5% gap might be important for university planning.
Increasing Power: If the same 15.5% result comes from a sample of $n = 500$, the resulting $z$ would be -2.51, which is significant ($p < 0.05$).
A More Complicated Situation - Analysis of Preferences
Example Scenario
Random sample of 100 people asked about their preference between Starbucks and Tim Horton’s.
Responses:
Starbucks: 51
Tim Horton’s: 39
No Preference: 10
Inquiry
Question posed: How to analyze these data?
Study Overview and Data Distribution
Sample Details
Random Sample Size ($n$): 100
Population: Large general population
Summary of Survey Responses
Starbucks: 51 (51%)
Tim Horton’s: 39 (39%)
No Preference: 10 (10%)
Total: 100 (100%)
Methodological Approaches for Analysis
Approaches to Analyze Categorical Frequency Data
Chi-Square Goodness-of-Fit Test:
Tests if distribution across categories differs from theoretical expectation (e.g., an even distribution).
Z-Test for Proportions:
Used for direct comparison between two specific groups (e.g., Starbucks vs. Tim Horton’s), with the third group as an external variable.
Precision: The Confidence Interval Analysis
Calculation of Confidence Interval for Starbucks Preference
Standard Error (SE):
Margin of Error (ME):
At 95% confidence ($z = 1.96$):
(or 10%)
Confidence Interval Interpretation:
We are 95% confident that the true population preference for Starbucks lies between (51% - 10%) 41% and (51% + 10%) 61%.
Key Insights and Interpretation
Analysis Insights
The Lead: Starbucks holds a 12-point lead over Tim Horton’s in this sample.
Neutral Variable Impact: The 10% ”No Preference” group indicates high brand engagement in this population.
Statistical Power Consideration: With $n = 100$, the margin of error (±10%) is considerable. A critical note is that lower bound of Starbucks CI (41%) overlaps with Tim Horton’s result (39%), necessitating inferential testing (like Chi-Square) to affirm significance.
More Detail on the Chi-Square Approach
Data Overview for Chi-Square Test
Total Sample Size ($n$): 100
Preference Observations:
Starbucks: 51%
Tim Horton’s: 39%
No Preference: 10%
The Research Question
Is the observed preference for Starbucks statistically significant compared to a neutral distribution?
The Chi-Square Goodness-of-Fit Test
Null Hypothesis Formulation
Null Hypothesis ($H_0$): All preferences are equal.
Chi-Square Test Formula:
Where:
$O_i$: Observed frequency
$E_i$: Expected frequency (33.33 for each category)
Calculation Results of Chi-Square Test
Contributions by Category
Category | Observed | Expected | Contribution |
|---|---|---|---|
Starbucks | 51 | 33.33 | 9.37 |
Tim Horton’s | 39 | 33.33 | 0.96 |
No Preference | 10 | 33.33 | 16.33 |
Total | 100 | 100 | 26.66 |
Degrees of Freedom Calculation
Degrees of Freedom ($df$): $3 - 1 = 2$
Conclusion of Chi-Square Test
Final Results and Implications
Calculated Chai-Square ($ ext{χ}^2$): 26.66
Critical Value ($ ext{α} = 0.05$): 5.99
Result: Since 26.66 > 5.99, we reject the Null Hypothesis. The distribution of coffee preferences is not random.
Note: The low ”No Preference” count indicates that consumers have strong opinions regarding these brands.
Note: Coffee was mentioned abstractly here; the initial context was about a sample preference inquiry.