Topic 7: Inferences Based on a Single Sample: Tests of Hypotheses
Introduction
Hypothesis testing is one of the most important tools in inferential statistics.
While estimation focuses on providing likely values for population parameters
using sample data, hypothesis testing allows us to make decisions or judgments
about those parameters. It provides a formal structure for assessing whether
observed data are consistent with a specific claim or theory about a population.
In business, economics, medicine, and other fields, hypothesis testing helps
assess product quality, test new marketing strategies, determine treatment
effectiveness, and much more. This topic introduces the logic and procedures of
hypothesis testing when a single sample is involved.
Hypothesis testing is a structured process to test assumptions (claims) about a
population using sample data. It helps decision-makers test assumptions using
sample data.
Key Terms
Concept Explanation
Null Hypothesis The claim to be tested. Usually a statement of "no effect" or
(H₀) "no difference"
Alternative
What you are trying to prove
Hypothesis (H₁)
A number calculated from the sample data to compare
Test Statistic
against critical values
Significance Level The probability of rejecting H₀ when it is actually true
(α) (common: 0.05 or 5%)
The probability of getting a test statistic as extreme as the
P-value
one observed, under the assumption H₀ is true
Critical Value The threshold beyond which H₀ is rejected
One-Sample t-Test Used when σ is unknown
One-Sample z-Test Used when σ is known or for proportions
Common Hypothesis Testing Situations:
Area Example Claim Test Type
Manufacturing "Average fill is 500ml" One-sample t-test
Human "Average salary is more than
One-sample t-test
Resources $40,000"
"At least 75% of users like our One-sample z-test
Marketing
app" (proportion)
Finance "Stock return is greater than 8%" One-sample t-test
Steps in Hypothesis Testing
1. State H₀ and H₁
2. Choose α (e.g., 0.05)
3. Calculate the test statistic
4. Find the p-value or critical value
5. Make a decision:
o If p-value < α → Reject H₀
o If p-value > α → Fail to reject H₀
Test Statistic Formulas
Z-test (when population σ is known):
t-test (when σ is unknown):
Business Example (Z-Test)
Case: Website Load Time
Claim: Website loads in < 6 seconds. Sample of 50 tests shows:
xˉ=5.7, σ=0.8, α=0.05
Step 1:
H₀: μ ≥ 6
H₁: μ < 6
Step 2: Use z-test:
Step 3:
Critical z for α = 0.05 (one-tailed) ≈ -1.645
Since -2.65 < -1.645 → Reject H₀
Interpretation: The website is faster than 6 seconds with 95% confidence.
Case: One-Sample t-Test (Business Case)
Context: A café claims that customers wait no more than 6 minutes for service.
You observe a random sample of 10 customers:
[7.2, 5.8, 6.3, 6.0, 7.5, 5.5, 6.2, 5.9, 6.4, 6.1]
xˉ=6.29, s=0.56, n=10
Claim: μ≤6
α = 0.05 (one-tailed)
Steps:
1. H₀: μ ≤ 6
H₁: μ > 6
2. Test statistic:
3. Critical value:
4. Since 1.64 < 1.833 → Fail to reject H₀
Conclusion: There is not enough evidence to say customers wait longer than 6
minutes.
Case: One-Sample z-Test (Proportion)
Scenario: A mobile app team claims that 80% of users find the interface intuitive.
In a random sample of 100 users, 72 agree.
H₀: p = 0.80
H₁: p < 0.80
Compute:
Critical z at α = 0.05 (one-tailed) = -1.645
Since -2.0 < -1.645 → Reject H₀
Conclusion: The interface may not be as intuitive as claimed.
7.1 The Concepts of Hypothesis Testing
A hypothesis is a statement about a population parameter. In hypothesis testing,
we begin with two competing hypotheses:
The null hypothesis H0: a statement of no change, no effect, or status quo. It
is assumed true unless evidence suggests otherwise.
The alternative hypothesis H1 or Ha : a statement that contradicts H 0 and
represents the claim to be tested.
The goal is to use sample data to determine whether there is enough evidence to
reject H0 in favor of H1.
7.2 Types of Hypotheses and Errors
There are three common forms of alternative hypotheses:
Two-tailed test:
Left-tailed test:
Right-tailed test:
Here, is the hypothesized value of the population mean.
In hypothesis testing, we make decisions based on sample evidence, which
introduces the risk of making errors:
Type I Error: Rejecting H0 when it is actually true. The probability of a Type
I error is denoted by α, the level of significance.
Type II Error: Failing to reject H 0 when it is false. The probability of this
error is denoted by β\betaβ.
The power of a test, defined as 1−β1 is the probability of correctly rejecting a
false null hypothesis.
7.3 The Hypothesis Testing Procedure
The general procedure for hypothesis testing includes the following steps:
1. Formulate the hypotheses:
Define H0 and H1.
2. Choose the significance level α\alphaα:
Common choices are 0.05, 0.01, or 0.10.
3. Select the appropriate test statistic:
The test statistic depends on the type of data, the parameter of interest, and
whether the population standard deviation is known.
4. Determine the rejection region:
Based on α and the form of the alternative hypothesis, determine critical
values or p-values.
5. Compute the test statistic from sample data.
6. Make the decision:
If the test statistic falls in the rejection region or if the p-value < α\alphaα,
reject H0.
Otherwise, do not reject H0.
7. State the conclusion in context.
7.4 Testing a Population Mean (σ Known)
When the population standard deviation σ\sigmaσ is known and the sample is
from a normal population (or the sample size is large), the test statistic is:
Where:
xˉ is the sample mean
is the hypothesized population mean
n is the sample size
The decision rule involves comparing the computed z-value to the critical z-
value from the standard normal distribution or using the p-value.
7.5 Testing a Population Mean (σ Unknown)
When the population standard deviation is unknown, which is common in
practice, we use the sample standard deviation s and the t-distribution:
This statistic follows a t-distribution with n−1 degrees of freedom. Critical
values come from the t-distribution table, and p-values can be used for decision-
making.
This test is often referred to as the one-sample t-test.
7.6 Testing a Population Proportion
To test a hypothesis about a population proportion p, we use the sample
proportion , where x is the number of successes in a sample of size n. The
test statistic is:
Where is the hypothesized population proportion.
Conditions:
to ensure the normal approximation is valid.
As with other tests, we compare the z-value to a critical value or use the p-value
approach.
7.7 The p-Value Approach
The p-value is the probability, assuming the null hypothesis is true, of obtaining
a test statistic as extreme as or more extreme than the one calculated from the
sample. It measures the strength of evidence against H0H_0H0.
Decision rule using p-value:
If p-value ≤α: Reject H0
If p-value >α: Do not reject H0
The smaller the p-value, the stronger the evidence against H0.
7.8 Practical Considerations
Statistical significance vs. practical significance: A result may be statistically
significant but may not have practical relevance. Analysts must interpret
findings within the real-world context.
Assumptions: All tests rely on certain assumptions, such as random
sampling, normality, or large sample size. Violations may lead to invalid
conclusions.
One-tailed vs. two-tailed tests: The choice of hypothesis direction must be
based on the research question. One-tailed tests have more power in one
direction but cannot detect effects in the opposite direction.
Summary
Hypothesis testing provides a structured framework for making decisions under
uncertainty. By comparing sample data to a hypothesized population parameter, we
can determine whether the evidence is strong enough to reject the null hypothesis.
This chapter introduced hypothesis tests for population means and proportions,
both when standard deviation is known and unknown. It also explained how to use
test statistics, critical values, and p-values, and highlighted the importance of
considering both statistical and practical significance.