STAT 200 Lesson 8; Inference for One Sample - Z and T Distributions
Introduction to Inference for One Sample
Stat 200 Lesson 8 focuses on applying common distributions, such as the and distributions, to construct confidence intervals and conduct hypothesis tests.
This lesson transitions from using bootstrapping and randomization distributions (as seen in StatKey) to using mathematical formulas.
The general form of a confidence interval is: .
The general form of a test statistic is: .
The study will cover three specific parameters: one proportion, one mean, and paired means.
Inference for One Proportion
The Rule of Sample Proportions: The distribution can be used to approximate the sampling distribution if the following conditions are met:
(Number of successes)
(Number of failures)
If these assumptions are met, the sampling distribution will have a standard error defined by the formula: .
For confidence intervals, the sample proportion () is used as an estimate for . For hypothesis tests, the hypothesized population parameter () is used.
Constructing a Confidence Interval for a Proportion by Hand
Assumption Checklist: Both and must be true. If not met, options include bootstrapping or the exact method.
Formula: .
Example 1: Women Customers
Sample: 34 women in a random sample of 50 customers.
Check: Successes = 34, Failures = 16. Both are . Assumption met.
.
For a 95% confidence interval, the multiplier is .
Calculation: .
Interval: to . (95% confident the proportion of all customers who are women is between 55.1% and 80.9%).
Example 2: Passing Students
Sample: 88 students passed in a sample of 100.
Check: Successes = 88, Failures = 12. Both are .
.
For a 98% confidence interval, the multiplier is .
Interval: to .
Proportions in Minitab Express
Summarized Data: Go to Statistics > One Sample > Proportion (PC) or Statistics > One Sample Inference > Proportion (Mac). Input number of events (successes) and number of trials (total sample size). Under Options, change the Method to "Normal approximation".
Raw Data: Example using "bike commute" dataset. To check assumptions with raw data, use Frequency Table (Statistics > Describe > Tally). If there are at least 10 in each category (e.g., 26 carbon bikes, 30 steel), assumptions are met. Select the column containing categorical data and specify the "event" to estimate (e.g., carbon).
Minimum Sample Size for a Proportion
Formula: .
is the margin of error expressed as a decimal.
If no estimate of is available, use (the most conservative estimate for the largest possible sample size).
Example 3: Previous Study Estimate
Confidence Level: 95% (). Margin of Error (): 2% (). Previous estimate: 68% ().
.
Always round up: .
Example 4: No Previous Estimate
Confidence Level: 95% (). : 5% (). No estimate.
.
Round up: .
Hypothesis Testing for One Proportion
Step 1: Check Assumptions and Write Hypotheses
Assumptions: and .
Step 2: Calculate Test Statistic
.
Step 3: Determine p-value
Find the area under the distribution more extreme than the test statistic in the direction of the alternative hypothesis.
Step 4: Make a Decision
If (usually 0.05), reject . Else, fail to reject.
Step 5: State a Real-World Conclusion
Indicate if there is evidence to support the alternative hypothesis.
Introduction to the t distribution for One Mean
The distribution is similar to the distribution (symmetrical) but varies based on Degrees of Freedom ().
For one mean: .
As degrees of freedom increase, the distribution becomes more similar to the distribution. At low degrees of freedom, the distribution has lower height in the center and thicker/higher tails.
Central Limit Theorem (CLT): For a single mean, a sample size or is considered "sufficiently large" for the sampling distribution to be approximately normal regardless of population shape.
Flowchart for Selection:
Population normal and population known: Use distribution (rare).
Population normal but unknown: Use distribution.
Population NOT normal but : Use distribution.
Population NOT normal and : Use bootstrapping/randomization.
Confidence Intervals for a Mean by Hand
Formula: .
The standard error is: .
Example 5: Mean Age
(at least 30, use ). . . CL = 95%.
.
Using Minitab Express to find for 49 and 95% middle area: .
Calculation: .
Interval: to .
Example 6: Customer Spending
. . . CL = 90%.
.
for 39 and 90% middle area: .
Calculation: .
Interval: to .
Minimum Sample Size for a Mean
Formula: .
Since is unknown, we cannot determine degrees of freedom for a multiplier, so we use the multiplier as an estimate.
Example 7: Mean Age Study
CL = 95% (). . Previously observed .
.
Round up: .
Hypothesis Testing for One Mean
Step 1: Check Assumptions and Write Hypotheses
Assumption: or population is normal.
Step 2: Calculate Test Statistic
.
Step 3: Determine p-value
Find the area more extreme than on a distribution with degrees of freedom.
Example 8: Store Visit Length
$H_a: \mu > 10n = 40\bar{x} = 13s = 4.\n * t = \frac{13 - 10}{(4 / \sqrt{40})} = 4.743.\n * df = 394.743t_{39}0.000014.\n * p < 0.05H_0. Evidence the average visit is > 10 minutes.\n\n# Paired Means (Section 6.5)\n\n* **Definition**: Two observations for each case that are meaningfully matched. Common in pre-test/post-test designs or sibling/spousal pairs.\n* **Procedure**: Compute the differences (d) for each pair and treat the differences as a single-mean sample.\n* **Sampling Distribution**: Use tn \ge 30 pairs.\n* **Confidence Interval Formula**: \bar{x}_d \pm t^* \times \frac{s_d}{\sqrt{n}}.\n * n is the number of pairs.\n* **Example 9: Anxiety Scores**\n * n = 30\bar{x}_d3.733s_d9.425df = 29t^* = 2.04523.\n * Interval calculation: 3.733 \pm 2.04523 \times (\frac{9.425}{\sqrt{30}}).\n * Interval: 0.2147.252H_0: \mu_d = 0\n * H_a: \mu_d \neq 0 (or directional based on research question).\n2. **Step 2: Test Statistic**\n * t = \frac{\bar{x}_d - 0}{(s_d / \sqrt{n})}.\n* **Minitab Express for Paired Means**: Go to Statistics > Two Samples > Paired t. You can input summarized data (mean difference, std dev of differences, number of pairs) or raw data in two columns. For paired means, the null is always assumed to be zero.\n\n# Summary of Formulas and Assumptions\n\n* **General CI**: \text{Statistic} \pm \text{Multiplier} \times SE\n* **General Test Stat**: \text{Statistic} - \text{Null Parameter} / SE\n* **One Proportion SE**: \sqrt{\frac{p(1-p)}{n}}\n* **One Mean SE**: \frac{s}{\sqrt{n}}\n* **Paired Mean SE**: \frac{s_d}{\sqrt{n}}\n* **Important Repetition**: All procedures rely on the sample statistic, the hypothesized parameter, and the standard error. Use ztdf = n-1$$).