0% found this document useful (0 votes)
13 views23 pages

6 Lecture Notes Hypothesis Testing - 2025

The document provides an overview of hypothesis testing in statistics, focusing on one-sample inferences for means and proportions. It outlines the framework for hypothesis testing, including null and alternative hypotheses, decision-making criteria, and the concepts of Type I and Type II errors. Various examples illustrate the application of these concepts in real-world scenarios, demonstrating how to compute test statistics, rejection regions, and p-values to draw conclusions about statistical significance.

Uploaded by

avianrossi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views23 pages

6 Lecture Notes Hypothesis Testing - 2025

The document provides an overview of hypothesis testing in statistics, focusing on one-sample inferences for means and proportions. It outlines the framework for hypothesis testing, including null and alternative hypotheses, decision-making criteria, and the concepts of Type I and Type II errors. Various examples illustrate the application of these concepts in real-world scenarios, demonstrating how to compute test statistics, rejection regions, and p-values to draw conclusions about statistical significance.

Uploaded by

avianrossi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Statistics 1S1/ 1P1 Slides

Sharkay Izally

Department of Statistics

2025

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 1) 2025 1 / 23


Chapter 7: Hypothesis Testing: One-Sample Inferences

Aims
To understand concepts and procedure of carrying out an hypothesis
test
Perform test of hypothesis for µ, σ 2 , and p.

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 2) 2025 2 / 23


General Concepts

Hypothesis-testing framework specifies two hypotheses: null H0 and


alternative hypothesis H1
e.g. for a test of a mean µ, H0 : µ = µ0 vs H1 : µ < µ0
Hypothesis-testing provides an objective framework for making
decisions using probability methods, rather than relying on subjective
impressions.
It provides a uniform and consistent decision-making criterion based on
observed data.
In a one-sample problem, hypotheses are specified about a single
distribution.
In a two-sample problem, two different distributions are compared.
Decision
In hypothesis testing there are two possible decisions that can be reached
on the basis of the sample data, that is:
Reject H0 and conclude that there is sufficient evidence to support
H1 , that is H1 is accepted.
Fail to reject H0 and conclude that there is insufficient evidence to
support H1 .

You must make one or the other of the above decisions.

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 4) 2025 4 / 23


There are four possibilities
True Situation
Decision H0 True H1 True
Reject H0 Wrong decision Correct decision
(Type I error)
Fail to reject H0 Correct decision Wrong decision
(Type II error)
If H0 is true and we fail to reject H0 , or if H1 is true and H0 is rejected,
then the correct decision has been made.
However
if H0 is true and H0 is rejected we have committed a type I error or
if H1 is true and we fail to reject H0 , then, a type II error committed
The probability of a type I error, denoted α, is the probability of rejecting
the H0 when H0 is true, i.e α = P (reject H0 |H0 is true).
The probability of a type II error, denoted β, is the probability of failing to
reject H0 when H1 is true, i.e β = P (fail to reject H0 |H1 is true).
The value 1 − β = P (rejecting H0 |H1 true) is called the power of a test.

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 5) 2025 5 / 23


Test for the Mean µ: One Sided Alternatives
Lower tailed test
We test hypotheses H0 : µ = µ0 vs H1 : µ < µ0
Compute the test statistics
Tobs = Xs/−µ
√ 0 ∼ tn−1 when σ is unknown
n
X −µ
Zobs = √0
σ/ n
∼ N (0, 1) when σ is known
Rejection Region: The set if values for which the null hypothesis is rejected.
If Tobs < −tn−1,α or Zobs < −zα , then we reject H0 and
If Tobs > −tn−1,α or Zobs > −zα , then we fail to reject H0
tn−1,α and zα are called critical values and are used to define the rejection
region. α is called the significance level.
We calculate a p-value, the probabilty that t or Z is less than the test
statistic given that H0 is true, i.e. p − value = P (Z < Zobs ) or
p − value = P (T < Tobs ).

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 6) 2025 6 / 23


The p-value is the smallest values of α for which H0 can be rejected, it is
calculated as P (rejecting H0 |H0 is true) .
The p-value indicates exactly how significant the results are
Guidance for Judging the Significance of test results:
If p − value < α, then the results are statistically significant.
If p − value > α, then the results are not statistically significant

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 7) 2025 7 / 23


Upper tailed test
Hypotheses: H0 : µ = µ0 vs H1 : µ > µ0
Test statistics
T = Xs/−µ
√ 0 ∼ tn−1 when σ is unknown
n
X −µ
Z= √0
σ/ n
∼ N (0, 1) when σ is known
Rejection Region: The set if values for which the null hypothesis is
rejected.
If Tobs > tn−1,α or Zobs > zα , then we reject H0 and
If Tobs ≤ tn−1,α or Zobs ≤ zα , then we fail to reject H0
P-value
p − value = P (Z > Zobs ) or p − value = P (T > Tobs ).

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 8) 2025 8 / 23


Example (not in the book)
A large national study conducted in 2003 reported that the mean systolic
blood pressure (SBP) for males aged 50 in the whole country was 130 with
a standard deviation of 15. In 2004, an investigator hypothesized that due
to increased stress in the work-place, faster-paced lifestyles, and poorer
nutritional habits, SBPs have increased, on average. Suppose the mean
SBP for a sample of n = 48 males aged 50 selected randomly in 2004 was
135. Do these results substantiate the hypothesis? Test at the 5% level of
significance.
Note that µ = 130, σ = 15, n = 48 x = 135 and α = 0.05
1 Hypotheses:
H0 : µ = 130 vs H1 : µ > 130
2 Test statistic:
Z = Xσ/−µ
√ 0 ∼ N (0, 1) (since σ is known)
n
3 Rejection region:
Reject H0 if Zobs > zα = z0.05 = 1.645
4 Calculation:
Zobs = 135−130

15/ 48
= 2.3094
5 P-value:
p-value = P (Z > Zobs ) = P (Z > 2.31) = 1 − P (Z < 2.31) =
1 − 0.98953 = 0.01044
6 Decision and conclusion:
Since Zobs > zα = 1.645 and p-value < α = 0.05, we reject H0 and
conclude that at the 5% level of significance there is sufficient evidence to
support that SBPs have, on average increased.

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 10) 2025 10 / 23


Example 7.18, pg 214
A current area of research interest is the familial aggregation of
cardiovascular risk factors in general and lipid levels in particular. Suppose
the “average” cholesterol level in children is 175 mg/dL. Suppose also that
the sample mean cholesterol level of 10 children whose fathers died from
heart disease is 200 mg/dL and the sample standard deviation is 50
mg/dL. Test the hypothesis that the mean cholesterol level is higher in
this group than in the general population.
Note that µ = 175, n = 10 x = 200 s = 50 and α = 0.05 (Note: if α is not
given in the question, it is 5% by default).
1 Hypotheses:
H0 : µ = 175 vs H1 : µ > 175
2 Test statistic:
T = Xs/−µ
√ 0 ∼ tn−1 (since σ is unknown)
n
3 Rejection region:
Reject H0 if Tobs > tn−1,α = t9,0.05 = 1.833
4 Calculation:
Tobs = 200−175

50/ 10
= 1.5811
5 P-value:

P(T > 1.833) <P(T > 1.5811) < P(T > 1.383)
0.05 <p-value < 0.10

6 Decision and conclusion:


Since Tobs ≯ tn−1,α = 1.833 and p-value ≮ α = 0.05, we fail to reject H0 and
conclude that at the 5% level of significance there is insufficient evidence to
support that the mean cholesterol level in this group is higher than the general
population.
Example Not in the Book
Cans of paint are usually advertised in terms of how much area one gallon
of paint will cover. Super Paint claims that one gallon of its paint will
cover 400 square feet. To test this hypothesis, 10 gallons of paint were
tested and the actual area covered by each can is shown below. Do the
data indicate that the average coverage is significantly less than the
company’s claim of 400 square feet? Test at the α = 0.01 level of
significance? Assume the data are normally distributed.

310 315 415 365 445 375 300 410 365 350
Solution
From the data n = 10, x = 365 and s = 48.3046
Hypotheses:
H0 : µ = 400 vs H1 : µ < 400
Test statistic:
X −µ
√ ∼ tn−1
T = s/ n
Rejection region:
Reject H0 if Tobs < −tn−1,α = −t9,0.01 = −2.821
Calculations:
365−400
Tobs = 48.3046/ √
10
= −2.2913
P-value:

p-value = P(T < −2.2913) = P(T > 2.2913) and since


P(T > 2.821) <P(T > 2.2913) < P(T > 2.262)
0.01 <p-value < 0.025

Decision and Conclusion:


Since Tobs = −2.2913 ≮ −tn−1,α = −2.821 and p-value ≮ α = 0.01 we fail to reject H0
and conclude that at the 1% level of significance there is insufficient evidence to support
that the average coverage is significantly less than the company’s claim.

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 14) 2025 14 / 23


Example 7.18 (changed)
A current area of research interest is the familial aggregation of
cardiovascular risk factors in general and lipid levels in particular. Suppose
the “average” cholesterol level in children is 175 mg/dL. Suppose also that
the sample mean cholesterol level of 10 children whose fathers died from
heart disease is 200 mg/dL and the sample standard deviation is 30
mg/dL. Test the hypothesis that the mean cholesterol level is significantly
different in this group from the general population.
Note that µ = 175, n = 10 x = 200 s = 30 and α = 0.05 (Note: if α is not given in the
question, it is 5% by default).
1 Hypotheses:
H0 : µ = 175 vs H1 : µ ̸= 175
2 Test statistic:
T = Xs/−µ
√ 0 ∼ tn−1 (since σ is unknown)
n
3 Rejection region:
Reject H0 if |Tobs | > tn−1,α/2 = t9,0.025 = 2.262
4 Calculation:
Tobs = 200−175

30/ 10
= 2.6352
5 P-value:

P(T9 > 2.821) <P(T9 > 2.6352) < P(T9 > 2.262)
p − value
0.01 < < 0.025
2
0.02 <p − value < 0.05

6 Decision and conclusion:


Since Tobs > tn−1,α/2 = 2.262 and p-value < α = 0.05, we reject H0 and conclude that at the
5% level of significance there is sufficient evidence to support that the mean cholesterol level
in this group is significantly different to the general population.

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 16) 2025 16 / 23


Test for the Proportion p, (Inference for the Binomial Distribution)
The hypotheses
H0 : p = p0 vs H1 : p > p0 OR H1 : p < p0 OR H1 : p ̸= p0
p0 q0 
Recall that pb ∼ N p0 , n for np0 q0 ≥ 5
p −p0
The test statistic is given by Z = p p0 q0 ∼ N (0, 1)
b
n

Study Example 7.48 on page 247

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 17) 2025 17 / 23


Example (not in the book)
The drug erythromycin has been proposed to possibly lower the risk of
premature delivery. A related area of interest is its association with the
incidence of side effects during pregnancy. Assume 30% of all pregnant
women complain of nausea between weeks 24 and 28 of pregnancy.
Furthermore, suppose that a random sample of 200 women who are taking
erythromycin regularly during the period, 70 complain of nausea. At the
10% level of significance test the hypothesis that the incidence rate of
nausea for the erythromycin group is different from a typical pregnant
woman.
Solution
70
Given that n = 200 and let X = 70, and hence b
p= 200
= 0.35
Hypotheses:
H0 : p = 0.3 vs H1 : p ̸= 0.3
Test statistic:
Z = p p̂−p0 ∼ N(0, 1)
p0 (1−p0 )
n
Rejection region:
Reject H0 if Zobs > z α = z0.05 = 1.645 or Zobs < −z α = z0.05 = −1.645
2 2
Calculations:
0.35−0.3
Z = p = 1.5430
0.3×0.7
200
P-value:

p-value = 2P(Z > 1.5430)


≃ 2P(Z > 1.54)
= 2[1 − P(Z < 1.54)]
= 2(1 − 0.93822)
= 0.12356

Decision and Conclusion:


Since Zobs = 1.543 ≯ z α = 1.645 and p-value = 0.123346 ≮ α = 0.1, we fail to reject H0 and
2
conclude that at the 10% level of significance there is insufficient evidence that the incidence
rate of nausea for the arythromycin group is different from a typical pregnant group.
Test for the Population Variance, σ 2

The hypotheses

H0 : σ 2 = σ02 vs H1 : σ 2 > σ02 OR H1 : σ 2 < σ02 OR H1 : σ 2 ̸= σ02

If the population being sampled is normally distributed then the test


statistic use is

(n − 1) S 2
χ2 = ∼ χ2 (n − 1)
σ02
where σ02 is the value of the population variance specified under H0 .

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 20) 2025 20 / 23


The following table gives the rejection region and the p-value:
H1 Reject H0 if P-value 
σ 2 < σ02 χ2obs < χ21−α one tailed test P χ2 < χ2obs

σ 2 > σ02 χ2obs > χ2α one tailed test P χ2 > χ2obs
2

σ ̸= σ02 χ2obs < 2
χ1−α/2 or χ2obs > χ2α/2 two-tailed test 2P 2
χ > χobs2

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 21) 2025 21 / 23


Example (not in the book)
A dairy processing company is concerned that the variance of the amount
of fat in the whole milk processed by the company is more than the
acceptable level of 0.25. You wish to test if this is correct and find that a
random sample of 21 milk containers has a variance of 0.27. At α= 0.05,
is there enough evidence to reject the company’s claim? Assume the
population is normally distributed.

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 22) 2025 22 / 23


Example (not in the book)
An experimenter was convinced that the variablility in his measuring
equipment results in a variance of 4. Sixteen measurements
yielded s 2 = 6.1. At α = 0.05, do the data disagree with his claim?

Sharkay Izally (Rhodes University) Statistics 1S1/1P1 (slide 23) 2025 23 / 23

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy