Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
16 views40 pages

Chapter-6 Hypothesis Testing

Chapter 8 of the Biostatistics Lecture notes focuses on hypothesis testing, outlining the concepts of null and alternative hypotheses, statistical significance, and types of errors. It details the steps involved in hypothesis testing, including formulating hypotheses, selecting appropriate tests, and making statistical decisions based on p-values. The chapter also provides examples of both two-tailed and one-tailed tests, emphasizing the importance of understanding population parameters and sample statistics.

Uploaded by

Awash Alemu
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)
16 views40 pages

Chapter-6 Hypothesis Testing

Chapter 8 of the Biostatistics Lecture notes focuses on hypothesis testing, outlining the concepts of null and alternative hypotheses, statistical significance, and types of errors. It details the steps involved in hypothesis testing, including formulating hypotheses, selecting appropriate tests, and making statistical decisions based on p-values. The chapter also provides examples of both two-tailed and one-tailed tests, emphasizing the importance of understanding population parameters and sample statistics.

Uploaded by

Awash Alemu
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/ 40

Chapter-8

Hypothesis testing

4/1/2025 Biostatistics Lecture notes, SPH, AkU 1


Objectives
At the end of this chapter the student will be able to:
 Understand the concepts of null and alternative
hypothesis
 Explain the meaning and application of statistical
significance
 Differentiate between type I and type II errors
 Describe the different types of statistical tests used
when samples are large and small
 Explain the meaning and application of P – values
 Understand the concept of degrees of freedom
4/1/2025 Biostatistics Lecture notes, SPH, AkU 2
Hypothesis
Definition: A statistical hypothesis is an assumption or
a statement which may or may not be true concerning
one or more populations.
E.g.1: The mean weight of laboratory students is 55 kg.
E.g.1: The average length of stay of patients admitted
to ACSH hospital is six days
 The purpose of Hypothesis Testing is to aid the
researcher in reaching a conclusion concerning a
population by examining a sample from that
population.
4/1/2025 Biostatistics Lecture notes, SPH, AkU 3
Types of Hypothesis
1. The Null Hypothesis, Ho
• Is a statement claiming that there is no difference
between the hypothesized value and the population
value.

• States the assumption (hypothesis) to be tested


• H0 is always about a population parameter, not about a
sample statistic
• Begin with the assumption that the Ho is true
 Similar to the notion of innocent until proven guilty
4/1/2025 Biostatistics Lecture notes, SPH, AkU 4
Cont.
2. The Alternative Hypothesis, HA or H1
• Is a statement of what we will believe is true if our
sample data causes us to reject Ho.

• Is generally the hypothesis that is believed (or needs to


be supported) by the researcher.
• Is a hypothesis of difference.
• Is a statement that disagrees (opposes) with Ho

4/1/2025 Biostatistics Lecture notes, SPH, AkU 5


Steps in Hypothesis Testing
1. Formulate the appropriate statistical hypotheses clearly
• Specify HO and HA

2. State the assumptions necessary for computing


probabilities
• A distribution is approximately normal (Gaussian)
• Variance is known or unknown
4/1/2025 Biostatistics Lecture notes, SPH, AkU 6
Cont.
3. Select a sample and collect data
• Categorical, continuous

4. Decide on the appropriate test statistic for


the hypothesis. E.g., One population

4/1/2025 Biostatistics Lecture notes, SPH, AkU 7


Cont.

Sample size (N) <30 > / = 30

Population Z-TEST Z- TEST


standard
deviation known
Population
Standard T-TEST Z OR T- TEST
deviation not
known
4/1/2025 Biostatistics Lecture notes, SPH, AkU 8
Cont.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 9


Cont.
5. Specify the desired level of significance for the statistical
test (𝛼=0.05, 0.01, etc.)
6. Determine the critical value.
– A value the test statistic must attain to be declared
significant.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 10


Cont.
7. Obtain sample evidence and compute the test statistic

8. Reach a decision and draw the conclusion


– If Ho is rejected, we conclude that HA is true (or
accepted).
– If Ho is not rejected, we conclude that Ho may be
true.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 11


Stating Statistical Hypotheses

One population
• Indication of equality (either =, ≤ or ≥) must appear in Ho.
Ho: μ = μo, HA: μ ≠ μo
Ho: P = Po, HA: P ≠ Po
• Can we conclude that a certain population mean is
 not 50?
Ho: μ = 50 and HA: μ ≠ 50
 greater than 50?
Ho: μ ≤ 50 HA: μ > 50
4/1/2025 Biostatistics Lecture notes, SPH, AkU 12
Cont.

• Can we conclude that the proportion of patients


with leukemia who survive more than six years is not
60%?
Ho: P = 0.6 HA: P ≠ 0.6

4/1/2025 Biostatistics Lecture notes, SPH, AkU 13


Hypothesis-Testing Common Phrases

> <
 Is greater than  Is less than
 Is more than  Is below
 Is larger than  Is lower than
 Is longer than  Is shorter than
 Is bigger than
 Is smaller than
 Is better than
 Is reduced from

4/1/2025 Biostatistics Lecture notes, SPH, AkU 14


Hypothesis-Testing Common Phrases

≥ ≤
 Is greater than or equal to  Is less than or equal to
 Is at least  Is not more than
 Is not less than  Is at most

= ≠
 Is equal to  Is not equal to
 Is exactly the same as  Is different from
 Has no change from  Has changed from
 Is the same as  Is not the same as

4/1/2025 Biostatistics Lecture notes, SPH, AkU 15


Statistical Decision
Reject Ho if the value of the test statistic that we
compute from our sample is one of the values in the
rejection region

Don’t reject Ho if the computed value of the test


statistic is one of the values in the non-rejection region.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 16


Using p-value to state conclusion

Reject Ho if P-value ≤ α
Accept Ho if P-value > α

The larger the test statistic, the smaller is the P-value.


OR, the smaller the P-value the stronger the evidence
against the Ho.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 17


Types of Errors in Hypothesis T…
Whenever we reject or accept the Ho, we commit
errors.

• Two types of errors are committed.


– Type I Error
– Type II Error

4/1/2025 Biostatistics Lecture notes, SPH, AkU 18


Type I Error
 The probability of a type I error is the probability of
rejecting the Ho when it is true

The probability of type I error is α

Called level of significance of the test

Set by researcher in advance

4/1/2025 Biostatistics Lecture notes, SPH, AkU 19


Type II Error
• The error committed when a false Ho is not rejected

• The probability of Type II Error is 𝛽

• Usually unknown but larger than α

4/1/2025 Biostatistics Lecture notes, SPH, AkU 20


Cont.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 21


Type I & II Errors Relationship
 Type I and Type II errors could never happen at the
same time so that we can’t decrease them at the same
time.
 Type I error can only occur if Ho is true.
 Type II error can only occur if Ho is false.

As probability of type I error (𝛼) , then


Probability of Type II error (𝛽)

4/1/2025 Biostatistics Lecture notes, SPH, AkU 22


Example (Two-tailed test)
1. A simple random sample of 10 people from a certain
population has a mean age of 27. Can we conclude that
the mean age of the population is not 30? The variance is
known to be 20. Let 𝛼 = .05.
Solution:
A. Data
n = 10, sample mean = 27, 𝜎2= 20, α = 0.05
B. Assumptions
Simple random sample
Normally distributed population
4/1/2025 Biostatistics Lecture notes, SPH, AkU 23
Cont.
C. Hypotheses
Ho: µ = 30
HA: µ ≠ 30
D. Test statistic
As the population variance is known, we use Z as
the test statistic.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 24


Cont.
E. Decision Rule
 Reject Ho if the Z value falls in the rejection region.
 Don’t reject Ho if the Z value falls in the non-rejection region.
 Because of the structure of Ho it is a two tail test. Therefore,
reject Ho if: Z ≤ -1.96 or Z ≥ 1.96.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 25


Cont.
F. Calculation of test statistic
𝑋−𝜇 27−30
Z= = Z= = -2.12
𝜎/ 𝑛 20/ 10
G. Statistical decision
 We reject Ho because Z = -2.12 is in the rejection region.
The value is significant at 5% α.
H. Conclusion
We conclude that µ is not 30. P-value = 0.0340
A Z value of -2.12 corresponds to an area of 0.0170. Since there are
two parts to the rejection region in a two tail test, the P-value is twice
this which is .0340.
26
Example (One -Tailed Test)
 A simple random sample of 10 people from a
certain population has a mean age of 27. Can we
conclude that the mean age of the population is less
than 30? The variance is known to be 20. Let α = 0.05.
• Data
n = 10, sample mean = 27, 𝜎2 = 20, α = 0.05
• Hypotheses
Ho: µ ≥ 30, HA: µ < 30

4/1/2025 Biostatistics Lecture notes, SPH, AkU 27


Cont.
 Test statistic
𝑋−𝜇 27−30
Z= = = -2.12
𝜎/ 𝑛 20/ 10
 Rejection Region

Lower tail test

 With α = 0.05 and the inequality, we have the entire rejection region at the left.
The critical value will be Z = -1.645. Reject Ho if Z < -1.645.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 28


Cont.
• Statistical decision
 We reject the Ho because -2.12 < -1.645.

• Conclusion
We conclude that µ < 30.
p = .0170 this time because it is only a one tail test
and not a two tail test.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 29


Cont.

4/1/2025 Biostatistics Lecture notes, SPH, AkU 30


Unknown Population Variance
• In most practical applications the standard deviation of
the underlying population is not known
• In this case, 𝜎 can be estimated by the sample standard
deviation s.

• If the underlying population is normally distributed,


then the test statistic is:
𝑋−𝜇
t=
𝑠/ 𝑛

4/1/2025 Biostatistics Lecture notes, SPH, AkU 31


Example (Two -Tailed Test)
 A simple random sample of 14 people from a certain
population gives a sample mean body mass index
(BMI) of 30.5 and sd of 10.64. Can we conclude that the
BMI is not 35 at α 5%?
𝑋−𝜇
 Ho: µ = 35, HA: µ ≠35 t=
𝑠/ 𝑛
• Test statistic
 If the assumptions are correct and Ho is true, the test
statistic follows Student's t distribution with 13 degrees
of freedom (n-1).
4/1/2025 Biostatistics Lecture notes, SPH, AkU 32
Cont.
 Decision rule
 We have a two tailed test. With α = 0.05 it means that each
tail is 0.025. The critical t values with 13 df are -2.1604 and
2.1604.
 We reject Ho if the t ≤ -2.1604 or t ≥ 2.1604.
𝑋−𝜇
t=
𝑠/ 𝑛
30.5−35 𝑋−𝜇
t= = = -1.58
10.64/ 14 𝑠/ 𝑛
 Do not reject Ho because -1.58 is not in the rejection region.
Based on the data of the sample, we can’t conclude that µ is
different from 35.
4/1/2025 Biostatistics Lecture notes, SPH, AkU 33
Cont.
Summary table for decision rule

4/1/2025 Biostatistics Lecture notes, SPH, AkU 34


Hypothesis Tests for Proportions
Involves categorical values
• Two possible outcomes
– “Success” (possesses a certain characteristic)
– “Failure” (does not possesses that characteristic)

• Fraction or proportion of population in the “success”


category is denoted by p

4/1/2025 Biostatistics Lecture notes, SPH, AkU 35


Proportions
Sample proportion in the “success” category is denoted
by 𝑝.
𝑥 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑠𝑢𝑐𝑐𝑒𝑠𝑠𝑒𝑠 𝑖𝑛 𝑡ℎ𝑒 𝑠𝑎𝑚𝑝𝑙𝑒
𝑝=𝑛= 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑖𝑧𝑒

Testing hypothesis about population proportion


(P) is carried out in much the same way as for
mean when condition is necessary for using
normal curve are met
4/1/2025 Biostatistics Lecture notes, SPH, AkU 36
Example
• Mr. X collected data on a sample of 301 Hispanic women living in
Texas. One variable of interest was the percentage of subjects
with impaired fasting glucose (IFG). In the study, 24 women were
classified in the (IFG) stage. The article cites population estimates
for (IFG) among Hispanic women in Texas as 6.3 percent. Is there
sufficient evidence to indicate that the population Hispanic
women in Texas has a prevalence of IFG higher than 6.3 percent,

let α=0.05

4/1/2025 Biostatistics Lecture notes, SPH, AkU 37


Solution:
1. Data: n = 301, p = 6.3/100=0.063, a=24,
q=1- p = 1- 0.063 =0.937, α=0.05
2. Assumptions: 𝑝 is approximately normally distributed
3. Hypotheses: H0: p = 0.063
HA: p > 0.063
𝑝−𝑝 0.08−0.063
4. Test Statistic: Z = = = 1.21
𝑝𝑞 0.063(0.937)
𝑛 301

4/1/2025 Biostatistics Lecture notes, SPH, AkU 38


Cont.
5.Decision Rule: Reject H0 if Z > Z1-α
Where: Z1-α = Z1-0.05 = Z0.95= 1.645
6. Conclusion: Fail to reject H0
Since
Z = 1.21 < Z1-α = 1.645

4/1/2025 Biostatistics Lecture notes, SPH, AkU 39


THANK YOU!!!

4/1/2025 Biostatistics Lecture notes, SPH, AkU 40

You might also like