BackHypothesis Testing: Concepts, Errors, and z-Test for the Mean
Study Guide - Smart Notes
Tailored notes based on your materials, expanded with key definitions, examples, and context.
Hypothesis Testing
Introduction to Hypothesis Testing
Hypothesis testing is a formal statistical procedure used to make inferences about population parameters based on sample statistics. It allows researchers to test claims or predictions about a population using data collected from a sample.
Hypothesis Test: Uses sample statistics to test a claim about a population parameter (such as the mean μ or proportion p).
Example: Is the sample mean of men's height (68 inches from N=30 men) different from the assumed population mean (70 inches)?
Key Concepts in Hypothesis Testing
Null and Alternative Hypotheses: Every hypothesis test involves two competing hypotheses:
Null Hypothesis (H0): Contains a statement of equality (e.g., μ = k).
Alternative Hypothesis (Ha): The complement of the null, contains a statement of strict inequality (e.g., μ < k or μ > k).
Errors in Hypothesis Testing: Two types of errors can occur due to sampling variability:
Type I Error: Rejecting H0 when it is true (false positive).
Type II Error: Failing to reject H0 when it is false (false negative).
Level of Significance (α): The maximum probability of making a Type I error, commonly set at 0.05 (5%), 0.01 (1%), or 0.10 (10%).
Power of the Test: The probability of correctly rejecting a false null hypothesis, denoted as 1 - β.
Test Statistic vs. Standardized Test Statistic:
Test Statistic: Calculated from sample data (e.g., sample mean ar{x}).
Standardized Test Statistic: Converts the test statistic to a standard scale (e.g., z-score).
Direction of the Test: Hypothesis tests can be left-tailed, right-tailed, or two-tailed, depending on the alternative hypothesis.
Using p-values: The p-value is the probability of obtaining a sample statistic as extreme as the observed one, assuming H0 is true.
Translating Verbal Statements to Hypotheses
Verbal claims about population parameters are translated into mathematical statements for hypothesis testing. The null hypothesis always includes equality, while the alternative includes inequality.
Verbal Statement H0 | Mathematical Statement | Verbal Statement Ha |
|---|---|---|
greater than or equal to k | H0: μ ≥ k | less than k |
less than or equal to k | H0: μ ≤ k | greater than k |
equal to k | H0: μ = k | not equal to k |
Examples: Stating Null and Alternative Hypotheses
Example 1: A car dealership claims the mean oil change time is less than 15 minutes. (Claim is the alternative hypothesis)
Example 2: A company advertises the mean lifespan of its furnaces is more than 18 years. (Claim is the alternative hypothesis)
Example 3: A school claims the proportion of students involved in extracurricular activities is equal to 61%. (Claim is the null hypothesis)
Errors in Hypothesis Testing
When making decisions based on sample data, there is always a risk of error due to sampling variability.
Decision | H0 is True | H0 is False |
|---|---|---|
Fail to reject H0 | Correct Decision (True Positive) | Type II Error (False Negative) |
Reject H0 | Type I Error (False Positive) | Correct Decision (True Negative) |
Type I Error: Occurs when the null hypothesis is rejected when it is actually true.
Type II Error: Occurs when the null hypothesis is not rejected when it is actually false.
Level of Significance and Power
The level of significance (α) is the probability of making a Type I error. The power of a test (1 - β) is the probability of correctly rejecting a false null hypothesis.
Common values for α: 0.10, 0.05, 0.01
Power increases with sample size.
Parameters, Test Statistics, and Standardized Test Statistics
After stating the hypotheses and specifying the level of significance, a random sample is taken and sample statistics are calculated.
Population Parameter | Test Statistic | Standardized Test Statistic |
|---|---|---|
μ | Sample mean | z (if σ known) |
p | Sample proportion | z (Section 7.4) |
Deciding Whether to Reject the Null Using p-values
After calculating the standardized test statistic, the p-value is determined. The p-value is compared to the level of significance (α) to decide whether to reject the null hypothesis.
If p-value ≤ α, reject H0.
If p-value > α, fail to reject H0.
Direction of the Test
The direction of the test is determined by the alternative hypothesis:
Left-tailed test: Ha contains the less-than symbol (<).
Right-tailed test: Ha contains the greater-than symbol (>).
Two-tailed test: Ha contains the not-equal-to symbol (≠).
Examples: Identifying the Direction of the Test
Left-tailed: Ha: μ < 15 (mean oil change time less than 15 minutes)
Right-tailed: Ha: μ > 18 (mean furnace lifespan more than 18 years)
Two-tailed: Ha: p ≠ 0.61 (proportion of students not equal to 61%)
Decision Rules Based on p-value
If p-value ≤ α, then reject H0 (e.g., α = 0.05 and p = 0.01).
If p-value > α, then fail to reject H0 (e.g., α = 0.05 and p = 0.07).
Interpreting a Decision: Always About the Claim
Decision | Claim is H0 (null) | Claim is Ha (alt) |
|---|---|---|
Reject H0 | Enough evidence to reject the claim | Enough evidence to support the claim |
Fail to reject H0 | Not enough evidence to reject the claim | Not enough evidence to support the claim |
Steps for Hypothesis Testing
State the claim mathematically and verbally; identify null and alternative hypotheses.
Specify the level of significance (α).
Determine the standardized sampling distribution and draw its graph.
Calculate the test statistic and its standardized value.
Find the p-value.
Use the decision rule to reject or fail to reject H0.
Write a statement interpreting the decision in the context of the original claim.
Hypothesis Testing for the Mean (Population σ Known, Use z-score)
z-Test for a Sample Mean
The z-test is used to test hypotheses about a population mean when the population standard deviation (σ) is known. The standardized test statistic is calculated as:
Formula:
Assumptions:
Population standard deviation (σ) is known.
Sample is random.
Population is normally distributed or sample size n ≥ 30.
Using p-values for a z-test for Mean μ
Verify that σ is known, sample is random, and population is normal or n ≥ 30.
State the claim mathematically and verbally; identify H0 and Ha.
Specify the level of significance (α).
Find the standardized test statistic:
Find the area that corresponds to z (using a z-table).
Find the p-value.
Make a decision to reject or fail to reject H0 based on p-value and α.
Interpret the decision in the context of the original claim.
Example: Step-by-Step Hypothesis Test
Claim: Toyota advertises a mean gas mileage of 50 mpg. You suspect the mean is less than 50 mpg. You sample 30 vehicles and obtain a mean of 47 mpg, with σ = 5.5.
Step 1: State the claim and hypotheses: (Claim)
Step 2: Choose α = 0.05.
Step 3: Calculate standardized test statistic:
Step 4: Find p-value for z = -2.99: p = 0.0014.
Step 5: Decision rule: p < α, so reject H0.
Step 6: Interpretation: There is enough evidence to support the claim that the mean mileage is less than 50 mpg; the advertisement is likely false.
Finding p-values for Hypothesis Tests
For a left-tailed test: p = area in the left tail.
For a right-tailed test: p = area in the right tail.
For a two-tailed test: p = area in both tails (multiply by 2).
Example: For z = 2.14 in a two-tailed test, area in right tail = 0.016, so p = 0.032.
Summary Table: Decision Rules and Interpretation
Decision | Claim is H0 | Claim is Ha |
|---|---|---|
Reject H0 | Reject the claim | Support the claim |
Fail to reject H0 | Not enough evidence to reject the claim | Not enough evidence to support the claim |
Additional info:
All hypothesis tests begin with the assumption that the null hypothesis is true.
Sampling error is the reason for possible incorrect decisions.
Power and beta are more advanced concepts, but alpha (significance level) is the main focus in introductory courses.