Hypothesis Testing - One Sample
From the statistics 1B curriculum · Updated May 29, 2026
Hypothesis Testing - One Sample
1. Introduction & Overview
- The Mental Model: Hypothesis testing functions as the judicial system of statistical inference, where sample data acts as evidence presented to evaluate a pre-defined claim (null hypothesis) against an alternative, much like a prosecutor presents evidence to challenge the presumption of innocence.
- Significance:
- Quality Control: Determining if a manufacturing process consistently produces items within specified tolerance limits (e.g., mean weight of a product).
- Environmental Monitoring: Assessing if pollutant levels in a water body exceed a regulatory maximum threshold.
- Clinical Trials: Evaluating if a new drug significantly alters a physiological parameter compared to a known baseline or placebo.
- Economic Analysis: Testing if average household income in a region deviates from a national average.
- Scientific Research: Validating experimental observations against theoretical predictions or existing knowledge.
mindmap
root((Hypothesis Testing - One Sample))
Central Concepts
Null Hypothesis (H₀)
Alternative Hypothesis (H₁)
Test Statistic
"P-value Calculation"
"Significance Level (α)"
"Decision Rule (Reject/Fail to Reject)"
Assumptions
Random Sampling
"Independence of Observations"
"Population Distribution (Normal, or Sufficient N for CLT)"
"Known/Unknown Population Variance"
Test Types
"Z-test (for means, known σ)"
"t-test (for means, unknown σ)"
"Z-test (for proportions)"
Errors
Type I Error (α)
Type II Error (β)
"Power (1-β)"
Applications
"Quality Control"
"Clinical Research"
"Policy Evaluation"
"Scientific Validation"
2. In-Depth Theory, Equations & Mechanisms
Hypothesis testing, at its core, is a formal procedure for making an informed decision about a population parameter based on sample data. The framework begins with the formulation of two competing hypotheses: the null hypothesis ($H_0$) and the alternative hypothesis ($H_1$).
2.1. Hypotheses Formulation
- Null Hypothesis ($H_0$): A statement of no effect, no difference, or no relationship. It represents the status quo, the unchallenged assumption, or the baseline. It always contains an equality sign ($\le, =, \ge$).
- For a population mean $\mu$: $H_0: \mu = \mu_0$, $H_0: \mu \le \mu_0$, or $H_0: \mu \ge \mu_0$.
- For a population proportion $p$: $H_0: p = p_0$, $H_0: p \le p_0$, or $H_0: p \ge p_0$.
- Alternative Hypothesis ($H_1$): A statement that we are trying to find evidence for. It contradicts the null hypothesis and represents the research hypothesis. It never contains an equality sign ($<,
e, >$).- For a population mean $\mu$: $H_1: \mu
e \mu_0$ (two-tailed), $H_1: \mu < \mu_0$ (left-tailed), or $H_1: \mu > \mu_0$ (right-tailed). - For a population proportion $p$: $H_1: p
e p_0$ (two-tailed), $H_1: p < p_0$ (left-tailed), or $H_1: p > p_0$ (right-tailed).
- For a population mean $\mu$: $H_1: \mu
2.2. Test Statistics
The choice of test statistic depends critically on the population parameter being tested (mean vs. proportion), the knowledge of the population standard deviation ($\sigma$), and the sample size ($n$).
2.2.1. One-Sample Z-Test for Means (Population Variance Known)
- Assumptions:
- Random sampling.
- Population standard deviation ($\sigma$) is known.
- Population is normally distributed, OR sample size $n \ge 30$ (Central Limit Theorem applies).
- Test Statistic Formula:
$$Z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}$$
Where:- $\bar{x}$ = sample mean
- $\mu_0$ = hypothesized population mean under $H_0$
- $\sigma$ = known population standard deviation
- $n$ = sample size
- Sampling Distribution: Standard Normal Distribution $N(0, 1)$.
2.2.2. One-Sample t-Test for Means (Population Variance Unknown)
- Assumptions:
- Random sampling.
- Population standard deviation ($\sigma$) is unknown and is estimated by the sample standard deviation ($s$).
- Population is normally distributed, OR sample size $n \ge 30$ (for robustness, though strictly $t$-distribution assumes normality).
- Test Statistic Formula:
$$t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}$$
Where:- $\bar{x}$ = sample mean
- $\mu_0$ = hypothesized population mean under $H_0$
- $s$ = sample standard deviation
- $n$ = sample size
- Sampling Distribution: Student's t-distribution with $df = n-1$ degrees of freedom.
2.2.3. One-Sample Z-Test for Proportions
- Assumptions:
- Random sampling.
- Observations are independent.
- Large sample conditions: $n p_0 \ge 5$ (or 10) AND $n (1 - p_0) \ge 5$ (or 10). This ensures the sampling distribution of the sample proportion ($\hat{p}$) is approximately normal.
- Test Statistic Formula:
$$Z = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}$$
Where:- $\hat{p}$ = sample proportion ($x/n$, where $x$ is the number of successes)
- $p_0$ = hypothesized population proportion under $H_0$
- $n$ = sample size
- Sampling Distribution: Standard Normal Distribution $N(0, 1)$.
2.3. P-value and Significance Level ($\alpha$)
- P-value: The probability of observing a test statistic as extreme as, or more extreme than, the one calculated from the sample data, assuming the null hypothesis is true. A small p-value indicates strong evidence against $H_0$.
- Two-tailed test (e.g., $H_1: \mu
e \mu_0$): $P\text{-value} = 2 \times P(Z > |z_{calc}|)$ or $2 \times P(t > |t_{calc}|)$ - Left-tailed test (e.g., $H_1: \mu < \mu_0$): $P\text{-value} = P(Z < z_{calc})$ or $P(t < t_{calc})$
- Right-tailed test (e.g., $H_1: \mu > \mu_0$): $P\text{-value} = P(Z > z_{calc})$ or $P(t > t_{calc})$
- Two-tailed test (e.g., $H_1: \mu
- Significance Level ($\alpha$): The pre-determined threshold for rejecting the null hypothesis. It represents the maximum acceptable probability of making a Type I error. Common values are 0.01, 0.05, and 0.10.
2.4. Decision Rule
- P-value Approach:
- If $P\text{-value} \le \alpha$, reject $H_0$. There is sufficient evidence to support $H_1$.
- If $P\text{-value} > \alpha$, fail to reject $H_0$. There is insufficient evidence to support $H_1$.
- Critical Value Approach:
- Compare the calculated test statistic to critical values obtained from the appropriate sampling distribution (Z-table or t-table) for the chosen $\alpha$ and tail-type.
- If the test statistic falls into the critical region (rejection region), reject $H_0$.
2.5. Type I and Type II Errors
stateDiagram-v2
State_H0_True : "Null Hypothesis (H₀) is TRUE"
State_H1_True : "Alternative Hypothesis (H₁) is TRUE"
Decision_Reject_H0 : "Decision: Reject H₀"
Decision_Fail_H0 : "Decision: Fail to Reject H₀"
State_H0_True --> Decision_Fail_H0 : "Correct Decision (1 - α)"
State_H0_True --> Decision_Reject_H0 : "Type I Error (α)"
State_H1_True --> Decision_Reject_H0 : "Correct Decision (1 - β) - Power"
State_H1_True --> Decision_Fail_H0 : "Type II Error (β)"
note right of Decision_Reject_H0
"Rejecting H₀ when H₀ is True."
"False Positive."
"Probability = α (Significance Level)"
end note
note left of Decision_Fail_H0
"Failing to reject H₀ when H₀ is False."
"False Negative."
"Probability = β"
end note
- Type I Error ($\alpha$): Rejecting a true null hypothesis. This is considered a more serious error in many applications, hence the control of $\alpha$ by the researcher (e.g., $\alpha = 0.05$).
- Type II Error ($\beta$): Failing to reject a false null hypothesis.
- Power of the Test (1 - $\beta$): The probability of correctly rejecting a false null hypothesis. Factors influencing power include sample size ($n$), effect size, and significance level ($\alpha$). Increasing $n$ or $\alpha$ generally increases power.
3. Technical Procedures & Applications
Procedure for One-Sample Hypothesis Testing
The following sequence details the systematic approach to conducting a one-sample hypothesis test, applicable to both means and proportions.
sequenceDiagram
participant R as Researcher
participant P as Population
participant S as Sample Data
participant DS as "Dist. Properties (Z/t)"
participant DV as "Decision (Reject/Fail)"
R->>P: Define population parameter (e.g., µ, p)
R->>R: 1. State Null Hypothesis (H₀) & Alternative Hypothesis (H₁)
R->>R: Specify Type (One-tailed/Two-tailed)
R->>R: 2. Choose Significance Level (α) (e.g., 0.05)
R->>P: 3. Plan Data Collection Strategy
R->>S: Obtain Random Sample (size n, e.g., n=50)
S-->>R: Collect Sample Statistics (e.g., x̄, s, p̂)
R->>R: 4. Check Assumptions for chosen Test (e.g., normality, known σ)
R->>R: 5. Select Appropriate Test: Z-test for Mean, t-test for Mean, Z-test for Proportion
R->>DS: 6. Calculate Test Statistic using sample data and H₀
DS-->>R: Returns calculated Z or t value
R->>DS: 7. Determine P-value OR Critical Value(s) from sampling distribution
DS-->>R: Returns P-value or Critical Value(s) (e.g., Z_crit, t_crit)
R->>R: 8. Make Decision: Compare P-value to α OR Test Statistic to Critical Value(s)
R->>DV: If P-value ≤ α OR Test Stat in Rejection Region
DV->>R: Reject H₀
R->>DV: Else
DV->>R: Fail to Reject H₀
R->>R: 9. State Conclusion in context of the problem
Example Application: Quality Control for Bottling Plant
A beverage company claims that its bottles contain, on average, 300 ml of liquid. A quality control manager is concerned that the filling machines might be underfilling. A random sample of 36 bottles is selected, and the volume of liquid in each is measured. The sample mean is found to be 298.5 ml, with a sample standard deviation of 5 ml. Assume the population standard deviation is unknown. Test at $\alpha = 0.05$ if there is evidence that the machines are underfilling.
-
Hypotheses Formulation:
- $H_0: \mu = 300$ ml (The average volume is 300 ml)
- $H_1: \mu < 300$ ml (The average volume is less than 300 ml - one-tailed, left)
-
Significance Level: $\alpha = 0.05$
-
Assumptions & Test Selection:
- Sample size $n = 36$ (Sufficiently large for CLT, can assume approximate normality of sample mean).
- Population standard deviation ($\sigma$) is unknown, estimated by sample standard deviation ($s = 5$ ml).
- Therefore, a one-sample t-test for means is appropriate.
-
Calculate Test Statistic:
- $\bar{x} = 298.5$ ml
- $\mu_0 = 300$ ml
- $s = 5$ ml
- $n = 36$
- Degrees of Freedom ($df$) $= n - 1 = 36 - 1 = 35$
$$t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}} = \frac{298.5 - 300}{5 / \sqrt{36}} = \frac{-1.5}{5 / 6} = \frac{-1.5}{0.8333} \approx -1.80$$
-
Determine P-value or Critical Value:
- Using t-distribution table (or calculator) for $df=35$ and $\alpha=0.05$ for a one-tailed (left) test:
- The critical t-value ($t_{crit}$) for $\alpha=0.05$ (left-tailed) and $df=35$ is approximately $-1.690$.
- P-value: $P(t < -1.80)$ with $df=35$. Using statistical software, this P-value is approximately 0.039.
- Using t-distribution table (or calculator) for $df=35$ and $\alpha=0.05$ for a one-tailed (left) test:
-
Make Decision:
- Using Critical Value Approach: Our calculated test statistic $t = -1.80$ is less than the critical value $t_{crit} = -1.690$ (i.e., $-1.80$ falls into the rejection region). Therefore, reject $H_0$.
- Using P-value Approach: Our P-value ($0.039$) is less than $\alpha$ ($0.05$). Therefore, reject $H_0$.
-
State Conclusion:
- At the 0.05 significance level, there is sufficient statistical evidence to conclude that the mean volume of liquid in the bottles is less than 300 ml. The filling machines appear to be underfilling.
4. Examiner's Breakdown
4.1 Comparative Analysis
| Feature | Z-Test for Means (Known $\sigma$) | t-Test for Means (Unknown $\sigma$) | Z-Test for Proportions |
|---|---|---|---|
| Parameter | Population Mean ($\mu$) | Population Mean ($\mu$) | Population Proportion ($p$) |
| Knowledge of $\sigma$ | Known | Unknown (estimated by $s$) | Not applicable (variance calculated from $p_0$) |
| Sampling Distribution | Standard Normal ($N(0,1)$) | Student's t, $df = n-1$ | Standard Normal ($N(0,1)$) |
| Assumptions | Normal population OR $n \ge 30$ | Normal population OR $n \ge 30$ (robustness) | $np_0 \ge 5$ & $n(1-p_0) \ge 5$ |
| Formula (Test Stat) | $Z = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}$ | $t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}$ | $Z = \frac{\hat{p} - p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}$ |
| Use Case | Large-sample mean tests, or when true $\sigma$ is historically known | Most common mean tests in practice, small samples with unknown $\sigma$ | Testing claims about percentages, binomial events, survey results |
4.2 High-Yield Marking Keywords
- "Null Hypothesis ($H_0$) and Alternative Hypothesis ($H_1$)": Correctly stated with appropriate parameters and inequalities.
- "Significance Level ($\alpha$)": Explicitly stated value (e.g., 0.05).
- "Test Statistic (Z or t)": Correct formula, correctly calculated value, and proper identification of distribution.
- "P-value": Correctly interpreted as the probability of observing data or more extreme given $H_0$ is true.
- "Degrees of Freedom ($df$)": Specifically for t-tests, calculated as $n-1$.
- "Rejection Region / Critical Value(s)": Correctly identified based on $\alpha$ and tail-type.
- "Contextual Conclusion": Decision (Reject/Fail to Reject $H_0$) linked directly back to the original problem statement.
- "Assumptions Met": Explicit mention of checking or assuming normality or large sample conditions.
4.3 Trapdoor Mistakes
-
Incorrect Hypothesis Formulation:
- Mistake: Stating $H_0: \bar{x} = \mu_0$ instead of $H_0: \mu = \mu_0$. Hypotheses are about population parameters, not sample statistics.
- Correction: Always use population parameters ($\mu$, $p$) in hypotheses. The sample statistic ($\bar{x}$, $\hat{p}$) is used to test the hypothesis about the parameter.
-
Misidentifying Test (Z vs. t):
- Mistake: Using a Z-test for means when population standard deviation ($\sigma$) is unknown, or vice-versa.
- Correction: If $\sigma$ is known, use Z. If $\sigma$ is unknown and estimated by $s$, use t. For proportions, always Z (under large sample conditions). This is a fundamental distinction based on the Central Limit Theorem vs. Student's t-distribution properties.
-
Incorrect P-value/Critical Value for Tail Type:
- Mistake: Using a one-tailed P-value/critical value for a two-tailed test, or doubling a P-value for a one-tailed test.
- Correction: Clearly define the alternative hypothesis ($H_1$) as one-sided ($<$ or $>$) or two-sided ($
e$) before calculating the P-value or identifying critical regions. A two-tailed critical value for $\alpha$ will split $\alpha/2$ into each tail. A one-tailed critical value uses the full $\alpha$ in one tail.
-
Drawing Causal Conclusions from Statistical Significance:
- Mistake: Stating "Rejecting $H_0$ proves that our alternative hypothesis is true" or implying causation directly.
- Correction: Statistical significance indicates sufficient evidence to reject the null hypothesis. It does not prove the alternative, nor does it necessarily imply practical significance or causation. The conclusion should be phrased as "there is sufficient evidence to support the alternative hypothesis" or "there is insufficient evidence to reject the null hypothesis."
Get the full statistics 1B curriculum
Clone the complete plan to your dashboard for unlimited AI-generated notes, practice quizzes, and a personalised revision schedule.
Create Free Account