You are on page 1of 73

Nm

FACULTY OF ENGINEERING AND INFORMATION TECHNOLOGY


DEPARTMENT:
MATHEMATICAL AND PHYSICAL SCIENCE

MODULE NAME: BIOSTATISTICS AND INTRODUCTION TO


RESEARCH

MODULE CODE:
BR21EH

NQF LEVEL:
CREDITS: 12

COMPILED BY: ROELF SYPKENS

DATE REVISED: 2024

LEARNER GUIDE
2

TABLE OF CONTENTS

ORGANISATIONAL COMPONENT

1. LEARNING COMPONENT 3

2. INTRODUCTION 4

3. MISSION STATEMENT 4

4. OUTCOMES OF THE PROGRAMME 4

5. PURPOSE STATEMENT 4

6. PROGRAMME OVERVIEW 4

7. CRITICAL CROSS-FIELD OUTCOMES 5

8. OBJECTIVE OF THE SUBJECT 5

9. PURPOSE OF THIS LEARNING GUIDE 5

10. SUBJECT INFORMATION 6

11. PRESCRIBED BOOK 6

12. BOOKS FOR REFERENCE PURPOSES 6

13. e-THUTO/BLACK BOARD 6

14. CALCULATOR 6

15. LECTURER INFORMATION 7

16. CLASS ATTENDANCE 7

17. SYLLABUS AN WORKSCHEME 8

18. ASSESSMENT 10

19. GUIDELINES FOR IMPROVIN PERFORMANCE IN THE MODULE 12

20. EXIT LEVEL OUTCOMES (GRADUATE ATTRIBUTES) 13

21. POPULAR MATHEMATICS EXPRESSIONS TRANSLATED 14


3

LEARNING COMPONENT

1. LEARNING UNITS

LEARNING UNIT 1 : Chi-Square Test 16

LEARNING UNIT 2 : Pooled Proportions z-Test 21

LEARNING UNIT 3 : Fisher’s Exact Test 27

LEARNING UNIT 4 : McNemar’s Test 33

LEARNING UNIT 5 : Cochran-Mantel-Haenszel Test 39

LEARNING UNIT 6 : The Wilcoxon Rank-Sum Test 42

LEARNING UNIT 7 : Two Means for independent samples with known Variances 52

LEARNING UNIT 8 : Two Means for independent samples with unknown


but equal Variances 56

LEARNING UNIT 9 : Two Means for independent samples with unknown


but not assumed equal Variances 61

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

The Department strives to:

✓ 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

4. OUTCOMES OF THE PROGRAMME

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.

7. CRITICAL CROSS-FIELD OUTCOMES:

According to South African Qualifications Authority the following seven critical cross-field outcomes must
inform all teaching and learning in our courses:

All students must develop:


✓ the ability to identify and solve problems with responsible decisions shown to be the result of critical
and creative thinking;
✓ the ability to work effectively with others as a member of a team, group, organisation and community;
✓ the ability to organise and manage oneself and one’s activities responsibility and effectively;
✓ the ability to collect, analyse, organise and critically evaluate information;
✓ the ability to communicate effectively, using visual, statistical and/or language skills in oral and/or
written presentation;
✓ the ability to use science and technology effectively and critically, showing
responsibility towards the environments and health of others;
✓ the ability to demonstrate an understanding of the world as a set of related systems by recognising
that problem-solving contexts do no exist in isolation.

8. OBJECTIVE OF THE SUBJECT

The aims of this course are:

✓ 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.

9. PURPOSE OF THIS LEARNING GUIDE:

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.

10. SUBJECT INFORMATION

Learning area: Health


Instructional offering: Biostatistics and Introduction to research
Subject code:
Credits: 12
Notional hours: 120
Duration: One semester
Contact sessions: Five 40-minute periods per week
Assessment: Two tests and one examination

11. PRESCRIBED BOOK:

Walker, G. A., Common Statistical Methods for Clinical Research with SAS Examples, 3nd edition, 2010,
ISBN 978-1-60764-228-2.

12. BOOKS FOR REFERENCE PURPOSES:

• Rosner, B., Fundamentals of Biostaistics, 7th Edition, ISBN-13: 978-0-538-73349-6.


• Pagano, M., Principles of Biostatistics, 2nd Edition, 2000, ISBN 0-534-22902-6.
• Forthofer R.N., Lee E. S., Hernandez M., Biostatistics - A Guide to Design, Analysis, and Discovery, 2nd
Edition, 2007, ISBN 13: 978-0-12-369492-8.
• McDonald J.H., Handbook of Biolological Statistics, 3rd Edition, 2014,

13. e-THUTO/Black board:

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:

Any non-programmable scientific calculator, preferably a CASIO – fx-991ES PLUS.


7

15. LECTURER INFORMATION:

Lecturer Roelf Sypkens e-mail: rsypkens@cut.ac.za

Office
YA RONA 221
Number

Postal address: Central University of Technology, Free State, Private Bag X20539, Bloemfontein, 9300,
South Africa

Consulting Hours: By appointment (see office door)

16. CLASS ATTENDANCE

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

17. SYLLABUS AND WORKSCHEME

LEARNING UNIT UNITS TIME TO COMPLETE ACADEMIC


AND WEEKS
PAGES
1. HYPOTHESIS TESTING: Chi-Square Test 5 pages
Week 1 12 Feb to 16 Feb
2. HYPOTHESIS TESTING: Pooled 4 pages Units 1 and 2 2024
Proportions z-Test complete

3. HYPOTHESIS TESTING: Fisher’s Exact 5 pages Week 2 – Unit 3 19 Feb to 23 Feb


Test complete 2024

Week 3 - Units 4 and 26 Feb to 1 Mar


5 complete 2024

4. HYPOTHESIS TESTING: McNemar’s Test 3 pages Week 4 – Class Test 1


based on Units 1, 2 4 Mar to 8 Mar
5. HYPOTHESIS TESTING: 5 pages and 3 2024
Cochran- Mantel-Haenszel Test

6. HYPOTHESIS TESTING: 10 pages Week 5 – Unit 6 11 Mar to 15 Mar


The Wilcoxon Rank-Sum Test complete 2024

Week 6
Test 2 / Main Test 2 Apr to 5 April
based on Units 4, 5
and 6

7. HYPOTHESIS TESTING: Two Means for 4 pages


independent samples with known Variances
Week 7
8. HYPOTHESIS TESTING: Two Means for 5 pages Unit 7 and 8 8 Apr to 12 Apr
independent samples with unknown but complete 2024
equal Variances

9. HYPOTHESIS TESTING: Two Means for 7 pages


independent samples with unknown but not
assumed equal Variances Week 8
Unit 9 and 10 15 Apr to 19 Apr
10. HYPOTHESIS TESTING: 5 pages complete 2024
Two Means for dependent and equal
samples

Week 10 - Sickness / 22 Apr to 26 Apr


Makeup test based 2024
on Units 1 to 10
9

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.

✓ Absence during assessments:


If you cannot write a test or examination due to whatever reason, then you must report to your lecturer
concerned (in the case of class tests) or the examination department (in the case of examinations) within
three (3) working days to avoid obtaining a zero for the test or examination. If a satisfactory reason for
absence is provided, than you will be allowed to write one sickness test/makeup test at the end of the
semester. Please note that the scope of this test will include all the topics up to and including the last test.
If a student failed to write two or more class tests, then the mark for the sickness test/makeup test will be
divided proportionally between those tests. If you write class test 1, main test, and sickness test/makeup
test, the bonus will be that your course mark will be calculated (between 3 tests written) as:

CM = 50%(BEST TEST SCORE) + 50%(SECOND BEST SCORE).

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

✓ Assessment schedule and contents:


The test dates will be announced by your lecturer during the first week of lectures and they will also
be posted on Black board. Please write them down in the table below. Also take note of the contents
for each test:

TESTS CONTENTS DATE


CLASS TEST (CT) Unit 1, 2 and 3 8 March 2024, Friday

MAIN TEST(MT) Unit 4, 5 and 6 5 April 2024, Friday


SICKNESS TEST OR MAKE-UP TEST Unit 7 to 10 26 April 2024, Friday

✓ Calculation of course mark:


The coursemark (CM) will be calculated as follows:

CM = 50%(BEST TEST SCORE) + 50%(SECOND BEST SCORE)

Academic Weeks Dates Units Covered


Week 1 12 February to 16 February Units 1 and 2
Week 2 19 February to 23 February Unit 3
Week 3 26 February to 1 March Units 4 and 5
Week 4 4 March to 8 March Class Test 1
Week 5 11 March to 15 March Unit 6
Recess 20 March to 1 April Recess
Week 6 2 April to 5 April Main Test
Week 7 8 April to 12 April Units 7 and 8
Week 8 15 April to 19 April Units 9 and 10
Week 9 22 April to 26 April Sickness/Makeup Test
11

✓ CUT Graduate Attribute and Action Verbs Used in Assessments:

CUT Graduate Official Definition Practical Definitions


Attributes
1. Sustainable Be environmentally sensitive and Ensuring a sustainable
recognize your role as a socially curriculum
development responsible citizen who cares for the Incorporating aspects of
common good of others, the country and sustainability in the content
environment.
2. Innovation and Be innovative, think creatively and Promoting the iUSE model
critically and apply a range of strategies to (investigate, understand,
problem solving solve/find solutions for real world solutions and evaluate)
problems. Demonstrate the ability to apply
theoretical knowledge that will lead to
development of new ideas, methods,
techniques, practices, products and
services in a variety of contexts
(technology, commerce, social systems).
3. Entrepreneurship Be entrepreneurial, industrious and be able Featuring aspects relating
to recognize opportunities; turn them into to entrepreneurship
ideas for enterprises. You shall have
business acumen and display basic
business skills.
4. Community Be socially engaged in your communities. Encouraging students to
benefit their communities
engagement

5. Technologically Use information and communication Efficiently using computer


technologies effectively. hardware and software
Literate

6. Numerate Use basic mathematics, budgeting and Performing correct


financial management skills. calculations and equation
manipulations
CUT Graduate Official Definition Practical Definitions
Attributes

7. Teamwork Work independently and in teams, to Nurturing group work of two


manage your own learning, work and take or more students
responsibility for self while contributing
to teams such as learning communities.
8. Communication Communicate proficiently, in oral, written, Promoting good written and
presentation, information searching and oral communication
listening skills. Be assertive and
articulate, be able to negotiate
responsibly and persuade others
effectively.
9. Citizenship and Make a meaningful and positive Including aspects relating to
contribution to society, be ethical and citizenship, leadership or
global leadership visionary leaders who can show management
leadership in different contexts.
10. Technical and Demonstrate depth of specialized Operating specific equipment
disciplinary knowledge and skills and be or apparatus effectively
conceptual able to apply them in different contexts to
competence solve problems.
12

Bloom’s Taxonomy used in the formulation of questions


Objective Definition Synonyms Illustrative verbs Level

Justify; conclude; HOq- Highest


Judging the value of
Estimate evaluate; verify; level dependent
Evaluation the system based on
Assessment confirm; determine; on students
given criteria
analyze reasoning ability

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

The use of Change;


Use
abstractions in demonstrate;
Application Purpose HOq
particular and modify; solve; use;
Appliance
concrete situations show; calculate

Translation, Explain; convert;


interpretation Understanding estimate; rearrange;
Comprehension LOq
and extrapolation of Grasp summarize; derive;
elements/parts review; relate

Name; list; state;


Recall or recognition define; describe; LOq - Lowest
Information
of label; sketch; level dependant
Knowledge Facts
specific discuss; identify; on students
Data
elements/parts select; insert; memory ability
complete

✓ Verification of marks:
Please note the following schedule for correction of course marks. No corrections will be made after
the indicated dates:

LAST DATE FOR


DATE ITEM
CORRECTIONS
STUDENTS VERIFY COURSE MARKS ON CENTRAL
NOTICE BOARDS

19. GUIDELINES FOR IMPROVING PERFORMANCE IN THE MODULE:

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.

Attend all classes and participate


13

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.

When answering any assessment:


✓ Read the question carefully; make sure you know what is being asked.
✓ Then, stop and think.
✓ Write your answer systematically and as neat as possible.
✓ Show all your calculations at all times, i.e. how you arrived at the solution.
✓ Make sure that you manage your time effectively, in other words, do not spend more time on one
question than is available. Work fast and accurately!
✓ Work through tutorials, previous test and examination papers, in order to get used to the style
and standard of the papers.
20. EXIT LEVEL OUTCOMES (GRADUATE ATTRIBUTES)

Exit Level Outcome (Graduate Attribute) 1:


Problem Solving: Apply engineering principles to systematically
diagnose and solve well-defined engineering
problems.

Exit Level Outcome (Graduate Attribute) 2: Apply knowledge of mathematics, natural


Application of scientific and engineering science and engineering sciences to applied
knowledge engineering procedures, processes, systems
and methodologies to solve well-defined
engineering problems.
Exit Level Outcome (Graduate Attribute) 3:
Engineering Design Perform procedural design of components,
systems, works, products or processes to
meet requirements, normally within applicable
standards, codes of practice and legislation.
Exit Level Outcome (Graduate Attribute) 4:
Investigations, experiments and data analysis Conduct investigations of well-defined
problems through locating and searching
relevant codes and catalogues, conducting
standard tests, experiments and
measurements.
Exit Level Outcome (Graduate Attribute) 5:
Engineering methods, skills, tools, including Use appropriate techniques, resources, and
Information technology modern engineering tools including
information technology for the solution of well-
defined engineering problems, with an
awareness of the limitations, restrictions,
premises, assumptions and constraints.
14

Exit Level Outcome (Graduate Attribute) 6:


Professional and Technical Communication Communicate effectively, both orally and in
writing within an engineering context.

Exit Level Outcome (Graduate Attribute) 7:


Sustainability and Impact of Engineering Demonstrate knowledge and understanding of
Activity the impact of engineering activity on the
society, economy, industrial and physical
environment, and address issues by defined
procedures.
Exit Level Outcome (Graduate Attribute) 8:
Individual, Team and Multidisciplinary Demonstrate knowledge and understanding of
working engineering management principles and apply
these to one’s own work, as a member and
leader in a technical team and to manage
projects.
Exit Level Outcome (Graduate Attribute) 9:
Independent Learning Ability Engage in independent and life-long learning
through well-developed learning skills.

Exit Level Outcome (Graduate Attribute) 10:


Engineering Professionalism Understand and commit to professional ethics,
responsibilities and norms of engineering
technical practice.

21. POPULAR MATHEMATICS EXPRESSIONS TRANSLATED


Sign/Symbol English Sesotho Afrikaans
= Equal to Lekana le Gelyk aan
 Not equal to Ha e lekane le Nie gelyk aan
 Approximately equal to Haufinyana le Ongeveer gelyk aan
> Greater than Kgolo ho Grooter as
< Less than Nnyane ho Kleiner as
≥ Greater than or equal to Kgolo kapa le lekana le Grooter of gelyk aan
≤ Less than or equal to Nnyane kapa e lekana le Kleiner of gelyk aan
+ Addition Ho Kopanya Optelling
− Subtraction Ho ntsha Aftrekking
× Multiplication Ho atisa Vermenigvuldiging
÷ Division Ho arola Deling
∝ Proportionality Seka tekanyo eweredig
a *b Convolution Konvolusie
y = f ( x) y is a function of x 𝒚 e hlaha tsebetsong ya 𝒙 y is ‘n funksie van x
x independent variable 𝒙 palo e ikemetseng x is die onafhanklikke veranderlikke
y dependant variable 𝒚 palo e itshetlehileng y is die afhanklikke veranderlikke
∞ Infinity bosafeleng oneindig
ln Natural logarithm to the base of e Ho isa botlaseng be e Natuurlikke logaritme tot die basis e
log Logarithm to the base 10 Ho isa botlaseng ba 10 Logaritme tot die basis 10
n! n Factorial n Factorial n Faktories
n ! = n  (n − 1)  (n − 2)  ... 1 n ! = n  (n − 1)  (n − 2)  ... 1 n ! = n  (n − 1)  (n − 2)  ... 1
xn x to the power of n 𝒙 e nyolelwa matleng a 𝒏 x tot die mag n
Square root of n Square root sa n Vierkantswortel van n
n
() Round brackets Masaka Ronde hakkies
[] Square brackets Masaka a sekwere Vierkantigge hakkies
{} Parenthesis Krul hakkies
( a, b) Open interval Sebakanako se buletswe Oop interval
15

[ a, b] Closed interval Sebakanako se kwetsweng Toe interval


Sigma summation Letshwao la ho kopanya lethathama Sigma Sommasie

e = 2.71828.. Euler’s constant 2.71828.. Nomoro e sa fetoheng ya Euler Euler se konstante 2.71828..
2.71828…
 = 3.1415.. Pi is 3.1415.. Nomoro ya Pi ke 3.1415… Pi is 3.1415..
m Meter Metara Meter
cm Centimetre Sentimetara Sentimeter
mm Millimetre Mimimetara Milliemeter
g Gram Grrama Gram
kg Kilogram Kilogramma Kilogram
l Litre Litara Liter
ml Millilitre Mililitara Milliliter
LCM Lowest common multiple se tlase se tlwelehe ngata Laagste gemene veelvoud
LCF Lowest common factor e tlase haholo e tloalehileng Laagste gemene faktor
GCD Greatest common divisor Karohano e kgolohadi e Grootste gemene deler
tlwaelehileng
HCF Highest common factor e phahameng ka ho fetisisa e Grootste gemene faktor
tloalehileng
z = a + bj A complex number where a is the Nomoro e kopakopaneng moo a ‘n Komplekse getal waar a die reele
real part and b is the imaginary part leng karolo yan nnete, b ele karolo deel is en b die imaginere deel
ya boiqaphelo
rad Radians Radians Radiale
Degree Ntlha Grade
.. .. Matrix Matrix Matriks
A= 
.. ..
det( A) Determinant of matrix A Determinant ya Matrix wa A Determinant van matriks A
A T Transpose of matrix A Transpose Transponent van matriks A
A−1 Inverse matrix Inverse ya Matrics Inverse matriks
 Lambda for eigenvalue Lambda ya eigenvalue Lamda as eiewaarde
F Vector Vector Vektor

u Unit vector Vector ya boleng bo le bong Eenheids vektor

a •b Dot product Katiso ya doto Skalaar produk

ab Cross product Katiso ya cross Vektor produk


dy Derivative of y to x Derivative ya 𝒚 ho 𝒙 Afgeleide van y na x
dx
d2y Second derivative of y to x Derivetive ya bobedi ya 𝒚 ho 𝒙 Afgeleide van y na x
dx 2
f Partial derivative of f to x Karolwana ya derivative ya 𝒇 ho 𝒙 Parsiele afgeleide van f na x
x
Integral ya 𝒇
 f dx Integral of f The integral of f
dy Differential equation Equation ya differentation Differensiaal vergelyking
+ 4y = 7
dx
16

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.

Table 1.1 Layout for the Chi-Square Test


Variable 2
Number of Number of
Variable 1 Responders - Yes Responders - No Total
Group 1 X1 n 1 - X1 n1
Group 2 X2 n 2 – X2 n2
Total X1 + X2 n – (X1 + X2) n = n 1 + n2

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.

Assuming that the normal approximation to the binomial distribution is applicable


17

State the hypothsis:

H0 : presponders − yes = presponders − no against H1 : presponders − yes  presponders − no

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

Table 1.2 Observed (O) and Expected (E) Cell Frequencies


i Oi Ei
1 X1 n1(X1 + X2) / n
2 X2 n2(X1 + X2) / n
3 n 1 – X1 n1(n - X1 - X2) / n
4 n 2 – X2 n2(n - X1 - X2) / n

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.

1.3 Example - Chi-Square Test


Question. A study was conducted to monitor the incidence of gastro-intestinal (GI) adverse drug reactions
of a new antibiotic used in lower respiratory tract infections (LRTI). Two parallel groups were included in
the study. One group consisted of 66 LRTI patients randomized to receive the new treatment and a
reference group of 52 LRTI patients randomized to receive erythromycin. There were 22 patients in the
test group and 28 patients in the control (erythromycin) group who reported one or more GI complaints
during 7 days of treatment. Is there evidence of a difference in GI side effect rates between the two
groups? Stated differently, determine if the true proportions in each category (responders answered yes,
reponders answered no) are different for patient status in each category (patient receiving test drug,
patient receiving control drug). Use a level of significance of 0.05.

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

Table 1.3 ‘Response’ Frequencies for Example


Responders
Status Yes No Total
Test Drug 22 (33%) 44 66
Control 28 (53.8%) 24 52
Total 50 (42.4%) 68 118

Solution
State the hypothsis:

H0 : pyes = pno against H1 : pyes  pno for status (Test Drug, Control)

Calculate the test statistic:


NUM =
(22  52 − 28  66 )
= −5.966
118

and
66  52  50  68
DEN = = 7.102
1183

( −5.966 )
2
2
obs =
7.102
= 5.012

2
Critical value: 1 − ,1

The level of significance was stated as α = 0.05,

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,

we test the null hypothesis

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.

against the alternative

H1: The proportions of persons suffering head injuries are not identical in the two populations.

We conduct the test at the α = 0.05 level of significance.

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,

H0 : phospital − A = phospital − B against H1 : phospital − A  phospital − B for Death Certificate


Status (Confirmed Accurate, Inaccurate, Inforrect)

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.

Death Certificate Status


Confirmed Inaccurate Incorrect
Hospital Accurate No Change Recording Total
A 169.3 24.7 35.0 229.0
B 255.7 37.3 53.0 346.0
Total 425.0 62.0 88.0 575.0

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

• Pooled Proportions z-Test


Learning outcome:
After completion of this section you should be able to:
✓ Apply the hypothesis test using 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

(depending of the what the researcher wants to test)

Test statistics is, therefore:

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

Critical values either as z1 − or z (obtain from standard normal tables)


1−
2
22

Rrejection region based on H1, compare test statistic with critical values

Alternative hypothesis (H1) Reject H0 if

p1 − p2  0 or p1  p2 Zobs  −z1 − one-tailed test


p1 − p2  0 or p1  p2 Zobs  z1 − one-tailed test
p1 − p2  0 or p1  p2 Zobs  z1 − /2 two-tailed test

The approximate 100 (1 − ) % confidence interval on the difference in the true proportions p1 − p2
is

pˆ1 (1 − pˆ1 ) pˆ2 (1 − pˆ2 )


(pˆ1 − pˆ2 )  z
1− n1
+
n2
2

where z (obtain from standard normal tables).


1−
2

This confidence interval is valid whenever n1pˆ1 , n1 (1 − pˆ1 ), n2pˆ 2 , n2 (1 − pˆ 2 ) are at least 5.

2.2 Example - Pooled Proportions z-Text


Question.

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.

State the hypothsis:

H0 : p2 = p1
H1 : p1  p2

Calculate the test statistic:

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 −

If the level of significance is not stated in the question use α = 0.05,

z1 − = z0.95 = 1.645

Rejection region and conclusion: We reject H0 if Z obs  z1 −

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

Testing for valididy of confidence interval, n1pˆ1 = 51  5, n1 (1 − pˆ1 ) = 49  5, n2pˆ 2 = 43  5,


n2 (1 − pˆ 2 ) = 57  5.

Secondly calculate α and z , let 100 (1 − )% = 99%


1−
2
24

Then

1− = 0.99 , = 0.01

z = z0.995 = 2.575
1−
2

approximate confidence interval on the difference in the true proportions p1 − p2 is

pˆ1 (1 − pˆ1 ) pˆ2 (1 − pˆ2 )


(pˆ1 − pˆ2 )  z
1− n1
+
n2
2

Then

 51 43  0.51(1 − 0.51) 0.43(1 − 0.43)


 100 − 100   2.575 +
  100 100

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

Critical value: z1 − = z1 − 0.05 = 1.645

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

• Fisher’s Exact Test


Learning outcome:
After completion of this section you should be able to:
✓ Apply the hypothesis test with 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

State the hypothsis:


H0 : p1 = p2
H1 : p1  p2 or H1 : p1  p2 or H1 : p1  p2

(depending of the what the researcher wants to test)

P-value Calculations for rejection and conclusion:

Alternative
hypothesis (H1) Reject H0 if p-value is less than
a

p1  p2 p-value = Pr (i)


i=0
= Pr ( 0 ) + Pr (1) + ... + Pr ( a) 
k

p1  p2 p-value = Pr (i)


i=a
= Pr ( a) + Pr ( a + 1) + ... + Pr (k )  where k = a + c

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.

➢ Steps in the calculation of p-values

• 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

3.2 Example - Fisher’s Exact Test

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

Use Fisher’s Exact test and determine if the

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;

Let the level of signifcance be 0.05.

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

Steps in Calculating the p-value

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

Table 3.3.1 Table 3.3.2 Table 3.3.3 Table 3.3.4


0 25 1 24 2 23 3 22
7 28 6 29 5 30 4 31
0.017 0.105 0.252 0.312
Table 3.3.5 Table 3.3.6 Table 3.3.7 Table 3.3.8
4 21 5 20 6 19 7 18
3 32 2 33 1 34 0 35
0.214 0.082 0.016 0.001

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

Rejection region and conclusion: We reject H0 if p-value < α = 0.05

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

Rejection region and conclusion: We reject H0 if p-value < α = 0.05

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

p − value = 0.017 + 0.105 + 0.252 + 0.214 + 0.082 + 0.016 + 0.001 = 0.688

Rejection region and conclusion: We reject H0 if p-value < α = 0.05

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.4 CHF Frequency Summary for Question 3.1


Active Group Placebo Combined
Xi 2 5 7
ni 35 20 55

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

Table 3.6 Reconstruction


Xi ni -Xi Combined
Active Group 2 33 35
Placebo 5 15 20
Total 7 48 55
Table 3.7
Table 3.7.1 Table 3.7.2 Table 3.7.3 Table 3.7.4
0 35 1 34 2 33 3 32
7 13 6 14 5 15 4 16
0.0004 0.0067 0.0455 0.1563
Table 3.7.5 Table 3.7.6 Table 3.7.7 Table 3.7.8
4 31 5 30 6 29 7 28
3 17 2 18 1 19 0 20
0.2941 0.3040 0.1600 0.0331

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.

Table 4.1 Layout for McNemar’s Test


2nd Observation
1st Observation Response Non-Response Total
Response a b a+b
Non-Response c d c+d
Total a+c b+d n
34

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.

State the hypothsis:


H0 : p1 = p2
H1 : p1  p2

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

The 100(1 – α)% confidence interval for p1 – p2 is approximated by

(b − c) 1
 z1 −   b + c −
(b − c ) 2

n n n

4.3 Example – McNemar’s Test

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.

Table 4.2 Abnormality Frequency Summary for Example


Post-Treatment
Pre-Treatment N Y Total
N 60 14 74
Y 6 6 12
Total 66 20 86
35

Solution
a)

State the hypothsis:

H0 : p1 = p2
H1 : p1  p2

Calculate the test statistic:


(14 − 6 )
2
2
=
obs
(14 + 6 )
= 3.20
2
Critical value: 1 − ,1

If level of significance was α = 0.01,

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.

b) The 99% confidence interval for p1 - p2 is

(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

Table 5.1 Layout for the Cochran-Mantel-Haenszel Test

Layers Group Responses Non-Responders Total

1 1 X11 n11 – X11 n11


2 X12 n12 – X12 n12
Total X11 + X12 n1 – (X11 + X12) n1

2 1 X21 n21 – X21 n21


2 X22 n22 – X22 n22
Total X21 + X22 n2 – (X21 + X22) n2
.
.
.
k 1 Xk1 nk1 – Xk1 nk1
2 Xk2 nk2 – Xk2 nk2
Total Xk1 + Xk2 nk – (Xk1 + Xk2) nk
38

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.

State the hypothsis:


H0 : p1 = p2
H1 : p1  p2

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

5.3 Example - Cochran-Mantel-Haenszel Test

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

Table 5.2 Dermotel Response in Diabetic Ulcers

Study Center Treatment Group Responses Non-Responders Total

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

Calculate the test statistic:

NUM1 =
( X11  n12 − X12  n11 )
n1

=
(26  29 − 18  30 )
59
= 3.6271

and

n11  n12 ( X11 + X12 )  (n1 − X11 − X12 )


DEN1 =
n12  (n1 − 1)
30  29  44  15
=
592  58
= 2.8440
40

These quantities can be computed in a similar way for the other centers, and the results are shown in
Table 5.3

Table 5.3 Computational Summary for CMH Test Statistic


Study Center (j) NUMj DENj

1 3.6271 2.8440

2 0.8261 1.3611

3 1.000 1.4286

4 0.0322 1.8162

Total 5.4855 7.4500

2
 k 
  NUMj 
=  k 
2 j=1
obs

DENj
j=1

5.48552
=
7.45
= 4.039

2
Critical value: 1 − ,1

The level of significance was stated as α = 0.05,

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

Location Allele Marine Estuarine

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

• The Wilcoxon Rank-Sum Test


Learning outcome:
After completion of this section you should be able to:
✓ Apply the hypothesis test with 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.

6.2 Synopsis – Without Ties


State the hypothsis:
H0 : 1 − 2 = 0
H1 : 1 − 2  0 or H1 : 1 − 2  0 or H1 : 1 − 2  0

(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

Rejection region and conclusion:

Alternative hypothesis (H1) Reject H0 if

1 − 2  0 or equivalently 1  2 rank sum ≤ lower-tail critical value


1 − 2  0 or equivalently 1  2 rank sum ≥ upper-tail critical value
Either rank sum ≥ upper-tail critical
value
1 − 2  0 or equivalently 1  2 or rank sum ≤ lower-tail critical value
43

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.

6.3 Example - The Wilcoxon Rank-Sum Test (Without Ties)


Question. The extent to which an infant’s health is affected by parental smoking is an important public
health concern. The paper “Measuring the Exposure of Infants to Tobacco Smoke” (New Engl. J. Of Med.
(1984):1075-1078) reported on a study in which various measurements were taken both from a random
sample of infants who had been exposed to household smoke and from sample of unexposed imfants. The
accompanying data consists of observations on urinary concentration of cotanine, a major metabolite of
nicotine (the values constitute a subset of the original data and were read from a plot that appeared in the
paper). Does the data suggest that the true average cotanine level is higher for exposed than for
unexposed infants? The investigator used the rank sum test to analyze the data,

Unexposed (n1 = 7) 8 11 12 14 20 43 111


Rank 1 2 3 4 5 7 11
Exposed (n2 = 8) 35 56 83 92 128 150 176 208
Rank 6 8 9 10 12 13 14 15

Solution

State the hypothsis:


H0 : 1 − 2 = 0
H1 : 1 − 2  0 (unexposed average is less than exposed average)

Test statistic: rank sum = sum of the sample 1 ranks

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

Test statistic: rank sum = sum of the sample 1 ranks

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.

6.4 Synopsis – With Ties

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.

State the hypothsis:


H0 : 1 = 2
H1 : 1  2

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

C = c1 + c2 + ... + cg, as follows:

2 n1  n2  C 
=  N + 1 − 
R1
12  N(N − 1 ) 

Critical value: z
1−
2

Rejection region and conclusion: We reject H0 if Zobs  z


1−
2

6.5 Example - The Wilcoxon Rank-Sum Test (With Ties)

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:

-------- Deterioration --------- -------- Improvement ---------


Marked Moderate Slight No Change Slight Moderate Marked
-3 -2 -1 0 +1 +2 +3
Table 6.1 Is there evidence that Seroxatene has any effect on radicular back pain?

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

Calculate the test statistic:

Table 6.2 Tied data values for Example


Number of Ranks for each
Response response Average
(y) (m) Ranks Rank ck = m(m2-1)
-3 2 1, 2 1.5 6
-2 3 3, 4, 5 4 24
-1 4 6, 7, 8, 9 7.5 60
0 4 10, 11, 12, 13 11.5 60
1 3 14, 15, 16 15 24
2 4 17, 18, 19, 20 18.5 60
3 8 21, 22, 23, 24, 24.5 504
25, 26, 27, 28
C = 738

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

= 11.5 + 18.5 + 24.5 + ... + 7.5


= 261
n1
R2 = r
j=1
2j

= 24.5 + 7.5 + 18.5 + ... + 11.5


= 145

As a check, note that R1 + R2 = N (N+1) / 2 = 406. You further compute

16 ( 29 )
R1 = = 232
2

and

2
=
(16 )(12 )  29 −
738 
  = 448.38
R1
12  28 ( 27 ) 

261 − 232 − 0.5


Zobs = = 1.346
448.38

Critical value: z = z 0.05 = 1.96


1− 1−
2 2

Rejection region and conclusion: We reject H0 if Zobs  z


1−
2
Because 1.346 is 1.96, you do not reject H0, and conclude that there is insufficient evidence of
a difference between Seroxatene and placebo.
48

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).

Table 6.3 Data


Polluted 21.3 18.7 23.0 17.1 16.8 20.9 19.7
Unpolluted 14.2 18.3 17.2 18.4 20.0

Answer:

Table 6.4 Reorganize and Determine the Combined ranks


Polluted 16.8 17.1 18.7 19.7 20.9 21.3 23.0
Rank 2 3 7 8 10 11 12
Unpolluted 14.2 17.2 18.3 18.4 20.0
Rank 1 4 5 6 9

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

Sodium Deprived Group


Chicken Pecking Chicken Pecking
Number Activity Number Activity
1 0 10 74
2 0 11 79
3 0 12 85
4 2 13 92
5 17 14 95
6 58 15 97
7 67 16 150
8 67 17 181
9 68

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

Answer: State the hypothsis: H0 : 1 = 2 against H1 : 1  2

Calculate the test statistic:


50

Table 6.2 Tied data values for Example


Number of Ranks for each
Response response Average
(y) (m) Ranks Rank ck = m(m2-1)
0 8 1, 2, 3, 4, 5, 6, 7, 8 4.5 504
2 0 9 9 0
8 0 10 10 0
13 2 11, 12 11.5 6
17 0 13 13 0
20 0 14 14 0
33 0 15 15 0
34 0 16 16 0
57 0 17 17 0
58 0 18 18 0
60 0 19 19 0
64 0 20 20 0
67 2 21, 22 21.5 6
68 0 23 23 0
74 0 24 24 0
78 0 25 25 0
79 0 26 26 0
85 0 27 27 0
92 0 28 28 0
95 0 29 29 0
97 0 30 30 0
150 0 31 31 0
181 0 32 32 0
C = 516

With n1 = 17, n2 = 15, and N = 32, the ranked values (r's) of the responses (y's) are shown in the following
tables.

Sodium Deprived Group


Chicken Average Chicken Average
Number Rank Number Rank
1 4.5 10 24
2 4.5 11 26
3 4.5 12 27
4 9 13 28
5 13 14 29
6 18 15 30
7 21.5 16 31
8 21.5 17 32
9 23
51

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

As a check, note that R1 + R2 = N (N+1) / 2 = 528. You further compute

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

346.5 − 280.5 − 0.5


Zobs = = 2.49
690.1965726

Critical value: z1 − = z1 − 0.05 = 1.645

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

Hypothesis test for 1 − 2 for independent samples with known σ2’s

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)

Test statistic used is

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 .

Critical values either as z1 − or z (obtain from standard normal tables)


1−
2
establish the rejection region based on H1, compare test statistic with critical values
53

Rejection region and conclusion

Alternative hypothesis (H1) Reject H0 if

1 − 2  0 Zobs  −z1 − one-tailed test


1 − 2  0 Zobs  z1 − one-tailed test
1 − 2  0 Zobs  z1 − /2 two-tailed test

The 100 (1 − ) % confidence interval on the difference in the true means 1 − 2 is

2 2
( x1 − x2 )  z
1− n1
1
+ 2
n2
2

where z (obtain from standard normal tables).


1−
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)

State the hypothsis:

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

Rejection region and conclusion: We reject H0 if Zobs  z1 − / 2

Zobs = 2.57  z1 − /2 = 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:

Firstly calculate α and z , let 100 (1 − )% = 95%


1−
2

Then

1 − = 0.95 , = 0.05
z = z0.975 = 1.96
1−
2

approximate confidence interval on the difference in the true averages 1 − 2 is

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.

a) Test the hypothesis.


b) Construct the 99% confidence interval of 1 − 2.

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)

Test statistic used is

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.

Critical values either as  t1 − ,n1 + n2 − 2 or t (obtain from the student t-tables)


1− ,n1 + n2 − 2
2
Rejection region based on H1, compare test statistic with critical values

Alternative hypothesis (H1) Reject H0 if

1 − 2  0 Tobs  −t1 − ,n1 + n2 − 2 one-tailed test


1 − 2  0 Tobs  t1 − ,n1 + n2 − 2 one-tailed test
1 − 2  0 Tobs  t1 − / 2,n1 + n2 − 2 two-tailed test

The 100 (1 − ) % confidence interval on the difference in the true means 1 − 2 is

( x1 − x2 )  t
1− ,n + n − 2
1 2
(sp ) 1
+
1
n1 n2
2

where t (obtain from student t-tables).


1− ,n1 + n2 − 2
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:

H0 : C = SCI thus H0 : C − SCI = 0

H1 : C  SCI thus H1 : C − SCI  0

Calculate the test statistic:

xC = 126.1 , sC = 21.8 , xSCI = 133.1 , sSCI = 32.2 ,

Next we pool the sample variances to obtain

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

−t1 − ,n1 + n2 − 2 = −t0.95,18 = −1.73

Rejection region and conclusion: We reject H0 if Tobs  −t1 − ,n1 + n2 − 2

Because Tobs = −0.57 ≮ −t1 − ,n1 + n2 − 2 = −1.73

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:

Firstly calculate α and t , let 100 (1 − )% = 95%


1− ,n1 + n2 − 2
2

Then

1 − = 0.95 , = 0.05

t = t0.975,10 + 10 − 2 = t0.975,18 = 2.10


1− ,n1 + n2 − 2
2

The 95% confidence interval on the difference in the true averages 1 − 2 is

( 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.

Table 8.2 Raw Data for Question 8.1


ABC-123 Group Placebo Group
Patient Patient
Number Baseline Week 6 Number Baseline Week 6
101 1.35 n/a 102 3.01 3.90
103 3.22 3.55 104 2.24 3.01
106 2.78 3.15 105 2.25 2.47
108 2.45 2.30 107 1.65 1.99
109 1.84 2.37 111 1.95 n/a
110 2.81 3.20 112 3.05 3.26
113 1.90 2.65 114 2.75 2.55
116 3.00 3.96 115 1.60 2.20
118 2.25 2.97 117 2.77 2.56
120 2.86 2.28 119 2.06 2.90
121 1.56 2.67 122 1.71 n/a
124 2.66 3.76 123 3.54 2.92

Table 8.3 Treatment Group Summary Statistics for Question 8.1


ABC-123 Placebo
Mean ( x i ) 0.50 0.28
Standard deviation ( s i ) 0.52 0.51
Sample Size ( n i ) 11 10

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)

Test statistic used is

x1 − x2 −
Tobs = 0
~ tdf when 2
and 2
are unknown and not assume equal
s12 s2 1 2
+ 2
n1 n2

The degrees of freedom, df, is calculated as


62

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.

Critical values either as  t1 − ,df or t (obtain from the student t-tables)


1− ,df
2
Rejection region based on H1, compare test statistic with critical values

Alternative hypothesis (H1) Reject H0 if

1 − 2  0 Tobs  −t1 − ,df one-tailed test


1 − 2  0 Tobs  t1 − ,df one-tailed test
Tobs  t
1 − 2  0
1 − ,df
2 two-tailed test

The 100 (1 − ) % confidence interval on the difference in the true means 1 − 2 is

s12 s22
( x1 − x2 )  t
1 − ,df
+
n1 n2
2

where t (obtain from student t-tables).


1− ,df
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.

b) Determine the 98% confidence interval between the two means 1 − 2.

Solution

a)

State the hypothsis:

H0 : 1 − 2 = 5

H1 : 1 − 2  5

Calculate the test statistic:

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

If df is not an integer value then round down to the nearest integer.

Critical value: t1 − ,df

If the level of significance is α = 0.01, t1 − ,df = t0.99,24 = 2.492

Rejection region and conclusion: We reject H0 if Tobs  t1 − ,df

Since Tobs = 2.21 2.492

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:

Firstly calculate α, let 100 (1 − )% = 98%

Then

1 − = 0.98 , = 0.02

t = t0.99,24 = 2.49.
1− ,df
2

The 98% confidence interval on the difference in the true averages 1 − 2 is

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

Calculate the test statistic:


142.5 − 156.5 − 0
Tobs =
(15.7)2 +
(17.3)2
2308 2293
= −28.74
The degrees of freedom is
2
 s12 s22 
 + 
df =  n1 n2 
2 2
 s12   s22 
   
  +  n2 
n 1
(n1 − 1) (n2 − 1)
2
 246.49 + 299.29 
 2308 2293 
= 
2 2
 246.49   299.29 
 2308   
  +  2293 
(2308 − 1) (2293 − 1)
= 4550.5
66

Rounding down the nearest integer, df = 4550.

Critical value: t
1 − ,df
2

If the level of significance is not stated in the question, always assume that α = 0.05.

t = t0.975,4550  t0.975, = 1.96


1 − ,df
2

Rejection region and conclusion: We reject H0 if Tobs  t


1 − ,df
2

Since Tobs = 28.74  1.96

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

Therefore, we are 95% confident that the interval

( −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

a) We wish to determine if there is any difference in mean arsenic concentrations between


metropolitan Phoenix communities and communities in rural Arizona. Assume that both populations
of arsenic concentrations are normally distributed but with different population variances.
b) Determine the 95% confidence interval on 1 − 2 .

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

• The 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

Hypothesis test for 1 − 2 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

(H1 depend of the what the researcher wants to test)

Test statistic used is

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

Critical values either as  t1 − ,n− 1 or t (obtain from the student t-tables)


1− ,n− 1
2

Rejection region based on H1, compare test statistic with critical values

Alternative hypothesis (H1) Reject H0 if

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

The 100 (1 − ) % confidence interval on the difference in the true means 1 − 2 is

 sd 
xd  t  
1 − ,n− 1  n 
2

where t (obtain from student t-tables).


1− ,n − 1
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.

Location Bottom water Top water


1 0.430 0.415
2 0.266 0.238
3 0.567 0.390
4 0.531 0.410
5 0.707 0.605
6 0.716 0.609

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.

b) Determine the 95% confidence interval between the two means 1 − 2.


70

Solution

a)

State the hypothsis:


H0 : d = 0 H1 : d  0

And let

d = 1 − 2 = mean bottom water – mean and top water

Calculate the test statistic:

For the differences

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

sd = s2d = 0.00368 = 0.061

xd − 0 0.0917
Tobs = = = 3.68
sd 0.061
n 6

Critical value: t1 − ,n− 1 , If the level of significance is α = 0.05, n = 6


71

t1 − ,n− 1 = t1 − 0.05,6 − 1 = t0.95,5 = 2.02

Rejection region and conclusion: We reject Ho if Tobs  t1 − ,n − 1

Tobs = 3.68  t0.95,5 = 2.02

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:

Firstly calculate α and t , let 100 (1 − )% = 95%


1− ,n − 1
2

Then

1 − = 0.95 , = 0.05

t = t0.975,5 = 2.57
1− ,n − 1
2

The 95% confidence interval on the difference in the true averages 1 − 2 is

 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.

b) The 95% confidence interval for d is (-2.69, 38.84).


73

You might also like