Professional Documents
Culture Documents
MODULE CODE:
BR21EH
NQF LEVEL:
CREDITS: 12
LEARNER GUIDE
2
TABLE OF CONTENTS
ORGANISATIONAL COMPONENT
1. LEARNING COMPONENT 3
2. INTRODUCTION 4
3. MISSION STATEMENT 4
5. PURPOSE STATEMENT 4
6. PROGRAMME OVERVIEW 4
14. CALCULATOR 6
18. ASSESSMENT 10
LEARNING COMPONENT
1. LEARNING UNITS
LEARNING UNIT 7 : Two Means for independent samples with known Variances 52
LEARNING UNIT 10: Two Means for dependent and equal samples 68
4
ORGANISATIONAL COMPONENT
2. INTRODUCTION
Welcome to biostatistics in the health science. We intend to make your learning experience in this subject
as enjoyable as possible. However, we cannot achieve this without your active participation in all aspects
of the learning process. It is thus imperative that you attend all lectures, be vigilant and attentive in class,
ask questions and participate in class discussions, do the class activities and make sure you understand
the subject content by revising and practising biostatistics in Health Sciences for at least one hour per
day.
3. MISSION STATEMENT
✓ Provide a high quality and broad based education that prepares learners for successful professional
careers and for lifelong learning
✓ Do relevant research and to promote research outputs
✓ Render service to the community
Provide industry with satisfied, well-equipped and entrepreneurial engineering technicians for the 21 st
century. The goal is to provide learners with the required graduate attributes to adequately compete in
the global workplace or to pursue further studies.
5. PURPOSE STATEMENT
This qualification is primarily vocational, or industry oriented, characterised by the knowledge emphasis,
general principles and application or technology transfer. The qualification provides students with a
sound knowledge base in a particular field or discipline and the ability to apply their knowledge and skills
to particular career or professional contexts, while equipping them to undertake more specialised and
intensive learning. Programmes leading to this qualification tend to have a strong vocational,
professional or career focus and holders of this qualification are usually prepared to enter a specific niche
in the labour market. The specific purpose of educational programmes designed to meet this
qualification are to build the necessary knowledge, understanding, abilities and skills required for further
learning towards becoming a competent practicing Professional Engineering Technician.
6. PROGRAMME OVERVIEW
In order to enable learners to eventually fulfil these functions it is expected from them to be able to
confidently comply with the appropriate analytical, statistical and mathematical skills as well as being
able to communicate well orally and in the preparation of technical reports. Their interpersonal skills –
and skills to function as part of a team – is also purposefully developed by the nature of assignments that
they are expected to complete.
This qualification will provide learners with the knowledge and skills to enter into an environment which
5
applies computers in a technical and industrial context in addition to addressing the technical needs of
the commercial environment. The modules in the degree are to maintain a good balance between
cognitive and practical skills at tertiary level. The learner is to develop holistically rather than gaining
mere knowledge of theoretical principles. Learners need to have the required technical knowledge, skills
and graduate attributes to successfully contribute to the social-economic development of communities
and the country. Entrepreneurial skills and internationalisation are encouraged continuously.
The programme includes substantive mathematical equations and standard statistical methods along
with fundamental engineering knowledge to enable learners to think critically, reason logically and
eventually to provide solutions to real-life engineering problems. Various components are used in
different systems and procedures to implement these solutions for industry.
According to South African Qualifications Authority the following seven critical cross-field outcomes must
inform all teaching and learning in our courses:
✓ to acquaint the student with those basic concepts and techniques of Statistics that are most useful in
the earth science disciplines;
✓ to produce students who are statistical thinkers, analysers and decision makers;
✓ to provide the necessary background in core courses in biostatistics.
This learning guide provides a framework in which the learning outcomes of the subject are clearly stated.
The aim of each learning theme is known to you, the student, well in advance. Therefore you know what
the syllabus comprises of and by which methods and criteria you will be assessed during and at the end
of the course.
The learning guide promotes selfstudy by the student. The continuous consultation of this learning guide
is therefore imperative as it provides you with, amongst others:
6
✓ The learning outcomes of each learning unit that you should attain,
✓ Information on which topic will be discussed (workscheme); and
✓ Activities which will help you to attain the learning outcomes of the subject.
The learning guide also contains important information about your course lecturers, assessment,
prescribed books, etc.
Walker, G. A., Common Statistical Methods for Clinical Research with SAS Examples, 3nd edition, 2010,
ISBN 978-1-60764-228-2.
e-Thutho is an electronic Learning Management System that offers a range of supporting learning tools
to you as student. In particular, through e-Thutho you will have electronic access to all the course material
such as lecture notes, worked examples, tutorials, tests and examinations (with their solutions).
Furthermore it also contains communication tools which enables communication between students and
communication between the lecturer and the student. Used in conjunction with the lectures and
tutorialsessions e-Thutho can go a long way in helping students to be successful. Please note that the
lecturers will provide you with further information during the first week of lectures. Please use the
following links to access e-Thuto:
CUT homepage→Students→Current students→e-Thuto.
14. CALCULATOR:
Office
YA RONA 221
Number
Postal address: Central University of Technology, Free State, Private Bag X20539, Bloemfontein, 9300,
South Africa
Class attendance is of utmost importance in this programme. Important announcements are made and
instructions are given during class meetings. Thus, it will be very difficult for a learner to perform well in
this subject if he/she does not attend classes regularly. Furthermore, records are kept and uploaded onto
the ITS system of CUT.
8
Week 6
Test 2 / Main Test 2 Apr to 5 April
based on Units 4, 5
and 6
18. ASSESSMENT:
✓ All students:
Due dates are set for every assignment that forms part of the assessment for this module. The due
date for each assignment will be communicated to ALL students present in class. These dates
represent the last working day on which assignments should reach the lecturer at Central University
of Technology (CUT), Free State.
✓ Abbreviations:
CT: CLASS TEST
MT: MAIN TEST
SMT: SICKNESS MAKEUP TEST
CM: COURSE MARK
✓ Assessment criteria:
The assessment criteria for each unit can be found under the learning component section.
✓ Assessment methods:
During a semester a minimum of one class test (CT) and one main test (MT) and one sickness makeup
test (SMT) will be scheduled.
In the case of a sickness examination the examination department will arrange with you in respect of the
date and time.
✓ Plagiarism:
The Central University of Technology, Free State regards plagiarism as a very serious offence and is
regarded as grounds for expulsion. Students found plagiarising could face proceedings under the
University's Regulations. Therefore, any assessable material submitted by the students must be their
own work.
Please note: Faxed assignments will not be accepted. Always keep a copy of every assignment you
submit. Assignments do occasionally go astray.
10
Generate; combine;
Putting together Combination construct;
Synthesis elements/parts to form Fusion formulate; propose; HOq
a system Creation assemble; design;
predict; improve
Distinguish;
Breakdown of a Study
compare; contrast;
Analysis system Scrutiny HOq
differentiate;
into its elements/parts Breakdown
classify; categorize
✓ Verification of marks:
Please note the following schedule for correction of course marks. No corrections will be made after
the indicated dates:
In order to learn biostatistics in health you need to participate actively in the learning process, meaning
that you must do all the calculations yourself and you must write out the solutions to each exercise. It is
not sufficient to watch the lecturer solve a similar problem or just read through the solutions in the notes.
The test of real understanding is whether or not you can solve the exercises on your own after witnessing
a few of the similar solutions. Remember the saying: “Practice makes..............”.
At the end of each lecture you must be able to convince yourself that you understand the content of that
particular lecture. If you have a question or do not understand what the lecturer says in class, please stop
him/her immediately and ask your question - don’t leave it for later. If you have to ask your question later
on, do it immediately at the end of the lecture or make an appointment with the lecturer.
Prepare for each lecture by using this learning guide. Unless you ask questions, the lecturer will assume
that you understand all the theory and will commence with applications. If you do not understand, bring
it to the lecturer’s attention as soon as possible by asking specific questions.
During the years, it has been proven that the following guidelines will result in academic success:
✓ Read the appropriate section in your learner guide carefully before attending the lecture.
✓ You should study the completed section in depth, as soon as possible after the lecture, but at least
before the following lecture.
✓ You must complete all the relevant homework exercises, assignments or questions for each
lecture topic. Spend more time thinking about the problem and referring to resources mentioned
in the learning units. Try to answer the question to the best of your ability. If you have made and
mistake, small as it may be, correct it in class and if you are still not sure about the solution, ask
the lecturer for further explanation.
✓ Concentrate on understanding the logic of the module instead of concentration entirely on the
technique used.
✓ Work out all class examples, self-study work and laboratory work thoroughly and completely.
✓ Test your increasing knowledge daily.
LEARNING UNIT 1
HYPOTHESIS TESTING: CHI-SQUARE TEST
• Chi-Square Test
Learning outcome:
After completion of this section you should be able to:
✓ Apply the hypothesis test with Chi-Square Test.
1.1 Definition
If the variables under study is not continuous but is instead classified into categories, which may of
may not be ordered, then different methods of inference should be used. When we conduct a test
of hypothesis comparing two proportions when the sample size n is large one preferably will choose
the Chi-Square Test.
1.2 Synopsis
Observation is made of X1 responders out of n1 patients who are studied in one group, and X2 responders
out of n2 patients in a second, independent group, as shown in Table 1.
Assume that each of the ni patients in Group i (i =1, 2) have the same chance, pi, of responding, so that X1
and X2 are independent binomial random variables. The goal is to compare population ‘response’ rates (p 1
vs. p2) based on these sample data.
2 NUM2
Test statistic: obs =
DEN
where
NUM =
( X1 n2 − X2 n1 )
n
and
n1 n2 ( X1 + X2 ) (n − X1 − X2 )
DEN =
n3
This computing formula for the chi-square statistic can be shown to be equivalent to the more popular
form
4
( Oi − Ei )
2
2
obs = i=1
Ei
where the Oi's and Ei's are the observed and expected cell frequencies, respectively, as
2
Critical value: 1− , 1 where α is the significance level and for a 2x2 continengy table one will have 1
2
degree of freedom. In general for a rxc contingency table the critical calue is: 1 − ,(r − 1)( c − 1) .
2 2
Rejection region and conclusion: reject Ho if obs 1− , 1
Use this test only if none of the four expected values is less than 5.
Define ‘response’ as the event that a patient develops one or more GI reactions during the study, and let
p1 and p2 represent the probabilities that a randomly selected LRTI patient has such a ‘response’ when
18
treated with the test drug and the control drug, respectively. The data are often summarized in a 2×2
contingency table as shown in Table 1.3
Solution
State the hypothsis:
H0 : pyes = pno against H1 : pyes pno for status (Test Drug, Control)
and
66 52 50 68
DEN = = 7.102
1183
( −5.966 )
2
2
obs =
7.102
= 5.012
2
Critical value: 1 − ,1
2 2 2
1 − ,1 = 1 − 0.05,1 = 0.95,1 = 3.84
2 2
Rejection region and conclusion: We reject H0 if obs 1 − ,n − 1
2 2
obs = 5.012 1 − ,1 = 3.84
We will reject H0. Thus there is strong evidence to support the claim that the proportions in the
response caterory (responders who answered yes or no) are different from category patient’s status
(test drug or control).
19
TUTORIAL 1
LEARNING UNIT 1
Question 1. Consider the 2 X 2 table below, which displays the results of a study investigating the
effectiveness of bicycle safety helmets in preventing head injury. The data consist of a random sample of
793 individuals who were involved in bicycle accidents during a specified one-year period.
Table 1.4 Observed frequencies of 793 individuals who were involved in bicycle accidents during a
specified one-year period.
Wearing Helmet
Head Injury Yes No Total
Yes 17 218 235
No 130 428 558
Total 147 646 793
Of the 793 individuals who were involved in bicycle accidents, 147 were wearing safety helmets at the time
of the incident and 646 were not. Among those wearing helmets, 17 suffered head injuries requiring the
attention of a doctor, whereas the remaining 130 did not; among the individuals not wearing safety helmets,
218 sustained serious head injuries, and 428 did not. The entries in the contingency table - 17, 130, 218, and
428- are thus the observed counts within each combination of categories. To examine the effectiveness of
bicycle safety helmets, we wish to know whether there is an association between the incidence of head
injury and the use of helmets among individuals who have been involved in accidents. Use a chi-square
goodness-of-fit test to determine this,
H0 : The proportion of persons suffering head injuries among the population of individuals
wearing safety helmets at the time of the accident is equal to the proportion of persons
sustaining head injuries among those not wearing helmets.
H1: The proportions of persons suffering head injuries are not identical in the two populations.
H0 : phead Injury − Yes = phead Injury − No against H1 : phead Injury − Yes phead Injury − No for
wearing helmuts (Yes or No)
Answer:
Thus, for the four categories in the original table, the expected counts are
Table 1.5 Expected frequencies of 793 individuals who were involved in bicycle accidents during a
specified one-year period.
Wearing Helmet
Head Injury Yes No Total
Yes 43.6 191.4 235.0
No 103.4 454.6 558.0
Total 147.0 646.0 793.0
20
2
Test statistics is obs = 28.32, critical value is 1 − 0.05,1 = 3.84 , reject H0 and conclude that the
2
proportions of persons suffering head injuries are not identical in the two populations.
Question 2. Consider the following data, taken from a study that investigates the accuracy of death
certificates. In two different hospitals, the results of 575 autopsies were compared to the causes of death
listed on the certificates. One of the hospitals that participated in the study was a community hospital,
labeled A; the other was a university hospital, labelled B. The data are displayed in the form of a 2 X 3
contingency table 1.6.
Table 1.6 Observed frequencies of 575 autopsies were compared to the causes of death listed on the
certificates. One of the hospitals that participated in the study was a community hospital, labeled A; the
other was a university hospital, labelled B.
Death Certificate Status
Confirmed Inaccurate Incorrect
Hospital Accurate No Change Recording Total
A 157 18 54 229
B 268 44 34 346
Total 425 62 88 575
Of the 575 death certificates considered, 425 were confirmed to be accurate, 62 either lacked information
or contained inaccuracies but did not require recoiling of the underlying cause of death, and 88 were
incorrect and required recoding. We would like to determine whether the results of the study suggest
different practices in completing death certificates at the two hospitals. Apply the chi-square
goodness-of-fit test to do this, we test the hypothesis,
Answer:
Thus, for the four categories in the original table, the expected counts are
Table 1.7 Expected frequencies of 575 autopsies were compared to the causes of death listed on the
certificates. One of the hospitals that participated in the study was a community hospital, labeled A; the
other was a university hospital, labelled B.
2
Test statistics is obs = 21.62, critical value is
2
1 − 0.05,(2 − 1)(3 − 1) = 5.99 , reject H0 and conclude that the
proportions proportions are not the same.
21
LEARNING UNIT 2
HYPOTHESIS TESTING: POOLED
PROPORTIONS Z-TEST
2.1 Synopsis
Perhaps the most common problem involving categorical data is the comparison of two proportions. In
this type of problem we have two independent samples of binary data (n1, x1) and (n2, x2) where the n’s
are adequately large sample sizes that may or may not be equal. The x’s are the numbers of “positive”
outcomes in the two samples, and we consider the null hypothesis.
Hypothesis Test:
H0 : p1 = p2
H1 : p1 p2 or H1 : p1 p2 or H1 : p1 p2
pˆ1 − pˆ 2 pˆ1 − pˆ 2
Zobs = = ~ N( 0,1 )
pˆ (1 − pˆ ) pˆ (1 − pˆ ) 1 1
+ pˆ (1 − pˆ ) +
n1 n2 n1 n2
where
x1 x2 x1 + x 2
p̂1 = , p̂2 = and p̂ =
n1 n2 n1 + n2
Rrejection region based on H1, compare test statistic with critical values
The approximate 100 (1 − ) % confidence interval on the difference in the true proportions p1 − p2
is
This confidence interval is valid whenever n1pˆ1 , n1 (1 − pˆ1 ), n2pˆ 2 , n2 (1 − pˆ 2 ) are at least 5.
a) A study was conducted to see whether an important public health intervention would significantly
reduce the smoking rate among men. Of n1 = 100 males sampled in 1965 at the time of the release
of the Surgeon General’s report on the health consequences of smoking, x1 = 51 were found to be
smokers. In 1980 a second random sample of n2 = 100 males, similarly gathered, indicated that x2 =
43 were smokers. We will test H1 : p2 < p1 , thus H1 : p2 - p1 < 0, by using the pooled proportions z-
test.
b) An approximate 99% confidence interval on the difference in the true proportions p1 − p2 is also
required.
Table 2.1 Frequency of Males Smokers and Non-smokers Fale in 1965 and 1980
Smokers
Year Yes No Total
1965 51 49 100
1980 43 57 100
Total 94 106
23
Solution
Let p1 be the true proportion of men smoking in 1965 and let p2 be the true proportion of men smoking in
1980.
H0 : p2 = p1
H1 : p1 p2
51 + 43
p̂ =
100 + 100
= 0.47
then
0.51 − 0.43
Z obs =
( 0.47)( 0.53) 100
1
+
1
100
= 1.13
Critical value: z1 −
z1 − = z0.95 = 1.645
1.13 1.645
We fail to reject H0. It can be seen that the rate observed was reduced from 51 to 43%, but the reduction
is not statistically significant at the 0.05 level.
The approximate 99% confidence interval on the difference in the true proportions p1 − p2 is
Then
1− = 0.99 , = 0.01
z = z0.995 = 2.575
1−
2
Then
We have a 99% confidence that the difference between the two true proprtions is
−0.10 (p1 − p2 ) 0.26
25
TUTORIAL 2
LEARNING UNIT 2
Question 1. An investigation was made into fatal poisonings of children by two drugs which were among
the leading causes of such deaths. In each case, an inquiry was made as to how the child had received the
fatal overdose. Results are shown in Table 2.2. We have the proportions of cases for which the child is
responsible:
Table 2.2
Overdose Drug A Drug B
Yes 8 12
No 31 19
suggesting that they are not the same and that a child seems more prone to taking drug B than drug A.
Use the pooled proprtions z-test to detemine if the true proportion is larger for a child taking drug B than
drug A. Use a 0.05 level of significance.
Answer: Let p1 be the true proportion of a child taking drug A and let p2 be the true proportion of child
8
taking drug B. Hypothesis: H0 : p1 = p2 against H1 : p1 p2 , Test statistic: p̂1 = = 0.205 ,
8 + 31
12 8 + 12 2
p̂2 = = 0.387 and p̂ = = = 0.2857 ,
12 + 19 8 + 31 + 12 + 19 7
8 12
−
Z obs = 39 31 = −1.67 , critical value: −z1 − = −z1 − 0.05 = −1.645
2 2 2 2
1 − 1 −
7 7 7 7
+
39 31
Rejection and conclusion: we will reject Ho if Z obs −z1 − , because Zobs = −1.67 −1.645 we will
reject Ho and conclude that the true proporsion of a child taking taking drug B is larger than the true
proporsion of a child taking drug A.
Question 2. The role of smoking in the etiology of pancreatitis has been recognized for many years. To
provide estimates of the quantitative significance of these factors, a hospitalbased study was carried out in
eastern Massachusetts and Rhode Island between 1975 and 1979. Ninety‐eight patients who had a hospital
discharge diagnosis of pancreatitis were included in this unmatched case–control study. The control group
consisted of 451 patients admitted for diseases other than those of the pancreas and biliary tract. Risk factor
information was obtained from a standardized interview with each subject, conducted by a trained
interviewer. Some data for the males are shown in Table 2.3. With currently smoking being the exposure,
we have for the cases,
Table 2.3
Use of cigarettes Cases Controls
Currently smokers 38 18
Never or ex-smokers 15 136
Use the pooled proprtions z-test to detemine if the true proportion of smokers among the cases was
higher than for the controls. Use a 0.05 level of significance.
26
Answer: Let p1 be the true proportion of a smokers among the cases and let p2 be the true proportion of
38
smokers among the controls. Hypothesis: H0 : p1 = p2 against H1 : p1 p2 , Test statistic: p̂1 = ,
53
18 38 + 18 56
p̂2 = and p̂ = = ,
154 53 + 154 207
38 18
−
Z obs = 53 154
56 56 56 56
1− 1−
207 207 207 207
+
53 154
= 8.48
Rejection and conclusion: we will reject Ho if Z obs z1 − , because Z obs = 8.48 1.645 we will reject
Ho and conclude that the true proporsion of a smokers among cases was higher than that for the controls.
27
LEARNING UNIT 3
HYPOTHESIS TESTING: FISHER’S EXACT
TEST
However, we can also conduct a test of hypothesis comparing two proportions using an alternative
technique that allows us to compute the exact probability of the occurrence of the observed frequencies in
the contingency table, given that there is no association between the row and column classifications and that
the marginal totals remain fixed. This technique, known as Fisher's exact test, is especially useful when the
sample size is small. Note that when the expected units of at least one cell is <5 when the data are analyzed
in the form of a 2 x 2 contingency table, use Fisher’s exact test.
3.1 Synopsis
Table 3.1 General Contingency Table Including Observed units and Mariginal Totals
Variable 2
Variable 1 Yes No Total
Yes a b a+b
No c d c+d
Total a+c b+d n
➢ Exact probability of observing a Table with Cells a, b, c, d using the Hypergeometric Distribution
( a + b )! ( c + d)! ( a + c )! ( d + b )! 1
Pr ( a,b,c,d) =
a! d! c! b! n!
The formula is easy to remember because the numerator is the product of the factorials of each of
the row and column margins, and the denominator is the product of the factorial of the grand total
and the factorials of the individual cells.
➢ Procedures of using Fisher’s Exact hypothesis testing for diffrences in Two Proportions.
28
Alternative
hypothesis (H1) Reject H0 if p-value is less than
a
p1 p2
p-value =
Pr( i) Pr( a)
Pr ( i)
• This test may be used if any of the four expected values is less than 5.
• Rearrange the rows and columns of the observed table so the smaller row total is in the
first row and the smaller column total is in the first column.
Suppose that after the rearrangement, the cells in the observed table are a, b, c, d, as shown in
Table 3.1.
• Start with the table with 0 in the (1, 1) cell. The other cells in this table are then
determined from the row and column margins. Indeed, to maintain the same row and
column margins as the observed table, the (1, 2) element must be a + b, the (2, 1) cell
must be a + c, and the (2, 2) element must be (c + d) − (a + c) = d − a.
• Construct the next table by increasing the (1, 1) cell by 1 (i.e., from 0 to 1) decreasing the
(1, 2) and (2, 1) cells by 1, and increasing the (2, 2) cell by 1.
• Continue increasing and decreasing the cells by 1, as in step 3, until one of the cells is 0, at
which point all possible tables with the given row and column margins have been
enumerated. Each table in the sequence of tables is referred to by its (1, 1) element. Thus,
the first table is the “
• “0” table, the next table is the “1” table, and so on.
29
Question Cardiovascular Disease: Suppose a retrospective study is done among men ages 50−54 in a specific
county who died over a 1-month period. The investigators try to include approximately an equal number of
men who died from CVD (the cases) and men who died from other causes (the controls). Of 35 people who
died from CVD, 5 were on a high-salt diet before they died, whereas of 25 people who died from other
causes 2 were on such a diet. These data, presented in the following table, are in the form of a 2 × 2
contingency table.
Table 3.2 Data Concerning the Possible Association between Cause of Death and High Salt
Intake
Type of Diet
Cause of Death High Salt Low Salt Total
Non-CVD 2 23 25
CVD 5 30 35
Total 7 53 60
a) proportions in high salt diet is less than the proportions of low salt diet;
b) proportions in high salt diet is more than the proportions of low salt diet;
c) proportions of high salt diet and low salt diet are different;
Solution
If we inspect the expected units in the 2x2 table above, we see that at least one of these expected values
are less than 5. Thus the Chi-sqaure test will not be applicable but rather the Fisher’s Exact test.
E11 =
( 7 )(25) = 2.92 5
60
E21 =
( 7)( 35) = 4.08 5
60
The observed table has a = 2, b = 23, c = 5, d = 30. The rows or columns do not need to be rearranged
because the first row total is smaller than the second row total, and the first column total is smaller than
the second column total. Start with the 0 table, which has 0 in the (1, 1) cell, 25 in the (1, 2) cell, 7 in the
(2, 1) cell, and 30 − 2, or 28, in the (2, 2) cell. The next table then has 1 in the (1, 1) cell, 25 − 1 = 24 in the
(1, 2) cell, 7 − 1 = 6 in the (2, 1) cell, and 28 + 1 = 29 in the (2, 2) cell. Continue in this fashion until the 7
table is reached, which has 0 in the (2, 1) cell, at which point all possible tables with the given row and
column margins have been enumerated.
30
Table 3.3 Enumeration of all possible tables with fixed margins and their associated probabilities,
based on the hypergeometric distribution
a) Hypothesis
H0 : p1 = p2
H1 : p1 p2
p-value:
First calculate and add all exact probabilities from Table 3.3.1 to Table 3.3.3 to abtain the p-value
Pr ( 0 ) + Pr (1) + ... + Pr ( a) = Pr ( 0 ) + Pr (1 ) + Pr (2 ) = 0.017 + 0.105 + 0.252 = 0.375
Then because the p-value = 0.375 ≮ 0.05, we fail to reject H0 we conclude that p1 p2 .
b) Hypothesis:
H0 : p1 = p2
H1 : p1 p2
p-value:
Secondly calculate and add all exact probabilities from Table 3.3.3 to Table 3.3.8 to abtain the
p-value
Pr ( a) + Pr ( a + 1) + ... + Pr (k ) = Pr (2 ) + Pr ( 3 ) + ... + Pr ( 7 )
= 0.252 + 0.312 + 0.214 + 0.082 + 0.016 + 0.001
= 0.878
Then because the p-value = 0.878 ≮ 0.05, we fail to reject H0 we conclude that p1 p2 .
c) Hypothesis:
H0 : p1 = p2
H1 : p1 p2
31
p-value:
In Table 3.3, all the probabilities in table 3.3.1 to table 3.3.8 must be added with the exact
probability of to abtain the p-value
All the exact probabilities are added. The p-value = 0.688 ≮ 0.05, we fail to reject H0 we conclude
that p1 p2 . There is no strong evidence to support the claim that the proportions in the type
of diet caterories (high salt, low salt) are the same for causes of death (non-cvd, cvd).
32
TUTORIAL 3
LEARNING UNIT 3
Question 3.1 A new adenosine-releasing agent (ARA), thought to reduce side effects in patients undergoing coronary
artery bypass surgery (CABG), was studied in a pilot trial that enrolled 35 patients who received active medication and
20 patients who received a placebo. Follow-up observation revealed that 2 patients who received active medication
and 5 patients who received the placebo had shown symptoms of congestive heart failure (CHF) within 90 days post
surgery. Is this evidence of a reduced rate of CHF for patients treated with the ARA compound?. Let p1 and p2 represent
the CHF rates for the active-medication and placebo respectively. Use Fisher’s Test with α = 0.05. For p-value round-
up all values to 4 decimal values.
Table 3.5 CHF Frequency Summary from which we will be working from
Variable 2
Variable 1 Active Group Placebo Total
Yes (Xi) 2 5 7
No (ni – Xi) 33 15 48
Total 35 20 55
First reconstruct the table so that smallest data value is in 1 st row and first column, then arrange
Table so that smallest row and column becomes smallest column total. Thus
Pr ( Table3.5.3 ) =
( 35!)(20!)( 48!)( 7!)
( 55!)(2!)( 5!)( 33!)(15!)
35! 20! 48! 7! 1!
=
55! 2! 5! 33! 15!
= 0.045458
Answer: (a) Hypothesis Test, H0 : p1 = p2 versus H0 : p1 p2 . p-value = 0.0004 + 0.0067 + 0.0455 = 0.0526.
Rejection and conclusion, because p=value = 0.0526 ≮ 0.05 we fail to reject H0 and conclude that there is no
evidence of a reduced rate of CHF for patients treated with the ARA compound.
33
LEARNING UNIT 4
HYPOTHESIS TESTING: MCNEMAR’S TEST
• McNemar’s Test
Learning outcome:
After completion of this section you should be able to:
✓ Apply the hypothesis test with McNemar’s Test.
4.1 Definition
If the variables under study is not continuous but is instead classified into categories, which may of
may not be ordered, then different methods of inference should be used. When we conduct a test
of hypothesis comparing two proportions when the sample size n is large one preferably will choose
the McNemar's test.
4.2 Synopsis
McNemar's test is a special case of comparing two binomial proportions when using paired samples.
McNemar's test is often used in a clinical trials application when dichotomous (devided into 2 branches)
outcomes are recorded for each patient under two different conditions. The conditions might represent
different treatments, different measurement times, different body locations, etc. The pair of
measurements might also come from two different individuals who are matched based on some
characteristic in common. Such matched pairs are usually established using a random pairing of patients
who have a common characteristic such as age, or as a natural pairing such as two identical twins. The goal
is to compare response rates under the two sets of conditions or matched observations. In these cases, the
assumption of independent groups is not met, so you cannot use the chi-square test or Fisher's exact test.
Typical examples where McNemar's test might be applicable include testing for a shift in the proportion of
abnormal responses from before treatment to after treatment in the same group of patients.
Let p1 represent the probability that the first observation of the pair is a ‘response’, and p 2 the probability
that the second observation is a ‘response’. The hypothesis of interest is the equality of the response
proportions, p1 and p2. The test statistic is based on the difference in the discordant cell frequencies (b and
c) as shown in the test summary below. This statistic has an approximate chi-square distribution when H0
is true.
Test statistic: 2
=
(b − c)
2
obs
b + c
2
Critical value: 1− , 1 where α is the significance level and for a 2x2 continengy table one will have 1
degree of freedom.
2 2
Rejection region and conclusion: reject Ho if obs 1− , 1
(b − c) 1
z1 − b + c −
(b − c ) 2
n n n
Question. Eighty-six patients were treated with an experimental drug for 3 months. Pre and post-study
clinical laboratory results showed abnormally high total bilirubin values (above the upper limit of the normal
range) as indicated in Table 4.2.
a) Is there evidence of a change in the pre- to post-treatment rates of abnormalities? Use McNemar’s
test with a 0.01 level of significance.
b) Calculaute the 99% confidence interval for pre- to post-treatment rates of abnormalities use
McNemar.
Let p1 and p2 represent the proportions of patients who have abnormally high bilirubin values (Y) before
and after treatment, respectively.
Solution
a)
H0 : p1 = p2
H1 : p1 p2
2 2 2
1 − ,1 = 1 − 0.01,1 = 0.99,1 = 6.64
2 2
Rejection region and conclusion: We reject H0 if obs 1 − ,1
2 2
obs = 3.20 1 − ,1 = 6.64
We fail to reject H0. There is insufficient evidence that a shift in abnormality rates occurs with treatment.
(14 − 6) 1
2.33 14 + 6 −
(14 − 6 ) 2
86 86 86
−0.0259 p1 − p2 0.2119
36
TUTORIAL 4
LEARNING UNIT 4
Question 4.1. Consider the following information taken from a study that investigates heart attack (acute
myocardial infarctio, MI) among Navajos residing in the United States. In the study, 144 victims of acute
myocardial infarction were age- and gender-matched with 144 individuals free of heart disease. The
members of each pair were then asked whether they had ever been diagnosed with diabetes. The results
are presented below
Table 4.3 Navajos residing in the United States with acute myocardial infarctio, MI
No MI
MI Diabetes No Diabetes Total
Diabetes 9 37 46
No Diabetes 16 82 98
Total 25 119 144
Of the 46 Navajos who had experienced acute myocardial infarction and who were diabetic, 9 were matched
with individuals who had diabetes and 37 with individuals who did not. Of the 98 infarction victims who did
not suffer from diabetes, 16 were paired with diabetics and 82 were not. Use Mcnermar to test if there is
an association between diabetes and the occurrence of acute myocardial infarction. We conduct this test at
the a = 0.05 level of significance.
2
Answer: (a) Hypothesis Test, H0 : p1 = p2 versus H0 : p1 p2 . Test Staistic: obs = 8.3208 .
2 2
Critical value: 1 − ,1 = 1 − 0.05,1 = 3.84 . Rejection and conclusion, because
2 2
obs = 8.3208 1 − ,1 = 3.84 we will reject H0 and conclude that there is a difference between
individuals who experience an infarction and those who do not, victims of acute myocardial infarction are
more likely to suffer from diabetes than the individuals free from heart disease who have been matched
on age and gender.
37
LEARNING UNIT 5
HYPOTHESIS TESTING: COCHRAN-
MANTEL-HAENSZEL TEST
• Cochran-Mantel-Haenszel Test
Learning outcome:
After completion of this section you should be able to:
✓ Apply the hypothesis test with Cochran-Mantel-Haenszel Test.
5.1 Definition
The Cochran-Mantel-Haenszel test is used in clinical trials to compare two binomial proportions from
independent populations based on stratified samples. This test provides a means of combining a number
of 2×2 tables when each is from a separate, independent data. The Cochran-Mantel-Haenszel test is often
used in the comparison of response rates between two treatment groups.
5.2 Synopsis
Assume there are k layers (k ≥ 2). Within layer j, there are nj patients (j = 1, 2, ..., k), randomly allocated to
one of two groups. In Group 1, there are nj, patients, Xj1 of whom are considered ‘responders’. Similarly,
Group 2 has nj2 patients with Xj2 ‘responders’, as shown in Table 5.1
Let p1 and p2 denote the overall response rates for Group 1 and Group 2, respectively. For layer j, compute
the quantities assuming that the normal approximation to the binomial distribution is applicable.
2
k
NUMj
=
2 j=1
Test statistic: obs k
DEN
j=1
j
where
NUMj =
( X j1 nj2 − X j2 nj1 )
nj
and
DENj =
( ) (
n j1 n j2 X j1 + X j2 n j − X j1 − X j2 )
(
n2j n j − 1 )
2
Critical value: 1 − ,1
2 2
Rejection and conclusion: We will reject Ho if obs 1 − ,1
Question. A multi-center study with 4 centers is testing an experimental treatment, Dermotel, used to
accelerate the healing of dermal foot ulcers in diabeticpatients. Sodium hyaluronate was used in a control
group. Patients who showed a decrease in ulcer size after 20 weeks treatment of at least 90% by surface
area measurements were considered ‘responders’. The numbers of responders in each group are shown
in Table 5.2 for each study center. Is there an overall difference in response rates between the Dermotel
and control groups? Use a level of significance of 0.05.
39
1 Dermotel 26 4 30
Control 18 11 29
Total 44 15 59
2 Dermotel 8 3 11
Control 7 5 12
Total 15 8 23
3 Dermotel 7 5 12
Control 4 6 10
Total 11 11 22
4 Dermotel 11 6 17
Control 9 5 14
Total 20 11 31
Solution
State the hypothsis:
H0 : p1 = p2
H1 : p1 p2
NUM1 =
( X11 n12 − X12 n11 )
n1
=
(26 29 − 18 30 )
59
= 3.6271
and
These quantities can be computed in a similar way for the other centers, and the results are shown in
Table 5.3
1 3.6271 2.8440
2 0.8261 1.3611
3 1.000 1.4286
4 0.0322 1.8162
2
k
NUMj
= k
2 j=1
obs
DENj
j=1
5.48552
=
7.45
= 4.039
2
Critical value: 1 − ,1
2 2 2
1 − ,1 = 1 − 0.05,1 = 0.95,1 = 3.84
2 2
Rejection region and conclusion: We reject H0 if obs 1 − ,1
2 2
obs = 4.039 1 − ,1 = 3.84
We will reject H0. Because 4.039 > 3.841, you reject H0 at a significance level of α = 0.05 and conclude that
there is a significant difference in response rates between the Dermotel treatment and the control.
41
TUTORIAL 5
LEARNING UNIT 5
Question 5.1. McDonald and Siebenaller (1989) surveyed allele frequencies at the Lap locus in the
mussel Mytilus trossulus on the Oregon coast. At four estuaries, we collected mussels from inside the
estuary and from a marine habitat outside the estuary. There were three common alleles and a couple of
rare alleles; based on previous results, the biologically interesting question was whether the Lap allele was
less common inside estuaries, so we pooled all the other alleles into a "non-94" class. There are three
nominal variables: allele (94 or non-94), habitat (marine or estuarine), and area (Tillamook, Yaquina, Alsea,
or Umpqua). The null hypothesis is that at each area, there is no difference in the proportion of Lap 94 alleles
between the marine and estuarine habitats. This table shows the number of 94 and non-94 alleles at each
location. There is a smaller proportion of 94 alleles in the estuarine location of each estuary when compared
with the marine location; we wanted to know whether this difference is significant by using the Cochran-
Mantel-Haenszel Test.
Table 5.4
Tillamook 94 56 69
Non-94 40 77
Yaquina 94 61 257
Non-94 57 301
Alsea 94 73 65
Non-94 71 79
Umpqua 94 71 48
Non-94 55 48
You can use an extended version of the Cochran-Mantel-Haenszel test with history of depression as a
stratification factor. The treatment group is a nominal factor with three levels (Flexisyl, Norbend, and
Placebo), and the pain improvement is an ordinal factor with four response levels (Worse, No Change,
Somewhat Improved, and Much Improved).
2
Answer: (a) Hypothesis Test, H0 : p1 = p2 versus H0 : p1 p2 . Test Staistic: obs = 5.321 .
2 2
Critical value: 1 − ,1 = 1 − 0.05,1 = 3.84 . Rejection and conclusion, because
2 2
obs = 5.321 1 − ,1 = 3.84 we will reject H0 and conclude that there is a significant difference
between the marine and estuarie for allele 94 and non-94.
42
LEARNING UNIT 6
HYPOTHESIS TESTING: THE WILCOXON
RANK-SUM TEST
6.1 Definition
The Wilcoxon rank-sum test is a non-parametric test. It is based on ranks of the data, and is used to
compare location parameters, such as the mean or median, between two independent populations
without the assumption of normally distributed data. Although the Wilcoxon rank-sum test was
developed for use with continuous numeric data, the test is also applied to the analysis of ordered
categorical data.
(H1, also known as the alternativehypothesis will depending on the what the research question is about).
Test statistic: rank sum = the sum of the ranks assigned to the n1 observations in the first sample
To test H0 : 1 − 2 = hypothesized value, subtract the hypothesized value from each observation in
the first sample and then determine the ranks of these when combined with the n 2 observations from
the second sample.
Solution
Rank sum = 1 + 2 + 3 + 4 + 5 + 7 + 11 = 33
Critical value: Table for the wilcoxon sum rank test where n1 = 7 and n2 = 8 for α = 0.01 is 36
Rejection and conclusion: Reject Ho if Rank sum ≤ critical value. Because 33 ≤ 36, we will reject the null
hypothesis and conclude that infants exposed to cigarette smoke do seem to have higher cotanine levels
than do unexposed infants.
Question. Reconsider the cotanine concentration data introduced in previous example. Suppose a
researcher wished to know whether average concentration for exposed children exceeds that for
unexposed children by more than 25. Recalling the that 1 is the true average concentration for
unexposed children, the exposed average exceeds the unexposed average by 25 when 1 − 2 = −25
and by more than 25 when 1 − 2 −25 or equivalently 2 − 1 25 or equivalently
2 25 + 1.
Unexposed (n1 = 7) +25 8+25=33 11+25=36 12+25=37 14+25=39 45 68 136
Rank 1 3 4 5 6 8 12
Exposed (n2 = 8) 35 56 83 92 128 150 176 208
Rank 6 7 9 10 11 13 14 15
44
Solution
State the hypothsis:
H0 : 1 − 2 = −25
H1 : 1 − 2 −25
Rank sum = 1 + 3 + 4 + 5 + 6 + 8 + 12 = 39
Critical value: Table for the wilcoxon sum rank test where n1 = 7 and n2 = 8 for α = 0.01 is 36
Rejection and conclusion: Reject Ho if Rank sum ≤ critical value. Because 39 ≰ 36, we will fail to reject
the null hypothesis and conclude that evidence does not suggest that the difference between mean
concentration levels exceeds 25.
The data are collected as two independent samples of size n1 and n2, denoted by y11, y12, ..., y1n1 and y21,
y22, ..., y2n2. The data are ranked, from lowest to highest, over the combined samples, and the test statistic
is based on the sum of ranks for the first group. Let r1j = rank of y1j (j = 1, 2, ..., n1) and r2j = rank of y2j (j =
1, 2, ..., n2), and compute
n1 n2
R1 = r
j=1
1j and R2 = r
j=1
2j
The hypothesis of equal means would be supported by similar average ranks between the two groups,
i.e., if R1/n1 is close to R2/n2. R1 is compared to a critical value.
R1 − R1 − 0.5
Test statistic: Z obs =
R1
where
N = n1 + n2
and
n1 (N + 1)
R1 =
2
45
If there are tied data values, the average rank is assigned to the corresponding rij values. Suppose there
are g groups of tied data values. For the kth group, compute ck = m(m2 – 1), where m is the number of
tied values for that group. You can make a small adjustment to the variance by using the correction factor
2 n1 n2 C
= N + 1 −
R1
12 N(N − 1 )
Critical value: z
1−
2
Question. In previous studies of the new anti-depressant, Seroxatene, researchers noticed that patients
with low back pain experienced a decrease in radicular pain after 6 to 8 weeks of daily treatment. A new
study was conducted in 28 patients to determine whether this phenomenon is a drug-related response
or coincidental. Patients with MRI-confirmed disk herniation and symptomatic leg pain were enrolled
and randomly assigned to receive Seroxatene or a placebo for 8 weeks. At the end of the study, patients
were asked to provide a global rating of their pain, relative to baseline, on a coded improvement scale as
follows:
Use the Wilcoxon Rank-Sum test with a significance level of α = 0.05 if there are evidence of a difference
between Seroxatene and placebo in global back pain evaluations.
Table 6.2
Seroxatene Group
Patient Number Score Patient Number Score
2 0 16 -1
3 2 17 2
5 3 20 -3
6 3 21 3
8 -2 22 3
10 1 24 0
12 3 26 2
14 3 27 -1
46
Placebo Group
Patient Number Score Patient Number Score
1 3 15 0
4 -1 18 -1
7 2 19 -3
9 3 23 -2
11 -2 25 1
13 1 28 0
Solution
State the hypothsis:
H0 : 1 = 2
H1 : 1 2
With n1 = 16, n2 = 12, and N = 28, the ranked values (r's) of the responses (y's) are shown in the following
tables.
Seroxatene Group
Patient Average Patient Average
Number Rank Number Rank
2 11.5 16 7.5
3 18.5 17 18.5
5 24.5 20 1.5
6 24.5 21 24.5
8 4 22 24.5
10 15 24 11.5
12 24.5 26 18.5
14 24.5 27 7.5
47
and
Placebo Group
Patient Average Patient Average
Number Rank Number Rank
1 24.5 15 11.5
4 7.5 18 7.5
7 18.5 19 1.5
9 24.5 23 4
11 4 25 15
13 15 28 11.5
Compute
n1
R1 = r
j=1
1j
n1
R1 = r
j=1
1j
16 ( 29 )
R1 = = 232
2
and
2
=
(16 )(12 ) 29 −
738
= 448.38
R1
12 28 ( 27 )
TUTORIAL 6
LEARNING UNIT 6
Question 1. The urinary fluoride concentration (ppm) was measured both for a sample of livestock that
had been grazing in an area previously exposed to fluoride pollution and for a similar sample that had
grazed in an unpolluted region. Does the data indicate strongly that the true average fluoride
concentration for livestock grazing in the polluted region is larger than for the unpolluted region?
Assume that the distributions of urinary fluoride concentration for both grazing areas have the same
shape and spread, and use a level 0.01 Wilcoxon rank sum test (Without Ties).
Answer:
Let 1 be popluation mean of Polluted group. Let 2 be popluation mean of Unpolluted group.
Hypothesis: H0 : 1 = 2 H1 : 1 2. Test statistic: Rank sum = sum of ranks assigned ranks for
sample 1
Rank sum = 2 + 3 + 7 + 8 + 10 + 11 + 12 = 53
Critical value: Wilcoxon rank sum table for n1 = 7, n2 = 5, α = 0.01, upper-tail, critical value = 60.
Rejection and conclusion: We will reject Ho if rank sum ≥ upper-tail critical value, but because
rank sum = 53 ≱ upper-tail critical value = 60 we will fail to reject Ho.
Question 2. Researchers have noted that chickens fed a diet that is lacking in sodium and calcium become
more active. To determine whether a sodium deficiency causes an increase in pecking activity, the authors
of the paper “An Increase in Activity of Domestic Fowls Produced by Nutritional Deficiency” (Animal
Behaviour (1973):10-17) observed 17 chickens who were deprived of sodium and 15 control chickens. They
counted the number of pecks for each bird during a fixed period of time. Does the data strongly indicate
that the mean number of pecks is higher for chickens whose diet lacks sufficient sodium? Use the Wilxocon
rank sum test with 0.05 (With Ties).
Let 1 be popluation mean of Sodium Deprived Group group. Let 2 be popluation mean of Control
Group.
49
and
Control Group
Chicken Pecking Chicken Pecking
Number Activity Number Activity
18 0 26 20
19 0 27 33
20 0 28 34
21 0 29 57
22 0 30 60
23 8 31 64
24 13 32 78
25 13
With n1 = 17, n2 = 15, and N = 32, the ranked values (r's) of the responses (y's) are shown in the following
tables.
and
Control Group
Chicken Pecking Chicken Pecking
Number Activity Number Activity
18 4.5 26 14
19 4.5 27 15
20 4.5 28 16
21 4.5 29 17
22 4.5 30 19
23 10 31 20
24 11.5 32 25
25 11.5
Compute
n1
R1 = r
j=1
1j = 346.5
n1
R2 = r
j=1
2j
= 181.5
n1 (N + 1) 17 ( 33)
R1 = = = 280.5
2 2
and
2
=
(n1)(n2 ) N + 1 − C
R1
12 N(N − 1 )
=
(17)(15) 32 + 1 − 516
12
32 ( 31)
= 690.1965726
Rejection region and conclusion: We reject H0 if Zobs z1 − . Because Zobs = 2.49 z1 − = 1.645 we
reject H0 and conclude that chickens that is deprived of sodium show a higher average pecking activity
52
LEARNING UNIT 7
HYPOTHESIS TESTING: TWO MEANS FOR
INDEPENDENT SAMPLES WITH KNOWN
VARIANCES
• The two means for independent samples with known variances
Learning outcome:
After completion of this section you should be able to:
• Apply the hypothesis test and confidence intervals for two means for independent samples with
known variances
7.1 Synopsis
If the sample sizes ( n1 and n2 30 ) (OR both populations are known to be normally distributed), the
samples are indepentent and the variances are known, the
Hypothesis Test:
H0 : 1 = 2
H1 : 1 2 or H1 : 1 2 or H1 : 1 2
(the alternative hypothesis, H1, will depend of the what the researcher wants to test)
x1 − x2 −
Zobs = 0
~ N( 0,1 ) when 2
1 and 2
2 are known
2 2
1 + 2
n1 n2
where 0 is the value of the difference between the population means specified under H0 .
2 2
( x1 − x2 ) z
1− n1
1
+ 2
n2
2
7.2 Example: Hypothesis test for 1 − 2 for independent samples with known σ’s
Question.
a) Researchers wish to know if the data they have collected provide sufficient evidence to indicate
a difference in mean serum uric acid levels between normal individuals and individuals
with Down’s syndrome. The data consist of serum uric acid readings on 12 individuals with
Down’s syndrome and 15 normal individuals. The means are x1 = 4.5 mg/100 for
normal individuals and x2 = 3.4 mg/100 for Down’s syndrome individuals. The data
constitute two independent simple random samples each drawn from a normal
distribution. Given that the population variance equal to 1 for the Down’s syndrome and
the population variance of 1.5 for the normal population.
b) Aslo determine the 95% confidence interval between the two means 1 − 2.
Solution
a)
H0 : 1 − 2 = 0
H1 : 1 − 2 0
54
Calculate the test statistic: Both groups of data are normally distributed, thus even though n1 and n2
are less than 30, the test statistics may still be calculated as
Z obs =
( 4.5 − 3.4 ) − 0
= 2.57
1 1.5
+
12 15
Critical value: z1 − /2
If the level of significance is not stated in the question, always assume that α = 0.05.
z1 − /2 = z0.975 = 1.96
We will reject H0 and conclude on the basis of this data there is an indication that the two population
means are not equal.
b)
The 95% confidence interval on the difference in the true means 1 − 2 is:
Then
1 − = 0.95 , = 0.05
z = z0.975 = 1.96
1−
2
2 2
( x1 − x2 ) z
1−
1
n1
+ 2
n2
2
Then
1 1.5
( 4.5 − 3.4 ) 1.96
12
+
15
We have a 95% confidence that the difference between the true averages 1 − 2 is
0.2608 1 − 2 1.9392
55
TUTORIAL 7
LEARNING UNIT 7
Question 1. Consider the hypothesis test H0 : 1 = 2 against H1 : 1 2 with known variances
1 = 10 and 2 = 5. Suppose that sample sizes n1 = 10 and n2 = 15 and that x1 = 24.5 and
x2 = 21.3 . Use = 0.01. Assume that both populations are normally ditributed.
Answer:
a) Zobs = 0.94, critical value is z = z0.995 = 2.575 , we will fail to reject H0 and conclude
1−
2
because Z obs = 0.94 2.575 . Thus 1 2.
b) The 99% confidence interval for 1 − 2 is:
−5.60 1 − 2 12
Because zero is included in the interval, thus no difference between 1 and 2.
Question 2. A study reported changes in diastolic blood pressure using the values at the end of a four-
week run-in period as the baseline and measured blood pressure after two and four weeks of treatment
on Ramipril (Walter, Forthofer, and Witte 1987).
a) Test the hypothesis that 1 , the mean diastolic blood pressure associated with the 1.25 mg dose
of Ramipril, is less than 2 , the mean mean diastolic blood pressure associated with the 5 mg dose
of Ramipril. The sample means are 10.6 ( x1 ) and 14.9 mmHg ( x2 ) for the 1.25 and 5 mg doses,
respectively, and n1 and n2 are both equal to 53. Both 1 and 2 are assumed to be 9 mmHg.
Use = 0.01.
b) Suppose we wish to construct a 95 percent confidence interval for the mean diastolic blood
pressure associated with the 1.25 mg dose Ramipril and the 5 mg dose of Ramipril. The 95
percent confidence interval for 1 − 2 is calculated as follows:
Answer:
a) Hypothesis: H0 : 1 − 2 = 0 against H0 : 1 − 2 0 . Let 1 = 1.25mg and let
1 = 5mg , Test statistic is Z obs = −2.46, critical value is −z1 − = −z0.99 = −2.33 , we will
reject H0 and because Zobs = −2.46 −2.33 . There appears to be a difference in the effects
of the two doses of Rampril with the higher dose being associated with the greater mean in
diastolic blood pressure at the 0.01 significance level.
b) The 95% confidence interval for 1 − 2 is:
−7.98 1 − 2 −0.62
The value 0 is not contained in the interval. Since the difference in the 5 mg Ramipril dose
associated with the mean diastolic blood presure compared with the 1.25 mg Ramipril dose is less
during the first two weeks of treatment.
56
LEARNING UNIT 8
HYPOTHESIS TESTING: TWO MEANS FOR
INDEPENDENT SAMPLES WITH
UNKNOWN BUT EQUAL VARIANCES
• The two means for independent samples with unknown, but equal variances
Learning outcome:
After completion of this section you should be able to:
• Apply the hypothesis test and confidence intervals for two means for independent samples with
unknown, but equal variances
Hypothesis test for 1 − 2 for independent samples with unknown, but equal σ’s
8.1 Synopsis
If the sample sizes ( n1 and n2 30 ) (OR both populations are known to be normally distributed), the
samples are indepentent and the variances are unknown but equal, the
Hypothesis Test:
H0 : 1 = 2
H1 : 1 2 or H1 : 1 2 or H1 : 1 2
(the alternative hypothesis, H1, will depend of the what the researcher wants to test)
x1 − x2 − 0
Tobs = ~ tn1 + n2 − 2
1 1
sp +
n1 n2
when
sp =
(n1 − 1) s12 + (n2 − 1) s22
n1 + n2 − 2
57
Is the pooled sample standard deviation and 0 is the value of the difference between the population
means specified under H0 . Again here we are making use of the fact that the t-distriution approximates
for normal distribution well for large sample sizes. Note again that if you wish to use this test for small
samples, then the data must be normally distributed.
( x1 − x2 ) t
1− ,n + n − 2
1 2
(sp ) 1
+
1
n1 n2
2
8.2 Example: Hypothesis test for 1 − 2 for independent samples with unknown, but equal σ’s
Question.
a) The purpose of a study was to investigate wheelchair maneuvering in individuals with lower-level
spinal cord injury (SCI) and healthy controls (C). Subjects used a modified wheelchair to
incorporate a rigid seat surface to facilitate the specified experimental measurements. Interface
pressure measurement was recorded by using a high-resolution pressure-sensitive mat with a
spatial resolution of four sensors per square centimeter taped on the rigid seat support. During
static sitting conditions, average pressures were recorded under the ischial tuberosities (the
bottom part of the pelvic bones). The data for measurements of the left ischial tuberosity (in mm
Hg) for the SCI and control groups are shown in Table 8.1 below. We wish to know if we may
conclude, on the basis of these data, that, in general, healthy subjects exhibit lower pressure
than SCI subjects. The data in the table below constitude two independent simple random
samples of pressure measurements, one sample from a population of control subjects and the
other sample from a poluation with lower-level spinal cord injury. We shall assume that the
pressure measurements in both populations are approximately normally distributed. The
population varianves are unknown but are assumed to be equal.
b) Determine the 95% confidence interval between the two means 1 − 2.
58
Table 8.1: Pressures (mm Hg) Under the Pelvis during Static Conditions for Example
Control 131 115 124 131 122 117 88 114 150 169
SCI 60 150 130 180 163 130 121 119 130 148
Solution
a)
State the hypothsis:
sp2 =
( 9 )(21.8 )2 + ( 9 )( 32.2 )
2
= 756.04
10 + 10 − 2
Now we compute
Tobs =
(126.1 − 133.1)
− 0
=
(126.1 − 133.1) − 0 = −0.57
756.04 756.04 1 1
+ 756.04 +
10 10 10 10
Critical value: −t1 − ,n1 + n2 − 2
If the level of significance is not stated in the question, always assume that α = 0.05. n1 + n2 - 2 = 18
We fail to reject H0 . On this basis of these data, we cannot conclude that the population mean pressure
is less for healthy subjects than for SCI subjects.
59
b)
The 95% confidence interval on the difference in the true means 1 − 2 is:
Then
1 − = 0.95 , = 0.05
( x1 − x2 ) t
1− ,n + n − 2
1
(sp )
2
1
+
1
n1 n2
2
Then
1 1
(126.1 − 133.1) 2.10 (27.4962 ) +
10 10
We have a 95% confidence that the difference between the true averages 1 − 2 is
−32.82 1 − 2 18.82
60
TUTORIAL 8
LEARNING UNIT 8
Question 8.1 A new compound, ABC-123, is being developed for long-term treatment of patients with
chronic asthma. Asthmatic patients were enrolled in a doubleblind study and randomized to receive daily
oral doses of ABC-123 or a placebo for 6 weeks. The primary measurement of interest is the resting FEV1
(forced expiratory volume during the first second of expiration), which is measured before and at the end
of the 6-week treatment period. Data (in liters) are shown in the table which follows. Does the mean
administration measures of ABC-123 appear to be different from the mean administration measures of of
placebo? Assume that the variances of the two groups are equal.
Answer: (a) Hypothesis Test, H0 : 1 = 2 versus H0 : 1 2 . Test statistic, Tobs = 0.97 , critical
value is t = t0.975,19 = 2.09 , Rejection and conclusion, because Tobs = 0.97 2.09 we
1 − ,n1 + n2 − 2
2
fail to reject H0 and conclude that the population administration average of ABC-123 is not different
from the population administration average of placebo.
61
LEARNING UNIT 9
HYPOTHESIS TESTING: TWO MEANS FOR
INDEPENDENT SAMPLES WITH UNKNOWN
BUT NOT ASSUMED EQUAL VARIANCES
• The two means for independent samples with unknown but not assumed equal variances
Learning outcome:
After completion of this section you should be able to:
• Apply the hypothesis test and confidence intervals for two means for independent samples with
unknown but not assumed equal variances
Hypothesis test for 1 − 2 for independent samples with unknown, and not assumed equal σ’s
9.1 Synopsis
If the sample sizes ( n1 and n2 30 ) (OR both populations are known to be normally distributed), the
samples are indepentent and the variances are unknown and unequal, the
Hypothesis Test:
H0 : 1 = 2
H1 : 1 2 or H1 : 1 2 or H1 : 1 2
(The alternative hypothesis will be one of the above depending of the what the researcher wants to test)
x1 − x2 −
Tobs = 0
~ tdf when 2
and 2
are unknown and not assume equal
s12 s2 1 2
+ 2
n1 n2
2
s12 s22
+
df = n1 n2
2 2
s12 s22
n1 + n2
(n1 − 1) (n2 − 1)
If df is not an integer value then round down to the nearest integer.
s12 s22
( x1 − x2 ) t
1 − ,df
+
n1 n2
2
9.2 Example: Hypothesis test for 1 − 2 for independent samples with unknown, and unequal σ’s
Question. Lee (1980) presented survival times in years from diagnosis for 71 patients with either acute
myeloblastic leukemia (AML) or acute lymphoblastic leukemia (ALL).
AML patients:
18 31 36 9 20 45 12 1 24 33
31 31 1 39 4 36 8 15 2 29
7 0 1 2 12 9 1 1 9 5
27 1 13 1 5 1 3 4 1 18
1 2 1 8 3 4 14 3 13 13
1
63
ALL patients:
16 1 12 74 16 21 64 1 3 1
25 22 12 1 9 9 35 7 1 22
a) We now want to examine whether there is a significant difference between the mean age of the
AML and All patients. Suppose we wil consider that there is a significant difference in the population
mean ages if the mean age of ALL patients minus the mean age of AML patients is larger than 5
years. Use a 0.05 level of significance. Assume that both populations are known to be normally
distributed, both population variances are not equal and both are unknown.
Solution
a)
H0 : 1 − 2 = 5
H1 : 1 − 2 5
x1 − x2 −
Tobs = 0
s12 s22
+
n1 n2
=
(17.60− 11.94 ) − 5
403.20 156.34
+
20 51
= 2.21
The degrees of freedom is
2
s12 s22
+
df = n1 n2
2 2
s12 s22
+ n2
n 1
(n1 − 1) (n2 − 1)
2
403.20 + 156.34
20 51
= 2 2
403.20 156.34
20
+ 51
(19 ) ( 50 )
= 24
64
We fail to reject H0. There is not sufficient evidence to conclude that the differences in ages is greater
than 5 years.
b)
The 98% confidence interval on the difference in the true means 1 − 2 is:
Then
1 − = 0.98 , = 0.02
t = t0.99,24 = 2.49.
1− ,df
2
s12 s22
( x1 − x2 ) t
1 − ,df
+
n1 n2
2
Then
403.20 156.34
(17.6 − 11.94 ) 2.49
20
+
51
We have a 98% confidence that the difference between the true averages 1 − 2 is
−6.34 1 − 2 17.66
65
9.3 Example
Question.
a) Suppose that we are interested in investigating the effects of an antihypertensive drug treatment on
persons over the age of 60 who suffer from isolated systolic hypertension. By definition, individuals with
this condition have a systolic blood pressure greater than 160 mm Hg while their diastolic blood pressure
is below 90 mm Hg. Before the beginning of the study, subjects who had been randomly selected to take
the active drug and those chosen to receive a placebo were comparable with respect to systolic blood
pressure. After one year of participating in the study, the mean systolic blood pressure for patients
receiving the drug is denoted by 1 and the mean for those receiving the placebo by 2 . Assume that
both groups are normally distributed. The standard deviations of the two populations are unknown, and
we do not feel justified in assuming that they are equal. Since we would like to determine whether the
mean systolic blood pressures of the patients in these two different groups remain the same, we test
the null hypothesis. Given below is the data collected for this study.
Table for after one year of the mean systolic blood pressure for randomly selected patients receiving the
drug is denoted in sample 1 and the mean for those receiving the placebo in sample 2.
Sample 1 Sample 2
x1 = 142.5 x2 = 156.5
s1 = 15.7 s2 = 17.3
n1 = 2308 n2 = 2293
Solution
State the hypothsis:
H0 : 1 = 2 versus H1 : 1 2
Critical value: t
1 − ,df
2
If the level of significance is not stated in the question, always assume that α = 0.05.
We will reject H0. There is therefore a significant difference between the true averages of these two
groups.
Question.
b) Determine the 95% confidence interval between the two means 1 − 2.
Solution
The 95% confidence interval for the difference between the true population means is
s12 s2 s12 s2
( x1 − x2 ) − t1 − ,df
+ 2
n1 n2
( 1 − 2 ) ( x1 − x2 ) + t
1 − ,df
+ 2
n1 n2
2 2
(15.7)2 (17.3)2
(142.5 − 156.5) 1.96 2308
+
2293
( −15.0, −13.0 )
covers 1 − 2 , the true difference in mean systolic blood pressure for the two populations. Note the
interval does not contain the value 0, and therefore is consistent with the results of the hypothesis test.
67
TUTORIAL 9
LEARNING UNIT 9
Question 9.1 Arsenic concentration in public drinking water supplies is a potential health risk. An article in
the Arizona Republick (May 27, 2001) reported drinking water arsenic concentrations in parts per billion
(ppb) for 10 metropolitan Phoenix communities and 10 communities in rural Arizona. The data follows:
Table 9.1
Metro Phoenix Rural Arizona
(x1 = 12.5, s1 = 7.63) (x1 = 27.5, s1 = 15.3)
Phoenix, 3 Rimrock, 48
Chandler, 7 Goodyear, 44
Gilbert, 25 New River, 40
Glendale, 10 Apache Junction, 38
Mesa, 15 Buckeye, 33
Paradise Valley, 6 Nogales, 21
Peoria, 12 Black Canyon City, 20
Scottsdale, 25 Sedona, 12
Tempe, 15 Payson, 1
Sun City, 7 Casa Grande, 18
Answer:
a) Hypothesis Test, H0 : 1 = 2 versus H0 : 1 2 . Test statistic, Tobs = −2.77 , critical value
is t = t0.975,13 = 2.16 , where df = 13. Rejection and conclusion, because
1 − ,df
2
Tobs = −2.77 = 2.77 2.16 we will reject H0 and conclude that there is strong evidence to
conclude that mean arsenic concentration in drinking water in rural Arizona is different from the
mean arcenic concentration in metropolitan Phoenix drinking water.
b) The 95% confidence interval between 1 − 2 is (-26.71, -3.29). Because zero is not included in
this interval we conclude that 2 1.
68
LEARNING UNIT 10
HYPOTHESIS TESTING: TWO MEANS FOR
DEPENDENT AND EQUAL SAMPLES
Learning outcome:
After completion of this section you should be able to:
• Apply the hypothesis test and confidence intervals for two means for dependent and equal samples
10.1 Synopsis
If the sample sizes ( n1 = n2 30 ) (OR both populations are known to be normally distributed), the
samples are dependant, the
Hypothesis Test:
H0 : 1 = 2
H1 : 1 2 or H1 : 1 2 or H1 : 1 2
0
x −
Tobs = d d
~ tn − 1
sd
n
Where xd and s d are the sample mean and standard deviation of the differences and d0 is the value
of the population mean differences specified under H0 . Note that when comparing the population
means for dependent samples the data sizes for the two groups must be the same such that n 1 = n2 = n.
69
Rejection region based on H1, compare test statistic with critical values
0
d d Tobs −t1 − ,n − 1 one-tailed test
0
d d Tobs t1 − ,n− 1 one-tailed test
0
d d Tobs t1 − / 2,n− 1 two-tailed test
sd
xd t
1 − ,n− 1 n
2
10.2 Example: Hypothesis test and confidence interval for 1 − 2 for dependent and equal samples
Question.
a) Trace metals in drinking water affect the flavor of the water, and unusually high concentrations can
pose a health hazard. The paper “Trace Metals of South Indian Rivers” (Environ. Studies (1982):62-
66) reportedtrace trace-metal concentrtions for both surface water and bottom watre at six
different river locations. Data on zinc concentration (mg/L) is given here.
Determine whether mean zinc concentration in bottom water exceeds that for top water. Use a
5% level of significance. Assume both populations means tested are normally distributed.
Solution
a)
And let
differences = 0.550
(differences ) = 0.068832 2
Then
xd =
differences
=
0.550
= 0.0917
n 6
(differences ) 2
−
(differences ) 2
s2d = n
n−1
0.068832 −
( 0.550 )2
= 6
5
= 0.00368
xd − 0 0.0917
Tobs = = = 3.68
sd 0.061
n 6
We reject H0. The data suggests that mean zinc concentration for bottom water is higher than for top
Water.
b) The 95% confidence interval on the difference in the true means 1 − 2 is:
Then
1 − = 0.95 , = 0.05
t = t0.975,5 = 2.57
1− ,n − 1
2
0.061
0.0917 2.57
6
0.0277 1 − 2 0.1557
72
TUTORIAL 10
LEARNING UNIT 10
Question 10.1 John M. Morton et al. (A-14) examined gallbladder function before and after fundoplication-
a surgery used to stop stomach contents from flowing back into the esophagus (reflux)-in patients with
gastroesophageal reflux disease. The authors measured gallbladder functionality by calculating the
gallbladder ejection fraction (GBEF) before and after fundoplication. The goal of fundoplication is to increase
GBEF, which is measured as a percent. The data are shown in Table 10.1.
a) We wish to know if these data provide sufficient evidence to allow us to conclude that
fundoplication increases GBEF functioning. The data consist of the GBEF for 12 individuals, before
and after fundoplication. We shall perform the statistical analysis on the differences in preop and
postop GBEF. We may obtain the differences in one of two ways: by subtracting the preop percents
from the postop percents or by subtracting the postop percents from the preop percents.
b) Calculate the 95% confidence interval for d.
Table 10.1 Gallbladder Function in Patients with Presentations of Gastroesophageal Reflux Disease
Before and After Treatment
Preop (%) 22 63.3 96 9.2 3.1 50 33 69 64 18.8 0 34
Postop
63.5 91.5 59 37.8 10.1 19.6 41 87.8 86 55 88 40
(%)
Answer:
a) Hypothesis Test, H0 : d = 0 versus H0 : d 0 , where
differencesi = di = postop − preop . Test statistic, Tobs = 1.92 , critical value is
t1 − ,df = t0.95,11 = 1.796 . Rejection and conclusion, because Tobs = 1.92 > 1.796 we will
reject H0 and conclude that the population mean for postop is significantly larger than the
population mean for preop.
a) Alternatively but equivalently one can also state: Hypothesis Test, H0 : d = 0 versus
H0 : d 0 , where differencesi = di = preop − postop . Test statistic, Tobs = −1.92 ,
critical value is −t1 − ,df = −t0.95,11 = −1.796 . Rejection and conclusion, because
Tobs = −1.92 < −1.796 we will reject H0 and conclude that the population mean for postop is
significantly larger than the population mean for preop.