Biostat Lecture Eight
Biostat Lecture Eight
02/08/2025 [email protected] 1
What is a Hypothesis?
•A hypothesis is a statement
of belief about the values of I assume the mean
population parameters. G PA of this class is
3.25!
•A parameter is a
characteristic of the
population, like its mean or
variance.
• The parameter must
be identified before
analysis.
© 1984-1994 T/Maker
Co.
2
Hypothesis
testing
• The procedure for evaluating a hypothesis.
• Hypothesis:
Is a testable statement that describes the nature of the
proposed relationship between two or more variables of
interest.
It is a guesswork about a population parameter.
33
Hypothesis testing
cot…
• Statistical tests can prove (with a certain degree of
confidence), whether the statement is true or not
• The best way to determine whether a statistical hypothesis
is true would be to examine the entire population.
• The null hypothesis (H0) will always state that the parameter
66
Hypothesis testing
cot…
77
State the null and alternative
hypothesis for each
statement
a. A researcher thinks that if expectant mothers use vitamin
pills, the birth weight of the babies will increase. The
average birth weight of the population is
8.6 pounds.
b. There is a belief that 10% of the smokers develop
lung cancer in country Ethiopia.
c. A psychologist feels that playing soft music during a
test will change the results of the test. The psychologist
is not sure whether the grades will be higher or lower.
In the past, the mean of the scores was 73
d. Researchers are interested in the mean level of some
enzyme in a certain population. They want to know
whether they can conclude that the mean enzyme
level in this population is different from 25. 88
Soluti
on
a. H0: μ = 8.6 vs H 1: μ
> 8.6
b. H0: P= 0.1 vs H1: P
ǂ 0.1
c. H0: μ= 73 vs H1: μ
ǂ 73
9
Hypothesis testing
cot… α
Level of significance
• A method for making a decision must be agreed upon.
errors.
Two types of errors are committed.
Type I Error
Type II Error
02/08/2025 [email protected]
Type I Error
The error committed when a true Ho is rejected
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
02/08/2025 [email protected] 12
Type II Error
The error committed when a false Ho is not rejected
The probability of Type II Error is
Power
The probability of rejecting the Ho when it is false.
Power = 1 – β = 1- probability of type II error
We would like to maintain low probability of a Type I error (α)
And low probability of a Type II error (β) [high power = 1 - β].
02/08/2025 [email protected] 13
Action Reality
(Conclusion)
Ho True Ho False
02/08/2025 [email protected] 14
Type I & II Error
Relationship
02/08/2025 [email protected] 15
Hypothesis testing for Population Mean
• These are:
16
1
4
Hypothesis testing for single
population
Steps in hypothesismean
testing
1. state the null hypothesis: H0: μ = μ0
2. state the alternative hypothesis:H1:μ≠μ0
3. fix the level of significance(α) and compute the test
statistics as:
NB: this is not the only test statistics. depending on the type of
data and sample size, we may need to compute z-score, t-test or
x2- test
17
Steps in hypothesis
testing
• For large samples (n≥30) and σ2 is known, the test
statistic has standard normally distribution, Z- test
• For small sample (n<30) and if the true variance (σ2)
is unknown. the test statistic is distributed as a
student t-distribution with n-1 degrees of freedom.
• If the interest is to check the presence or absence of
association then x2 score distribution will be used
18
Steps in hypothesis
testing
4.Find cot..corresponds to the given
the critical values:
alpha (α) from the distribution table.
5.Decision rule: For the hypothesis which is two
tailed, the decision is defined by:
• Reject the null Hypothesis if:
19
Exam
ple
• We suspect that the average fasting blood sugar level of urban
residents in Ethiopia is 108 with a standard deviation of 10. A
random sample of 225 clinic patients (all urban) yields a mean
blood sugar level of 119. Test whether the hypothesis true or not at
0.05 level of significant. Follow the steps and give your
conclusion.
Solution: Given
•Mean(μ) =108, n = 225, sample mean = 119 and σ = 10 Test
procedure
1. Null hypothesis H0: μ=108
20
20
Example
cot…
21
21
Exampl
es
22
Example
3. Find the critical values 𝑡 =𝑡 =
cot… 𝛼 0.05
,𝑛−1 ,9
2.26
2 2
4. Decision: reject the null
𝑡 𝑐𝑎𝑙 >
hypothesis if: other wise we do not reject
hypothesis, therefore
the null 2.46 > 2.26, so we reject the
𝑡 𝑡𝑎𝑏
null
hypothesis
23
Test procedures for one
tailed
• Test procedure fortestone tailed test is similar with that of the two
tailed test except at some steps.
1. State the null hypothesis Ho: μ = μo
2. State the alternative hypothesis: H1: μ < μo or H1: μ > μo.
The choice of the two type depends on the problem
situation.
24
Test procedures for one
tailed test…
• Fix the level significance (α) and compute the test statistic: this step is the
same with that of two tailed test. In addition, the choice of the test statistic is
also the same. That is the test statistics for one test is defined as:
𝑍𝑐𝑎𝑙 = 𝑠.𝑥−𝜇0 < −𝑍𝛼 other wise do not reject the null
– Reject the null hypothesis if:
if 𝑒
hypothesis
x̅
:
𝑍𝑐𝑎 >
0
−𝑠. 𝜇
=𝑙 −𝑍
𝑒
�
�
26
Test procedures for one
tailed test..hypothesis is H : μ > μ
• If the alternative 1 o,
then the decision will be;
• Reject the null hypothesis if:
�𝑐 𝑎 𝑙= 𝑥̅x − 𝜇𝑜 >
𝛼
𝑠.
• Other wise do� 𝑒 the null
𝑍
not reject
hypothesis if:
�𝑐 𝑎 = 𝑥̅x − 𝜇𝑜
𝑙
𝑠.
𝑒
�
� �
< 𝑍
27
Exam
ple
• Certain brand of cigarettes is advertised by manufacturer as
having mean nicotine content of 15 mg/cigarette. A
sample of 200 cigarettes is tested by lab and found to have
average of 16.2 mg of nicotine with known SD = 3.6. Using a
0.01 level of significance, can we conclude that actual mean
nicotine content of this brand is greater than 15 mg?
28
H 0 : 1 5; H 1 : 15 0
15
X 0
16.2 1 5
Z .255
n
4.71
2.33
Z 1-0.01 - Z 0.01
29
Exampl
e 1to assume that systolic blood pressures
• A research team is willing
in a certain population of males are approximately normally
distributed with a standard deviation of 16. A simple random
sample of 64 males from the population had a mean systolic
blood pressure reading of 133. At the 0.05 level of significance,
do these data provide sufficient evidence for us to conclude that
the population mean is greater than 130?
• Solution:
1. State null and alternative hypothesis
Ho: μ= 130 vs H1: μ >130
2. Find the test statistic: 𝑍𝑐𝑎𝑙 = 𝑥̅−𝜇0
= 133−130
2
=
= 1.5
3 𝜎2 16 2
6
𝑛 4
30
Example 1
the cont.… 𝑍𝛼 = 𝑍0.05 =
1.645
3. Find critical/tabulated values
31
Exampl
e 2of a sample of 25 records of
• A study was made
patients seen at a chronic disease hospital on an
outpatient basis. The mean number of outpatient
visits per patient was 4.8, and the sample
standard deviation was 2. Can it be concluded
from these data that the population mean is less
than four visits per patient? Let the probability of
committing a type I error be 0.05.
• Solution
1. State null and alternative
hypothesis H0: μ = 4 vs H1: μ <
4
2.Find the test statistic because population
standard deviation is unknown in this case we
use t-distribution 32
Example 2
•𝑡 𝑥̅ −𝜇0 4.8−4
cot… 0.8
𝑐𝑎𝑙 = = =
0.
𝑠2 22
4
𝑛 25
= 2
3. Then find the tabulated values from the t-
distribution i.e.
34
Exerci
se
• A study examined a sample of 16 subjects with open-
angle glaucoma and unilateral hemifield defects. The
ages (years) of the subjects were:
• 62 62 68 48 51 60 51 57 57 41 62 50 53 34 62 61
35
Proportions
• Involves categorical variables
• Fraction or % of population in a category
• If two categorical outcomes, binomial distribution
• Either possesses or doesn’t possess the
characteristic
• Sample proportion (ps)
ps X n u m be r o f
s u cce s s e s n sample
size
36
Hypothesis testing for single population
proportions
• A hypothesis test involving a population proportion
can be considered as a binomial experiment when
there are only two outcomes
State the hypothesis
• State the null hypothesis, Ho: P = Po vs H1: P ≠ Po
Ho: P = Po vs
H1: P < Po 37
H.T for single
population
• Find cot…
the critical value and compute
•𝑍
the test statistics
𝑝−𝑝
=
0𝑃 (1−
𝑃 )𝑛
• 𝑍𝑐𝑎𝑙 > 2
𝑍 𝑡𝑎𝑏
null hypothesis
38
Exam
ple abuse in psychiatry
• In the study of childhood
patients, a researcher found that 166 in a sample
of 947 patients reported histories of physical or
sexual abuse. Test the hypothesis that the true
population proportion is 30%?, use α = 0.05
Solution
Po=0.3
To test the hypothesis we need to follow the steps
Step 1: State the hypothesis
• Ho: P= 0.3 vs H1: P ≠ 0.3
Step 2: Fix the level of significant
(α=0.05)
Step 3: Compute the calculated and tabulated
value of the test statistic 39
Example
•𝑍𝑐𝑎𝑙 =
𝑝−𝑝cot…
0
0.175−0.3
=
𝑝(1−𝑝)
0.175(1−0.175)
𝑛
947
−0.143
=0.01233 =
−11.60of the calculated and
•Decision: Comparison
tabulated
41
Exercis
e2
• In a sample of 150 hospital emergency
admissions with a certain diagnosis, 128 listed
vomiting as a presenting symptom. Do these
data provide sufficient evidence to indicate, at
the 0.01 level of significance, that the
population proportion is less than 0.92?
42
P-
value
• Probability of Obtaining a Test Statistic More Extreme (£ or
) than Actual Sample Value Given H0 Is True
• The P-value (or probability value) is the
probability of getting a sample statistic (such as
the mean) or a more extreme sample statistic in
the direction of the alternative hypothesis when
the null hypothesis is true.
02/08/2025 [email protected] 44
Chi-square test (x2)…
Chi square test is used for nominal or ordinal
explanatory and response variables
Variables can have any number of distinct levels
If the two variables have two level each, the resulting
contingency table will be 2X2
Variable 1
Variable 2 Diseased Not diseased N ( ad bc ) 2
2
cal
( a c )( b d )( a b )( c d )
Exposed A B A+B
02/08/2025 [email protected] 45
Chi-square test (x2)
Hypothesis testing steps in chi square test
…
1. State Hypotheses:
Null hypothesis (Ho): The classification variables are independent
02/08/2025 [email protected] 46
Example 1
Consider the following 2X2 table. Is there association between wearing Helmet and head injury??
Use 95% confidence level.
Head injury Wearing helmet
Yes No Total
Yes 17 218 235
02/08/2025 [email protected] 47
Example 1…
Step 1: hypothesis
No 4 34 38
02/08/2025 [email protected] 49
Example 2…
Step 1: hypothesis
HO : There is no association between eating sandwich and
gastroenteritis
Ha : There is an association between eating sandwich and
gastroenteritis
Step 2. Test statistics χ2 = 17.6
Step 3: Critical value of χ21(0.05)= 3.84
Step 4: decision: since 17.6>3.84 then reject the null
hypothesis and decide as there is association between eating
sandwich and gastrointestinal pain
02/08/2025 [email protected] 50
THE END OF THE COURSE
THANKS!!!
02/08/2025 [email protected]