Professional Documents
Culture Documents
384 1447 1419344705470 Medical Statistics 4th
384 1447 1419344705470 Medical Statistics 4th
Fourth Edition
A Textbook for the Health Sciences
David Machin
Division of Clinical Trials and Epidemiological Sciences, National Cancer
Centre, Singapore,
Medical Statistics Group, School of Health and Related Research, University of
Sheffield, UK,
Children’s Cancer and Leukaemia Group, University of Leicester, UK
Michael J Campbell
Medical Statistics Group, School of Health and Related Research, University of
Sheffield, UK
Stephen J Walters
Medical Statistics Group, School of Health and Related Research, University of
Sheffield, UK
This page intentionally left blank
Medical Statistics
Fourth Edition
This page intentionally left blank
Medical Statistics
Fourth Edition
A Textbook for the Health Sciences
David Machin
Division of Clinical Trials and Epidemiological Sciences, National Cancer
Centre, Singapore,
Medical Statistics Group, School of Health and Related Research, University of
Sheffield, UK,
Children’s Cancer and Leukaemia Group, University of Leicester, UK
Michael J Campbell
Medical Statistics Group, School of Health and Related Research, University of
Sheffield, UK
Stephen J Walters
Medical Statistics Group, School of Health and Related Research, University of
Sheffield, UK
Copyright © 2007 John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester,
West Sussex PO19 8SQ, England
Telephone (+ 44) 1243 779777
Email (for orders and customer service enquiries): [email protected]
Visit our Home Page on www.wileyeurope.com or www.wiley.com
All Rights Reserved. No part of this publication may be reproduced, stored in a retrieval system
or transmitted in any form or by any means, electronic, mechanical, photocopying, recording,
scanning or otherwise, except under the terms of the Copyright, Designs and Patents Act 1988 or
under the terms of a licence issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court
Road, London W1T 4LP, UK, without the permission in writing of the Publisher. Requests to the
Publisher should be addressed to the Permissions Department, John Wiley & Sons Ltd, The
Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England, or emailed to permreq@
wiley.co.uk, or faxed to (+ 44) 1243 770620.
Designations used by companies to distinguish their products are often claimed as trademarks. All
brand names and product names used in this book are trade names, service marks, trademarks or
registered trademarks of their respective owners. The Publisher is not associated with any product
or vendor mentioned in this book.
This publication is designed to provide accurate and authoritative information in regard to the
subject matter covered. It is sold on the understanding that the Publisher is not engaged in
rendering professional services. If professional advice or other expert assistance is required, the
services of a competent professional should be sought.
Other Wiley Editorial Offices
John Wiley & Sons Inc., 111 River Street, Hoboken, NJ 07030, USA
Jossey-Bass, 989 Market Street, San Francisco, CA 94103-1741, USA
Wiley-VCH Verlag GmbH, Boschstr. 12, D-69469 Weinheim, Germany
John Wiley & Sons Australia Ltd, 33 Park Road, Milton, Queensland 4064, Australia
John Wiley & Sons (Asia) Pte Ltd, 2 Clementi Loop #02-01, Jin Xing Distripark, Singapore
129809
John Wiley & Sons Canada Ltd, 6045 Freemont Blvd, Mississauga, Ontario, L5R 4J3, Canada
Wiley also publishes its books in a variety of electronic formats. Some content that appears in
print may not be available in electronic books.
Anniversary Logo Design: Richard J. Pacifico
Library of Congress Cataloging-in-Publication Data
Campbell, Michael J., PhD.
Medical statistics : a textbook for the health sciences / Michael J.
Campbell, David Machin, Stephen J. Walters. – 4th ed.
p. ; cm.
Includes bibliographical references.
ISBN 978-0-470-02519-2 (cloth : alk. paper)
1. Medical statistics. 2. Medicine–Research–Statistical methods. I. Machin, David,
1939– II. Walters, Stephen John. III. Title.
[DNLM: 1. Biometry–methods. 2. Research Design. 3. Statistics. WA 950 C189m 2007]
R853.S7C36 2007
610.72′7–dc22
British Library Cataloguing in Publication Data
A catalogue record for this book is available from the British Library
ISBN 978-0-470-02519-2
Typeset in 10.5/12.5 Times by SNP Best-set Typesetter Ltd., Hong Kong
Printed and bound in Great Britain by Antony Rowe Ltd,. Chippenham, Wilts
This book is printed on acid-free paper responsibly manufactured from sustainable forestry in
which at least two trees are planted for each one used for paper production.
Contents
5 Distributions 63
5.1 Introduction 64
5.2 The Binomial distribution 64
5.3 The Poisson distribution 66
5.4 Probability for continuous outcomes 68
5.5 The Normal distribution 69
5.6 Reference ranges 73
5.7 Points when reading the literature 75
5.8 Technical details 75
5.9 Exercises 76
References 291
Solutions to exercises 297
Statistical tables 315
Table T1 The Normal distribution 316
Table T2 Random numbers 318
Table T3 Student’s t-distribution 319
Table T4 The χ2 distribution 320
Table T5 Normal ordinates for cumulative probabilities 321
Index 322
This page intentionally left blank
Preface to the Fourth Edition
Revised editions of books are often only minor departures from previous
editions. In this edition, however, with the aid of a new co-author we have
attempted a total revamp of our previously successful textbook. We did this
because not only have twenty years passed but the statistical requirements
of medical journals are now more rigorous and there has been an increasing
demand for the newer statistical methods to meet new scientific challenges.
Despite this, we have retained the popular approach of explaining medical
statistics with as little technical detail as possible, so as to make the textbook
accessible to a wide audience. In general, we have placed the, sometimes
unavoidable, more technical aspects at the end of each chapter. We have
updated many of the examples to give a more modern approach, but have
retained a few classics from the earlier editions, because they so well illustrate
the point we wish to make.
To aid the individual learner, exercises are included at the end of each
chapter, with answers provided at the end of the book. We have concentrated
the design issues into three chapters, concerning the design of observational
studies, randomised clinical trials and sample size issues. Many health scien-
tists will have to validate their methods of measurement, and a new feature
in this book is a chapter on reliability and validity.
Students of the health sciences, such as medicine, nursing, dentistry, physio-
therapy, occupational therapy, and radiography should find the book useful,
with examples relevant to their disciplines. The aim of training courses in
medical statistics pertinent to these areas is not to turn the students into
medical statisticians but rather to help them interpret the published scientific
literature and appreciate how to design studies and analyse data arising from
their own projects.
We envisage the book being useful in two areas. First, for consumers of
statistics who need to be able to read the research literature in the field with
xii PREFACE TO THE FOURTH EDITION
a critical eye. All health science professionals need to be able to do this, but
for many this is all they will need. We suggest that Chapters 1–7 would form
the basis of a course for this purpose. However, some (perhaps trainee) pro-
fessionals will go on to design studies and analyse data from projects, and so,
secondly, the book will be useful to doers of statistics, who need relatively
straightforward methods that they can be confident of using. Chapters 8–15
are aimed at this audience, though clearly they also need to be familiar with
the earlier chapters. These students will be doing statistics on computer pack-
ages, so we have given ‘generic’ output which is typical of the major packages,
to aid in the interpretation of the results.
We thank Lucy Sayer from Wiley for her patience, for what initially was
simply a revision, but is now essentially a new textbook.
David Machin
Singapore and Sheffield and Leicester, UK
Michael J Campbell
Sheffield, UK
Stephen J Walters
Sheffield, UK
November 2006
1 Uses and abuses of
medical statistics
1.1 Introduction 2
1.2 Why use statistics? 3
1.3 Statistics is about common sense and good design 4
1.4 Types of data 5
1.5 How a statistician can help 9
1.6 Further reading 11
1.7 Exercises 12
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
2 USES AND ABUSES OF MEDICAL STATISTICS
Summary
Statistical analysis features in the majority of papers published in health care
journals. Most health care practitioners will need a basic understanding of
statistical principles, but not necessarily full details of statistical techniques.
Medical statistics can contribute to good research by improving the design
of studies as well as suggesting the optimum analysis of the results. Medical
statisticians should be consulted early in the planning of a study. They can
contribute in a variety of ways at all stages and not just at the final analysis
of the data once the data have been collected.
1.1 Introduction
Most health care practitioners do not carry out medical research. However,
if they pride themselves on being up to date then they will definitely be con-
sumers of medical research. It is incumbent on them to be able to discern
good studies from bad; to be able to verify whether the conclusions of a study
are valid and to understand the limitations of such studies. Evidence-based
medicine (EBM) or more comprehensively evidence-based health care
(EHBC) requires that health care practitioners consider critically all evi-
dence about whether a treatment works. As Machin and Campbell (2005)
point out, this requires the systematic assembly of all available evidence fol-
lowed by a critical appraisal of this evidence.
A particular example might be a paper describing the results of a clinical
trial of a new drug. A physician might read this report to try to decide
whether to use the drug on his or her own patients. Since physicians are
responsible for the care of their patients, it is their own responsibility to
ensure the validity of the report, and its possible generalisation to particular
patients. Usually, in the reputable medical press, the reader is to some extent
protected from grossly misleading papers by a review process involving both
specialist clinical and statistical referees. However, often there is no such
protection in the general press or in much of the promotional literature
sponsored by self-interested parties. Even in the medical literature, mislead-
ing results can get through the refereeing net and no journal offers a guar-
antee as to the validity of its papers.
The use of statistical methods pervades the medical literature. In a survey
of original articles published in three UK journals of general practice; British
Medical Journal (General Practice Section), British Journal of General Prac-
tice and Family Practice; over a 1-year period, Rigby et al (2004) found that
66% used some form of statistical analysis. It appears, therefore, that the
majority of papers published in these journals require some statistical knowl-
edge for a complete understanding.
1.2 WHY USE STATISTICS? 3
Statistics is not only a discipline in its own right but it is also a fundamental
tool for investigation in all biological and medical science. As such, any
serious investigator in these fields must have a grasp of the basic principles.
With modern computer facilities there is little need for familiarity with the
technical details of statistical calculations. However, a health care profes-
sional should understand when such calculations are valid, when they are not
and how they should be interpreted.
In the above example age, gender and ethnicity are examples of confound-
ing variables as illustrated in Figure 1.1. In this example, the types of indi-
viduals exposed to fluoridation depend on their age, gender and ethnic mix,
and these same factors are also known to influence cancer mortality rates. It
was established that over the 20 years of the study, fluoridated towns were
more likely to be ones where young, white people moved away and these are
the people with lower cancer mortality, and so they left behind a higher risk
population.
Any observational study that compares populations distinguished by a
particular variable (such as a comparison of smokers and non-smokers) and
ascribes the differences found in other variables (such as lung cancer rates)
to the first variable is open to the charge that the observed differences are in
fact due to some other, confounding, variables. Thus, the difference in lung
1.4 TYPES OF DATA 5
EXPOSURE OUTCOME
Fluoridisation Cancer mortality
Confounding Factor(s)
Age, gender, ethnicity
Figure 1.1 Graphical representation of how confounding variables may influence both
exposure to fluoridisation and cancer mortality
cancer rates between smokers and non-smokers has been ascribed to genetic
factors; that is, some factor that makes people want to smoke also makes
them more susceptible to lung cancer. The difficulty with observational
studies is that there is an infinite source of confounding variables. An inves-
tigator can measure all the variables that seem reasonable to him but a critic
can always think of another, unmeasured, variable that just might explain the
result. It is only in prospective randomised studies that this logical difficulty
is avoided. In randomised studies, where exposure variables (such as alterna-
tive treatments) are assigned purely by a chance mechanism, it can be assumed
that unmeasured confounding variables are comparable, on average, in the
two groups. Unfortunately, in many circumstances it is not possible to ran-
domise the exposure variable as part of the experimental design, as in the
case of smoking and lung cancer, and so alternative interpretations are always
possible. Observational studies are further discussed in Chapter 12.
Variable
Figure 1.2 Broad classification of the different types of data with examples
Ordinal data If there are more than two categories of classification it may
be possible to order them in some way. For example, after treatment a patient
may be either improved, the same or worse; a woman may never have con-
ceived, conceived but spontaneously aborted, or given birth to a live infant.
In Table 1.1 education is given in three categories: none or elementary
school, middle school, college and above. Thus someone who has been to
middle school has more education than someone from elementary school but
1.4 TYPES OF DATA 7
Table 1.1 Demographic characteristics and selected risk factors for endometrial cancer.
Values are numbers (percentages) unless stated otherwise
Characteristic Cases Controls
scale, the value of zero has real meaning, whereas in an interval scale, the
position of zero is arbitrary.
One difficulty with giving ranks to ordered categorical data is that one
cannot assume that the scale is interval. Thus, as we have indicated when
discussing ordinal data, one cannot assume that risk of cancer for an indi-
vidual educated to middle school level, relative to one educated only to
primary school level is the same as the risk for someone educated to college
level, relative to someone educated to middle school level. Were Xu et al
(2004) simply to score the three levels of education as 1, 2 and 3 in their
subsequent analysis, then this would imply in some way the intervals have
equal weight.
decide whether it was sensible or ethical to conduct a trial with such a small
probability of success. One option would be to increase the size of the survey
until success (defined as a statistically significant result if a difference of
5 mmHg or more does truly exist) becomes more probable.
Questionnaires
Rigby et al (2004), in their survey of original articles in three UK general
practice journals, found that the most common design was that of a cross-
sectional or questionnaire survey, with approximately one third of the articles
classified as such.
For all but the smallest data sets it is desirable to use a computer for sta-
tistical analysis. The responses to a questionnaire will need to be easily coded
for computer analysis and a medical statistician may be able to help with this.
It is important to ask for help at an early stage so that the questionnaire can
be piloted and modified before use in a study. Further details on question-
naire design and surveys are given in Chapter 12.
Design of study
It has been emphasised that design deserves as much consideration as analy-
sis, and a statistician can provide advice on design. In a clinical trial, for
example, what is known as a double-blind randomised design is nearly always
preferable (see Chapter 13), but not always achievable. If the treatment is
an intervention, such as a surgical procedure it might be impossible to prevent
individuals knowing which treatment they are receiving but it should be pos-
sible to shield their assessors from knowing. We also discuss methods of
randomisation and other design issues in Chapter 13.
1.6 FURTHER READING 11
Laboratory experiments
Medical investigators often appreciate the effect that biological variation has
in patients, but overlook or underestimate its presence in the laboratory. In
dose–response studies, for example, it is important to assign treatment at
random, whether the experimental units are humans, animals or test tubes.
A statistician can also advise on quality control of routine laboratory
measurements and the measurement of within- and between-observer
variation.
Displaying data
A well-chosen figure or graph can summarise the results of a study very con-
cisely. A statistician can help by advising on the best methods of displaying
data. For example, when plotting histograms, choice of the group interval can
affect the shape of the plotted distribution; with too wide an interval impor-
tant features of the data will be obscured; too narrow an interval and random
variation in the data may distract attention from the shape of the underlying
distribution. Advice on displaying data is given in Chapters 2 and 3.
1.7 Exercises
1. Consider a survey of nurses’ opinions of their working conditions. What
type of variables are: (i) length of service (ii) staff grade (iii) age (iv) salary
(v) number of patients seen in a day (vi) possession of a degree.
2. What differences do you think are there in a discrete measurement such
as shoe size, and a discrete measurement such as family size?
3. Many continuous variables are dichotomised to make them easier to
understand e.g. obesity (body mass index >30 kg/m2) and anaemia
(haemoglobin level <10 g/dl). What information is lost in this process? If
you were told that a patient was anaemic, what further information would
you want before treating the patient? How does a label, such as anaemia,
help?
2 Describing and
displaying categorical
data
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
14 DESCRIBING AND DISPLAYING CATEGORICAL DATA
Summary
This chapter illustrates methods of summarising and displaying binary and
categorical data. It covers proportions, risk and rates, relative risk, and odds
ratios. The importance of considering the absolute risk difference as well as
the relative risk is emphasized. Data display covers contingency tables, bar
charts and pie charts.
Rates always have a time period attached. If 600 000 people in the UK
die in one year, out of a population of 60 000 000, the death rate is
600 000/60 0000 000 or 0.01 deaths per person per year. This is known as the
crude death rate (crude because it makes no allowance for important
factors such as age). Crude death rates are often expressed as deaths per
thousand per year, so the crude death rate is 10 deaths per thousand per
year, since it is much easier to imagine 1000 people, of whom 10 die, than
it is 0.01 deaths per person! We will discuss these issues in more details in
Section 12.2.
Table 2.1 Type of delivery for 98 babies admitted to a special care baby unit (Simpson,
2004)
Type of delivery Frequency Percentage
Table 2.2 Type of delivery and gender of 98 babies admitted to a special care baby unit
(Simpson, 2004)
Type of delivery Gender
Male Female
n (%) n (%)
Test Control
Positive a b
Negative c d
a+c b+d
The ways of summarising the data presented in Table 2.3 are given below.
RR = pTest pControl .
Each of the above measures summarises the study outcomes, and the one
chosen may depend on how the test treatment behaves relative to the control.
Commonly, one may chose an absolute risk difference for a clinical trial and
a relative risk for a prospective study. In general the relative risk is indepen-
dent of how common the risk factor is. Smoking increases one’s risk of lung
cancer by a factor of 10, and this is true in countries with a high smoking
prevalence and countries with a low smoking prevalence. However, in a clini-
cal trial, we may be interested in what reduction in the proportion of people
with poor outcome a new treatment will make.
18 DESCRIBING AND DISPLAYING CATEGORICAL DATA
Table 2.4 Smoking cessation rates at one year in patients with coronary heart disease
Stopped Intervention Control
Smoking
n % n %
Yes 57 57 44 37
No 43 43 74 63
100 100 118 100
From Quist-Paulsen and Gallefoss (2003). Randomised controlled trial of smoking cessation inter-
vention after admission for coronary heart disease. British Medical Journal, 327, 1254–1257: repro-
duced by permission of the BMJ Publishing Group.
ORTest Control = ⎛ ⎞ ⎛ ⎞ = .
a b ad
⎝ c ⎠ ⎝ d ⎠ bc
When the probability of an event happening is rare, the odds and probabili-
ties are close, because then a is much smaller than c and so a/(a + c) is
approximately a/c and b is much smaller than d and so b/(b + d) is approxi-
mately b/d. Thus the OR approximates the RR when the successes are
rare (say with a maximum incidence less than 10% of either pTest or pControl)
Sometime the odds ratio is referred to as ‘the approximate relative risk’.
The approximation is demonstrated in Table 2.5.
Yes No
One point about the OR that can be seen immediately from the formula is that
the OR for Failure as opposed to the OR for Success in Table 2.3 is given by
OR = bc/ad. Thus the OR for Failure is just the inverse of the OR for Success.
Thus in the cannabis and psychosis study, the odds ratio of not developing
psychosis for the cannabis group is 1/1.79 = 0.56. In contrast the relative risk
of not developing psychosis is (1 − 0.26)/(1 − 0.16) = 0.88, which is not the
same as the inverse of the relative risk of developing psychosis for the
cannabis group which is 1/1.625 = 0.62.
This symmetry of interpretation of the OR is one of the reasons for its
continued use.
Figure 2.1 Bar chart showing type of delivery for 98 babies admitted to a special care
baby unit (Simpson, 2004). Reproduced by permission of AG Simpson
22 DESCRIBING AND DISPLAYING CATEGORICAL DATA
Figure 2.2 Pie chart showing type of delivery for 98 babies admitted to a special care
baby unit (Simpson, 2004). Reproduced by permission of AG Simpson
Simpson (2004) study. Along the horizontal axis are the different delivery
categories whilst on the vertical axis is percentage. Each bar represents the
percentage of the total population in that category. For example, examining
Figure 2.1, it can be seen that the percentage of participants who had a stan-
dard vaginal delivery was about 39%.
Figure 2.2a shows the same data displayed as a pie chart. One often sees
pie charts in the literature. However, generally they are to be avoided as they
can be difficult to interpret particularly when the number of categories
becomes greater than five. In addition, unless the percentages in the individ-
ual categories are displayed (as here) it can be much more difficult to esti-
mate them from a pie chart than from a bar chart. For both chart types it is
important to include the number of observations on which it is based, par-
ticularly when comparing more than one chart. Neither of these charts should
be displayed in three dimensions (see Figure 2.2b for a three-dimensional pie
chart). Three-dimensional charts feature in many spreadsheet packages, but
are not recommended since they distort the information presented. They
make it very difficult to extract the correct information from the figure, and,
for example in Figure 2.2b the segments which appear nearer the reader are
over emphasised.
If the sample is further classified into whether or not the baby is a boy or
a girl then it becomes impossible to present the data as a single pie or bar
chart. We could present the data as two separate pie charts or bar charts side
by side but it is preferably to present the data in one graph with the same
scales and axes to make the visual comparisons easier.
In this case we could present the data as a clustered bar chart as shown in
Figure 2.3. This clearly shows that there is a difference in the type of delivery
experienced by mothers with male babies compared to female babies. Mothers
with a female baby were more likely to have a normal vaginal delivery than
mothers with a male baby. If we had used the actual counts on the vertical
2.3 POINTS WHEN READING THE LITERATURE 23
Figure 2.3 Clustered bar chart showing type of delivery by gender for 98 babies admitted
to a special care baby unit (Simpson, 2004). Reproduced by permission of AG Simpson
axis, then because of the different sizes of the two groups, here, 45 male and
53 female babies, this difference in frequencies of type of delivery between
the two groups may not have been as obvious.
If you do use the relative frequency scale as we have, then it is recom-
mended good practice to report the actual total sample sizes for each group
in the legend. In this way, given the total sample size and relative frequency
(from the height of the bars) we can work out the actual numbers of mothers
with the different types of delivery.
In tables:
1. If percentages are shown, is it clear whether they add across rows or down
columns.
2. Percentages should not have decimals if the number of subjects in total is
less than 100.
Summary statistics:
1. If a relative risk is quoted, what is the absolute risk difference? Is this a
very small number? Beware of reports that only quote relative risks and
give no hint of the absolute risk!
2. If an odds ratio is quoted, is it a reasonable approximation to the relative
risk? (Ask what the size of the risk in the two groups are.)
2.4 Exercises
1. The blood group of 55 women diagnosed as suffering from thromboem-
bolic disease and 145 healthy women are displayed in Table 2.7.
A 32 51 83
B 8 19 27
AB 6 5 11
O 9 70 79
Total 55 145 200
(i) Display the blood group data for the 55 thromboembolic women as a
bar chart.
(ii) Display the blood group data for the 55 thromboembolic women and
145 healthy women using a clustered bar chart. Can you see if there is
a difference in the blood groups between the thromboembolic women
and healthy women?
2. Ninety-nine pregnant women, with dystocia (difficult childbirth or labour),
were allocated at random to receive immersion in water in a birth pool
(Intervention group: Labour in water 49 women) or standard augmen-
tation for dystocia (Control group: Augmentation 50 women) in a
2.4 EXERCISES 25
Table 2.8 Epidural analgesia data from a randomised controlled trial of labouring in
water compared with standard augmentation for management of dystocia in first stage of
labour (Cluett et al, 2004)
Epidural analgesia at Intervention Control
any stage of labour (Labour in water) (Augmentation)
Yes 23 33
No 26 17
Total 49 50
(i) What is the proportion of women that had an epidural in each of the
two groups?
(ii) What is the relative risk of the use of an epidural for the Labour in
water women compared with the Augmentation women?
(iii) Calculate the OR of epidural for the Labour in water women com-
pared with Augmentation women. Compare this estimated OR with
the RR estimate from part ii: what do you notice?
(iv) Find the absolute risk difference for the use of an epidural for Labour
in water compared to Augmentation.
3. A newspaper headline states that a new drug for early stage breast cancer
reduces the risk of recurrence of the disease by 50%. What other informa-
tion would you like before deciding to take the drug?
This page intentionally left blank
3 Describing and
displaying quantitative
data
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
28 DESCRIBING AND DISPLAYING QUANTITATIVE DATA
Summary
This chapter discusses the choice and method of calculation of measures of
location and variation. We cover means, medians, modes, range, standard
deviation and inter-quartile range. We also illustrate methods of graphical
and tabular display for continuous data.
Measures of location
Mean or average The arithmetic mean or average of n observations x
(pronounced x bar) is simply the sum of the observations divided by their
number; thus:
∑
n
Sum of all sample values i =1
xi
x = = .
Size of sample n
In the above equation, xi represents the individual sample values and Σni=1xi
their sum. The Greek letter ‘Σ’ (sigma) is the Greek capital ‘S’ and stands
for ‘sum’ and simply means ‘add up the n observations xi from the 1st to the
last (nth)’.
The major advantage of the mean is that it uses all the data values, and is,
in a statistical sense, efficient. The mean also characterises some important
statistical distributions to be discussed in Chapter 4. The main disadvantage
of the mean is that it is vulnerable to what are known as outliers. Outliers
are single observations which, if excluded from the calculations, have notice-
able influence on the results. For example if we had entered ‘21’ instead of
‘2.1’ in the calculation of the mean, we would find the mean changed from
1.50 kg to 7.98 kg. It does not necessarily follow, however, that outliers should
be excluded from the final data summary, or that they result from an errone-
ous measurement.
If the data are binary, that is nominal data that can only have two values
which are coded 0 or 1, then x is the proportion of individuals with value 1,
and this can also be expressed as a percentage. Thus, in Simpson’s data, if 15
out of 98 babies were very low birthweight (<1 kg) and if this is coded as a
‘1’ in the data set, and a ‘0’ coded for those above 1 kg, then the mean of this
variable is 0.15 or 15%.
Median The median is estimated by first ordering the data from smallest to
largest, and then counting upwards for half the observations. The estimate
of the median is either the observation at the centre of the ordering in the
case of an odd number of observations, or the simple average of the middle
two observations if the total number of observations is even.
1 1.2
2 1.3
3 1.4 median
4 1.5
5 2.1
The median has the advantage that it is not affected by outliers, so for
example the median in the data would be unaffected by replacing ‘2.1’ with
‘21’. However, it is not statistically efficient, as it does not make use of all the
individual data values.
Mode A third measure of location is termed the mode. This is the value
that occurs most frequently, or, if the data are grouped, the grouping with
the highest frequency. It is not used much in statistical analysis, since its value
depends on the accuracy with which the data are measured; although it
may be useful for categorical data to describe the most frequent category.
However, the expression ‘bimodal’ distribution is used to describe a distri-
bution with two peaks in it. This can be caused by mixing two or more
populations together. For example, height might appear to have a bimodal
distribution if one had men and women in the population. Some illnesses may
raise a biochemical measure, so in a population containing healthy individu-
als and those who are ill one might expect a bimodal distribution. However,
some illnesses are defined by the measure of, say obesity or high blood pres-
sure, and in these cases the distributions are usually unimodal with those
above a given value regarded as ill.
Quartiles The quartiles, namely the lower quartile, the median and the
upper quartile, divide the data into four equal parts; that is there will be
approximately equal numbers of observations in the four sections (and exactly
equal if the sample size is divisible by four and the measures are all distinct).
The quartiles are calculated in a similar way to the median; first order the
data and then count the appropriate number from the bottom. The interquar-
tile range is a useful measure of variability and is given by the difference of
3.1 SUMMARISING CONTINUOUS DATA 31
the lower and upper quartiles. The interquartile range is not vulnerable to
outliers, and whatever the distribution of the data, we know that 50% of them
lie within the interquartile range.
1 1.51
2 1.55
Lower quartile (25th percentile)
3 1.79
4 2.10
5 2.18
Median (50th percentile) Inter quartile
6 2.22
range
7 2.37
8 2.40
Upper quartile (75th percentile)
9 2.81
10 2.85
∑ (x − x )i
2
i =1
SD = s = .
n−1
32 DESCRIBING AND DISPLAYING QUANTITATIVE DATA
The expression Σni=1(xi − x)2 may look complicated, but it is easier to under-
stand when thought of in stages. From each x value subtract the mean x,
square this difference, then add each of the n squared differences. This sum
is then divided by (n − 1). This expression is known as the variance. The
variance is expressed in square units, so we take the square root to return to
the original units, which gives the standard deviation, s. Examining this
expression it can be seen that if all the x’s were the same, then they would
equal x and so s would be zero. If the x’s were widely scattered about x, then
s would be large. In this way s reflects the variability in the data. The standard
deviation is vulnerable to outliers, so if the 2.1 was replaced by 21 we would
get a very different result.
Square of
Subject xi x xi − x ( x i − x )2
1 1.2 1.5 –0.30 0.09
Variance = 0.50/4
n 5 Standard
We first find the mean to be 1.5 kg, then subtract this from each of the
five observations to get the ‘Differences from the mean’. Note that the
sum of this column is zero. This will always be the case: the positive devia-
tions from the mean cancel the negative ones.
A convenient method of removing the negative signs is by squaring the
deviations, which is given in the next column, which is then summed to
get 0.50 kg2. Note that the bulk of this sum (72%) is contributed by one
observation, the value 2.1 from subject 5, which is the observation furthest
from the mean. This illustrates that much of the value of an SD is derived
from the outlying observations. We now need to find the average squared
deviation. Common sense would suggest dividing by n, but it turns out
that this actually gives an estimate of the population variance which is too
small. This is because we use the estimated mean x in the calculation in
place of the true population mean. In fact we seldom know the population
mean so there is little choice but for us to use its estimated value, x, in
the calculation (see Chapter 6). The consequence is that it is then better
to divide by what are known as the degrees of freedom, which in this case
is n − 1, to obtain the SD.
Why is the standard deviation useful? From Simpson’s data, the mean and
standard deviation of the birthweight of the 98 babies are 1.31 kg and 0.424 kg,
respectively. It turns out in many situations that about 95% of observations
will be within two standard deviations of the mean. This is known as a refer-
ence interval and it is this characteristic of the standard deviation which
makes it so useful. It holds for a large number of measurements commonly
made in medicine. In particular it holds for data that follow a Normal distri-
bution (see Chapter 4). For this example, this implies that the majority of
babies will weigh between 0.46 and 2.16 kg.
Standard deviation is often abbreviated to SD in the medical literature.
Dot plots
The simplest method of conveying as much information as possible is to
show all of the data and this can be conveniently carried out using a
dot plot.
Figure 3.1 Dot plot showing birth weight by type of delivery for 98 babies admitted to
a special care baby unit (data from Simpson, 2004)
Histograms
The patterns may be revealed in large data set of a numerically continuous
variable by forming a histogram with them. This is constructed by first divid-
ing up the range of variable into several non-overlapping and equal intervals,
classes or bins, then counting the number of observations in each. A histo-
gram for all the birthweights in the Simpson (2004) data is shown in Figure
3.2. In this histogram the intervals corresponded to a width of 0.2 kg. The
area of each histogram block is proportional to the number of subjects in the
particular birthweight category concentration group. Thus the total area in
the histogram blocks represents the total number of babies.
Relative frequency histograms allow comparison between histograms
made up of different numbers of observations which may be useful when
studies are compared.
The choice of the number and width of intervals or bins is important. Too
few intervals and much important information may be smoothed out; too
many intervals and the underlying shape will be obscured by a mass of con-
36 DESCRIBING AND DISPLAYING QUANTITATIVE DATA
Figure 3.2 Histogram of birthweight of 98 babies admitted to a special care baby unit
(data from Simpson, 2004)
fusing detail. It is usual to choose between 5 and 15 intervals, but the correct
choice will be based partly on a subjective impression of the resulting histo-
gram. Histograms with bins of unequal interval length can be constructed but
they are usually best avoided.
Box-whisker plot
If the number of points is large, a dot plot can be replaced by a box-whisker
plot which is more compact than the corresponding histogram.
Outlying points,
more than 1.5 Maximum
box widths from
edge of box
Median
Whiskers extend
to extreme data
points that are
not outliers Minimum
Figure 3.3 Box-whisker plot of birthweight by method of delivery for 98 babies admitted
to a special care baby unit (data from Simpson, 2004)
Scatter plots
When one wishes to illustrate a relationship between two continuous vari-
ables, a scatter plot of one against the other may be informative.
Figure 3.4 Scatter plot of birthweight by maternal age, for 98 babies admitted to a special
care baby unit (data from Simpson, 2004)
Measures of symmetry
One important reason for producing dot plots and histograms is to get some
idea of the shape of the distribution of the data. In Figure 3.2 there is a (slight)
suggestion that the distribution of birthweight is not symmetric; that is if the
distribution were folded over some central point, the two halves of the distri-
bution would not coincide. When this is the case, the distribution is termed
skewed. A distribution is right (left) skewed if the longer tail is to the right
(left) (see Figure 3.5). If the distribution is symmetric then the median and
mean will be close. If the distribution is skewed then the median and inter-
quartile range are in general more appropriate summary measures than the
mean and standard deviation, since the latter are sensitive to the skewness.
For Simpson’s birthweight data the mean from the 98 babies is 1.31 kg and
the median is 1.34 kg so we conclude the data are reasonably symmetric. One
is more likely to see skewness when the variables are constrained at one end
or the other. For example waiting time or time in hospital cannot be negative,
but can be very large for some patients and relatively short for the majority.
3.3 WITHIN-SUBJECT VARIABILITY 39
Median
Median
Mean
Mode
Mean
Mode
In the data from Xu et al (2004), the median age at menopause for cases is
50.1 years, but this is not exactly mid way between the first quartile and third
quartiles of 48.6 and 52.5 years respectively, thus indicating a skewed rather
than a symmetric distribution.
A common skewed distribution is annual income, where a few high earners
pull up the mean, but not the median. In the UK about 68% of the popula-
tion earn less than the average wage, that is, the mean value of annual pay
is equivalent to the 68th percentile on the income distribution. Thus many
people who earn more than the earnings of 50% (the median) of the popula-
tion will still feel under paid!
Figure 3.6 Self-assessed resting carotid pulse rate as recorded every 5 minutes for 1
minute for an hour
If another subject had also done this experiment, we could calculate their
within-subject variation as well, and perhaps compare the variabilities for the
two subjects using these summary measures.
Successive within-subject values are unlikely to be independent, that
is, consecutive values will be dependent on values preceding them. For
example, if a patient with heart disease records their pulse rate, then if pulse
rate is low on one day it is likely to be low the next. This does not imply
that the pulse will be low, only that it is a good bet that it will be. In contrast,
examples can be found in which high values of pulse rate are usually
followed by lower values and vice versa. With independent observations,
the pulse rate on one day gives no indication or clue as to the pulse rate
on the next.
It is clear from Figure 3.6 that the pulse rates are not constant over the
observation period. This is nearly always the case when medical observations
or measurements are taken over time. Such variation occurs for a variety of
3.3 WITHIN-SUBJECT VARIABILITY 41
reasons. For example, pulse rate may depend critically on when the patient
last exercised, medication, pacemakers or even on the time of day if some
diurnal rhythm is influencing levels. In addition, there may be variability in
the actual measurement of pulse rate, induced possibly by the patient’s per-
ception of pulse rate itself being subject to variation. There may be observer-
to-observer variation if the successive pulse rates were recorded by different
personnel rather than always the patient. The possibility of recording errors
in the laboratory, transcription errors when conveying the results to the clinic
or for statistical analysis, should not be overlooked in appropriate circum-
stances. When only a single observation is made on one patient at one time
only, then the influences of the above sources of variation are not assessable,
but may nevertheless all be reflected to some extent in the final entry in the
patient’s record.
Suppose successive observations on a patient taken over time fluctuate
around some more or less constant pulse rate, then the particular level may
be influenced by factors within the patient. For example, pulse rates may be
affected by the presence of a viral infection which is unrelated to the cause
of the heart disease itself. Levels may also be influenced by the severity of
the underlying condition and whether concomitant treatment is necessary for
the patient. Levels could also be influenced by other factors, for example,
alcohol, tobacco consumption and diet. The cause of some of the variation
in pulse rates may be identified and its effect on the variability estimated.
Other variation may have no obvious explanation and is usually termed
random variation. This does not necessarily imply there is no cause of this
component of the variation but rather that its cause has not been identified
or is being ignored.
Different patients with heart disease observed in the same way may have
differing average levels of pulse rate from each other but with similar patterns
of variation about these levels. The variation in mean pulse rate levels from
patient to patient is termed between-subject variation.
Observations on different subjects are usually regarded as independent.
That is, the data values on one subject are not influenced by those obtained
from another. This, however, may not always be the case, particularly with
subjective measures in which different patients may collaborate in recording
their pulse rate.
In the investigation of total variability it is very important to distinguish
within-subject from between-subject variability. In a study there may be
measures made on different individuals and also repeatedly on the same
individual. Between- and within-subject variation will always be present in
any biological material, whether animals, healthy subjects, patients or histo-
logical sections. The experimenter must be aware of possible sources which
contribute to the variation, decide which are of importance in the intended
study, and design the study appropriately.
42 DESCRIBING AND DISPLAYING QUANTITATIVE DATA
3.4 Presentation
Graphs
In any graph there are clearly certain items that are important. For example,
scales should be labelled clearly with appropriate dimensions added.
The plotting symbols are also important; a graph is used to give an im-
pression of pattern in the data, so bold and relatively large plotting
symbols are desirable. By all means identify the position of the point
with a fine pen but mark it so others can see. This is particularly impor-
tant if it is to be reduced for publication purposes or presented as a slide
in a talk.
A graph should never include too much clutter; for example, many
overlapping groups each with a different symbol. In such a case it is
usually preferable to give a series of graphs, albeit smaller, in several
panels. The choice of scales for the axes will depend on the particular
data set. If transformations of the axes are used, for example, plotting
on a log scale, it is usually better to mark the axes using the original
units as this will be more readily understood by the reader. Breaks in
scales should be avoided. If breaks are unavoidable under no circumstances
must points on either side of a break be joined. If both axes have the
same units, then use the same scale for each. If this cannot be done
easily, it is sensible to indicate the line of equality, perhaps faintly in the
figure. False impressions of trend or lack of it, in a time plot can sometimes
be introduced by omitting the zero point of the vertical axis. This may
falsely make a mild trend, for example a change from 101 to 105, into
an apparently strong trend (seemingly as though from 1 to 5). There
must always be a compromise between clarity of reproduction that is filling
the space available with data points and clarity of message. Appropriate
measures of variability should also be included. One such is to indicate
the range of values covered by two standard deviations each side of a
plotted mean.
It is important to distinguish between a bar-chart and a histogram. Bar-
charts display counts in mutually exclusive categories, and so the bars should
have spaces between them. Histograms show the distribution of a continuous
variable and so should not have spaces between the bars. It is not acceptable
to use a bar-chart to display a mean with standard error bars (see Chapter
6). These should be indicated with a data point surrounded with errors bars,
or better still a 95% confidence interval.
With currently available graphics software one can now perform extensive
exploration of the data, not only to determine more carefully their structure,
but also to find the best means of summary and presentation. This is usually
worth considerable effort.
3.6 EXERCISES 43
Tables
Although graphical presentation is very desirable it should not be over-
looked that tabular methods are very important (see Table 1.1). In particular,
tables can give more precise numerical information than a graph, such as
the number of observations, the mean and some measure of variability
of each tabular entry. They often take less space than a graph containing
the same information. Standard statistical computer software can be easily
programmed to provide basic summary statistics in tabular form on many
variables.
3.6 Exercises
1. The age (in years) of a sample of 20 motor cyclists killed in road traffic
accidents is given below.
18 41 24 28 71 52 15 20 21 31
16 24 33 44 20 24 16 64 24 32
(i) Draw a dot plot and histogram. Is this distribution symmetric or
skewed?
(ii) Calculate the mean, median and mode.
(iii) Calculate the range, inter quartile range and standard deviation.
Which of these is better to describe the variability of these data?
44 DESCRIBING AND DISPLAYING QUANTITATIVE DATA
2. The table below shows the height of 12 fathers and their fully-grown
sons.
190 189
184 186
183 180
182 179
179 187
178 184
175 183
174 171
170 170
168 178
165 174
164 165
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
46 PROBABILITY AND DECISION MAKING
Summary
Probability is defined in terms of either the long-term frequency of events,
as model based or as a subjective measure of the certainty of an event hap-
pening. Examples of each type are given. The ideas associated with the study
of probability are illustrated in the context of diagnostic tests. The two major
elements associated with the clinical value of diagnostic tests are their sensi-
tivity and their specificity. The concepts of independent events and mutually
exclusive events are discussed, and the use of Bayes’ theorem is demon-
strated. When the result of a diagnostic test is a continuous variable, there
may be difficulty in deciding an appropriate cut-off point to categorise those
with and without the condition of interest, and relative operating character-
istic (ROC) curves can be used to help with the decision.
Types of probability
Figure 4.2 Crude mortality rates in the United Kingdom from 1982 to 2002 (from ONS,
2004). Crown copyright material is reproduced with the permission of the Controller of
OPSI and the Queen’s Printer
becomes more certain of which is the true situation – the patient has heart
disease or the patient does not.
The three types of probability all have the following properties.
• All probabilities lie between 0 and 1.
• When the outcome can never happen the probability is 0.
• When the outcome will definitely happen the probability is 1.
Table 4.1 Results of NT-proBNP assay in the general population over 45 and those with
a previous diagnosis of heart failure (after Hobbs et al, 2002)
Confirmed diagnosis of heart failure
the sensitivity would be 70/206 = 0.34, which is unchanged from the previous
value. A similar result is obtained for specificity.
Sensitivity and specificity are useful statistics because they will yield
consistent results for the diagnostic test in a variety of patient groups with
different disease prevalences. This is an important point; sensitivity and
specificity are characteristics of the test, not the population to which the test
is applied. Although indeed they are independent of disease prevalence, in
practice if the disease is very rare, the accuracy with which one can estimate
the sensitivity will be limited.
Two other terms in common use are: the false negative rate (or probability
of a false negative) which is given by c/(a + c) = 1 − Sensitivity, and
the false positive rate (or probability of a false positive) or b/(b + d) =
1 − Specificity.
These concepts are summarised in Table 4.2. In such tables it is important
for consistency always to put true diagnosis on the top, and test result down
the side. Since sensitivity = 1 − Probability(false negative) and specificity =
1 − Probability(false positive), a possibly useful mnemonic to recall this is
that ‘sensitivity’ and ‘negative’ have ‘n’s in them and ‘specificity’ and
‘positive’ have ‘p’s in them.
for the patient is adjusted upwards to the probability of disease with a posi-
tive test result which equals 35/(35 + 7) = 35/42 = 0.833.
This gives the predictive value of a positive test or p(D+|T+). The predictive
value of a negative test is p(D−|T−).
From Table 4.1 the predictive value of a positive NT-proBNP assay is
35/42 = 0.833 and the predictive value of a negative assay is 300/368 = 0.815.
These values are affected by the prevalence of the disease. For example, if
those with the disease doubled in Table 4.1, then the predictive value of a
positive assay would then become 70/(70 + 7) = 0.909 and the predictive value
of a negative assay 300/(300 + 136) = 0.688.
How does the predictive value p(D+|T+) relate to sensitivity p(T+|D+)?
Clearly the former is what the clinician requires and the latter is what is
supplied with the test. To determine this we need some more details con-
cerned with probability.
p ( A and B) = p ( A B) × p ( B).
p (T + and D+ ) = p (T + D+ ) × p ( D+ ).
Now p(T+|D+) = 0.340 is the sensitivity of the test and p(D+) = 0.251 is the
prevalence of heart failure and so p(T+ and D+) = 0.340 × 0.251 = 0.085, as
before.
It does not matter if the labelling of disease and test had been reversed,
that is adopting the convention that A occurs when heart failure is pre-
sent and B occurs when the assay is positive, and so it is clear that
p(A and B) = p(B and A). From the multiplication rule it follows that
p ( A B) p( B) = p ( B A) p( A).
4.3 BAYES’ THEOREM 53
p ( A B) p( B)
p ( B A) = .
p ( A)
p (T + D+ ) p ( D+ )
p ( D+ T + ) = .
p (T + )
1 × 0.001
p ( D+ T + ) = = 0.02.
0.05095
Likelihood ratio
The clear simplicity of diagnostic test data, particularly when presented as a
2 × 2 table, (see Table 4.1), is confounded by the many ways of reporting the
results (Table 4.2). The likelihood ratio (LR) is a simple measure combining
sensitivity and specificity defined as
p (T + D+ ) Sensitivity
LR = =
p (T + D − ) 1 − Specificity
It can be shown that Bayes’ theorem can be summarised by:
Odds of disease after test = Odds of disease before test × LR.
Table 4.3 Illustration of how predictive value changes with prevalence of the disease in
question
Initial probability of Predictive value Predictive value Useful test?
disease (prevalence) of positive test of negative test
p ( D+ and T + ) = p (T + ) × p ( D+ ).
p ( A or B) = p ( A) + p ( B).
It also follows that if A and B are mutually exclusive, they cannot occur
together, and so
p ( A and B) = 0.
It is easy to confuse independent events and mutually exclusive events, but
one can see from the above that mutually exclusive events cannot be inde-
pendent as if you have one you cannot have the other(s).
Severe Mild
<8 22 5 27
≥8 5 8 13
Total 27 13 40
58 PROBABILITY AND DECISION MAKING
A perfect diagnostic test would be one with no false negative results (that
is sensitivity of 1) or false positive results (specificity of 1) and would be
represented by a line that started at the origin and went up the y-axis to a
sensitivity of 1, and then across to a specificity of 0. A test that produces false
positive results at the same rate as true positive results would produce a ROC
curve on the diagonal line y = x. Any reasonable diagnostic test will display
a ROC curve in the upper left triangle of Figure 4.3. When more than one
laboratory test is available for the same clinical problem one can compare
ROC curves, by plotting both on the same figure.
free, which can lead to inflated specificity estimates. The best way to avoid
such bias is to construct a prospective study in which all patients receive
definite verification of disease status.
3. How have the investigators coped with specimens they were not able to
interpret? If the reason for failure to interpret is essentially random, and
is unrelated to disease status, then the test characteristics can be estimated.
If it is related to disease status then these results cannot be ignored when
interpreting the results. In any case, the proportion of non-interpretable
results should be reported in any diagnostic test efficacy study, since it is
an important consideration in the cost-effectiveness of the test.
4. Did the investigator who provided the diagnostic test result know other
clinical results about the patients? Diagnostic tests are usually carried out
during or, in conjunction with, the clinical examination. Where there is an
element of subjectivity in a test, such as an ECG stress test, a remarkable
improvement in sensitivity can be shown when the investigator is aware
of other symptoms of the patient!
5. Was the reproducibility of the test result determined? This could be done
by repeating the test with different operators, or at different times, or with
different machines, depending on the circumstances.
6. Did the patients who had the test actually benefit as a consequence of the
test?
7. How good is the gold standard? An ideal gold standard either may not
exist or be very expensive or invasive and therefore not carried out. In
this case, the test used as the gold standard may be subject to error, which
turn will make the estimates of sensitivity and specificity problematical.
4.6 Exercises
Decide whether the answers to the following questions are true or false.
1. In a group of patients presenting to a hospital casualty department with
abdominal pain, 30% of patients have acute appendicitis. Seventy per
cent of patients with appendicitis have a temperature greater than 37.5°C,
40% of patients without appendicitis have a temperature greater
than 37.5°C.
(a) The sensitivity of temperature greater than 37.5°C as a marker for
appendicitis is 21/49.
(b) The specificity of temperature greater than 37.5°C as a marker for
appendicitis is 42/70.
(c) The positive predictive value of temperature greater than 37.5°C as a
marker for appendicitis is 21/30.
(d) The predictive value of the test might be different in another
population.
4.6 EXERCISES 61
(e) The specificity of the test will depend upon the prevalence of appen-
dicitis in the population to which it is applied.
2. A new laboratory test is developed for the diagnosis of rectal cancer.
(a) A sensitivity of 85% implies that 15% of patients with rectal cancer
will give negative findings when tested.
(b) A specificity of 95% implies that 5% of patients with a negative test
will actually have rectal cancer.
(c) A positive predictive value of 75% implies that 25% of patients with
a positive test will not have rectal cancer.
(d) The sensitivity of the test will depend upon the prevalence of rectal
cancer in the population to which it is applied.
(e) The predictive value of the test will depend upon the prevalence of
rectal cancer in the population to which it is applied.
3. Three tests (A, B and C) for the diagnosis of breast cancer in premeno-
pausal women were assessed against a ‘gold standard’ taken to be 100%
accurate. Their sensitivities were A 90%, B 85%, C 80%. Their specifici-
ties were A 100%, B 90%, C 95%. All three tests carried the same cost,
and none was associated with any side-effects. It follows that:
(a) In these circumstances test A will always be preferable to test B.
(b) In these circumstances test B will always be preferable to test C.
(c) Test B detects a higher proportion of cases than test C.
(d) There are no false positive results with test A.
(e) The predictive value of test B will depend on the prevalence of disease
in the population to which it is applied.
This page intentionally left blank
5 Distributions
5.1 Introduction 64
5.2 The Binomial distribution 64
5.3 The Poisson distribution 66
5.4 Probability for continuous outcomes 68
5.5 The Normal distribution 69
5.6 Reference ranges 73
5.7 Points when reading the literature 75
5.8 Technical details 75
5.9 Exercises 76
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
64 DISTRIBUTIONS
Summary
Three theoretical statistical distributions, the Binomial, Poisson and Normal
are described. The properties of the Normal distribution and its importance
are stressed and its use in calculating reference intervals is also discussed.
5.1 Introduction
In the previous chapter we defined the probability that an event will happen
under given circumstances as the proportion of repetitions of those circum-
stances in which the event would occur in the long run. For example, if we toss
a coin it comes down either heads or tails. If we carry on tossing our coin, we
should get several heads and several tails. If we go on doing this for long
enough, then we would expect to get as many heads as we do tails. So the
probability of a head being thrown is a half, because in the long run a head
should occur on half the throws. The number of heads which might arise in
several tosses of the coin is called a random variable that is a variable which
can take more than one value each with given probabilities attached to them.
If we toss a coin the two possibilities; Head (H) – scored 1, or Tail (T) – scored
0, are mutually exclusive and these are the only events which can happen. If we
let X be a random variable which is the number of heads shown on a single toss
and is therefore either 1 or 0, then the probability distribution, for X is: Probabil-
ity (Head) = ½; Probability (Tail) = ½ and is shown graphically in Figure 5.1a.
What happens if we toss two coins at once? We now have four possible
events: HH, HT, TH and TT. There are all equally likely and each has prob-
ability ¼. If we let Y be the number of heads then Y has three possible values
0, 1 and 2. Y = 0 only when we get TT and has probability ¼. Similarly
Y = 2 only when we get HH, so has probability ¼. However Y = 1 either when
we get HT or TH and so has probability ¼ + ¼ = ½. The probability distribu-
tion for Y is shown in Figure 5.1b.
In general, we can think of the tosses of the coin as trials, each of which
can have an outcome of success (head) or failure (tail). These distributions
are all examples of what is known as the Binomial distribution. In this chapter
we will discuss three distributions that are the backbone of medical statistics:
the Binomial, the Poisson and the Normal. Each distribution has a formula,
known as the probability distribution function. This gives the probability of
observing an event, and the formulas are given in Section 5.7. The formulae
contain certain constants, known as parameters, which identify the particular
distribution, and from which various characteristics of the distribution, such
as its mean and standard deviation, can be calculated.
(a) Probability distribution for the number (b) Probability distribution for the number
of heads (X) shown in one toss of a coin of heads (Y) shown in two tosses of a coin
Probability
heads shown on a single 0.4 number of heads 0.4
toss: 0.3 shown in two tosses: 0.3
– Prob (X= 0) =0.5; 0.2 0.2
– Prob (Y=0) = 0.25;
– Prob (X= 1) =0.5. 0.1 0.1
0
– Prob (Y=1) = 0.50;
0
0 1 – Prob (Y=2) = 0.25. 0 1 2
Num ber of Heads (X) Num ber of Heads (Y)
0.30 0.20
Probability
Probability
0.25
0.15
0.20
0.15 0.10
0.10
0.05
0.05
0.00
0.00
0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 10
No. of responses (r)
No. of responses (r)
0.12
0.20
0.10
Probability
Probability
0.15 0.08
0.06
0.10
0.04
0.05 0.02
0.00
0.00
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48
Figure 5.2 Binomial distribution for p = 0.25 and various values of n. The horizontal
scale in each diagram shows the value of r the number of successes
number of deaths from lung cancer in a year in a town. We can use this
information to compare observed and expected values, to decide if, for
example, the number of deaths from cancer in an area is unusually high.
Figure 5.3 shows the Poisson distribution for four different means l = 1, 4,
10 and 15. For l = 1 the distribution is very right skewed, for l = 4 the skew-
ness is much less and as the mean increases to l = 10 or 15 it is more sym-
metrical, and looks more like the Binomial distribution in Figure 5.2.
0.40 l =4
0.35 l =1 0.25
0.30 0.20
Probability
0.25
Probability
0.15
0.20
0.15 0.10
0.10
0.05
0.05
0.00 0.00
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
No. of events (r) No. of events (r)
0.14 0.12 l = 15
l = 10
0.12 0.10
0.10
Probability
0.08
Probability
0.08
0.06
0.06
0.04 0.04
0.02 0.02
0.00
0.00
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40
No. of events (r) No. of events (r)
Figure 5.3 Poisson distribution for various values of l. The horizontal scale in each
diagram shows the value of r
68 DISTRIBUTIONS
0 .5 1 1 .5 2 2.5
Birthwe ight (kg)
histogram will start to look like a smooth curve. In these circumstances the
distribution of observations may be approximated by a smooth underlying
curve which is also shown in Figure 5.4. This curve is called a probability
distribution and is the theoretical equivalent of an empirical relative fre-
quency distribution. Probability distributions are used to calculate the prob-
ability that different values will occur; for example, what is the probability
of having a birthweight of 2.0 kg or less? It is often the case with medical data
that the histogram of a continuous variable obtained from a single measure-
ment on different subjects will have a symmetric ‘bell-shaped’ distribution.
Figure 5.5 Distribution of birthweight in 3226 newborn babies (data from O’Cathain
et al, 2002)
70 DISTRIBUTIONS
To distinguish the use of the same word in normal range (which we discuss
later) and Normal distribution we have used a lower and upper case conven-
tion throughout this book.
The histogram of the sample data is an estimate of the population distribution
of birth weights in newborn babies. This population distribution can be esti-
mated by the superimposed smooth ‘bell-shaped’ curve or ‘Normal’ distribution
shown. We presume that if we were able to look at the entire population of
newborn babies then the distribution of birthweight would have exactly the
Normal shape. The Normal distribution has properties as shown in Figure 5.6.
The Normal distribution (Figure 5.6) is completely described by two
parameters: one, m, represents the population mean or centre of the distribu-
tion and the other, s, the population standard deviation. The formula for the
Normal distribution is given as Equation 5.3 (Section 5.8). Populations with
small values of the standard deviation s have a distribution concentrated
close to the centre, m; those with large standard deviation have a distribution
widely spread along the measurement axis (Figure 5.7).
There are infinitely many Normal distributions depending on the values of
m and s. The Standard Normal distribution has a mean of zero and a variance
(and standard deviation) of one and a shape as shown in Figure 5.8.
The formula is given as Equation 5.4 in Section 5.8. If the random variable
X has a Normal distribution with mean, μ and standard deviation, σ, then
X −μ
the standardised Normal deviate z = is a random variable that has a
σ
standard Normal distribution.
The areas under the standard Normal distribution curve have been tabu-
lated (Table 5.1 and Table T1, p. 316). Table 5.1, shows that for a value of z,
that is the number of standard deviations away from the mean of zero, the
area to the left or the right of this value or the combined value. Using Figure
5.8 or Table 5.1, we can note that most of the area, i.e. 68% of the probability
is between −1 and +1 SD, the large majority (95%) between −2 and +2 SD,
and almost all (99%) between −3 and +3.
As can be seen from Table 5.1 using, z values of 1.96, that is, 1.96 SD away
from the mean) then exactly 95% of the Normal distribution lies between
μ − 1.96 × σ and μ + 1.96 × σ .
(a) effect of changing mean (μ 2 > μ 1) (b) effect of changing SD (s2 > s 1)
SD σ1
SD σ SD σ2
μ1 μ2
μ
Figure 5.7 Probability distribution functions of the Normal distributions with different
means and standard deviations
(a) (b)
0.40 0.40
0.30 0.30
Probability density
Probability density
0.20 0.20
0.00 0.00
-4SD -3SD -2SD -1SDMean 1SD 2SD 3SD 4SD -4SD -3SD -2SD -1SD Mean 1SD 2SD 3SD 4SD
31.7% of observations lie outside the mean ± 1 SD 4.6% of observations lie outside the mean ± 2SD
Figure 5.8 Areas (percentages of total probability) under the standard Normal curve
72 DISTRIBUTIONS
0 1.000 0.500
1 0.317 0.159
2 0.046 0.023
3 0.0027 0.0013
1.645 0.10 0.05
1.960 0.05 0.025
2.576 0.01 0.005
Changing the multiplier 1.960 to 2.576, exactly 99% of the Normal distribu-
tion lies in the corresponding interval.
In practice the two parameters of the Normal distribution, μ and σ, must
be estimated from the sample data. For this purpose a random sample from
the population is first taken.
A
birthweight
of 4.5kg
Is between
1 & 2 SD
away from
the mean
3.4kg
2.2 2.8 4.0 4.6
Figure 5.9 Normal distribution curve for birthweight with a mean of 3.4 kg and SD
of 0.6 kg
The Normal distribution also has other uses in statistics and is often used
as an approximation to the Binomial and Poisson distributions. Figure 5.2
shows that the Binomial distribution for any particular value of the parame-
ter p approaches the shape of a Normal distribution as the other parameter
n increases. The approach to Normality is more rapid for values of p near
0.5 than for values near to 0 or 1. Thus, provided n is large enough, a count
may be regarded as approximately Normally distributed with mean np and
SD = [ nπ (1 − π )].
The Poisson distribution with mean l approaches Normality as l increases
(see Figure 5.3). When l is large a Poisson variable may be regarded as
approximately Normally distributed with mean l and SD = λ .
Poisson distribution
Suppose events happen randomly and independently in time at a constant
rate. If the events happen with a rate of l events per unit time, the probability
of r events happening in unit time is
76 DISTRIBUTIONS
exp ( −λ ) λ r
Prob (r events) = 5.2
r!
Normal distribution
The probability density, f(x), or the height of the curve above the x axis (see
Figures 5.5 and 5.6) of a Normally distributed random variable x, is given by
the expression
1 ⎡ ( x − μ )2 ⎤
f (x) = exp ⎢ − , 5.3
σ 2π ⎣ 2σ 2 ⎥⎦
where m is the mean value of x and s is the standard deviation of x. Note that
for the Normal distribution p, is the mathematical constant 3.14159 . . . and
not the parameter of a Binomial distribution.
The probability density simplifies for the Standard Normal distribution,
since m = 0 and s = 1, then the probability density, f(x), of a Normally dis-
tributed random variable x, is
1 ⎡ x2 ⎤
f (x) = exp ⎢ − ⎥. 5.4
2π ⎣ 2⎦
5.9 Exercises
1. A GP estimates that about 50% of her patients have ‘trivial’ problems.
What is the probability that four out of five patients in one evening’s
surgery have trivial problems?
3. The systolic blood pressure of 16 middle age men before exercise has a
Normal distribution with a mean of 141.1 mmHg and a standard deviation
of 13.62 mmHg. What is the probability having a systolic blood pressure
of 160 mmHg or higher?
5.9 EXERCISES 77
6.1 Populations 80
6.2 Samples 81
6.3 The standard error 82
6.4 The Central Limit Theorem 84
6.5 Standard errors for proportions and rates 85
6.6 Standard errors of differences 87
6.7 Confidence intervals for an estimate 89
6.8 Confidence intervals for differences 93
6.9 Points when reading the literature 94
6.10 Technical details 94
6.11 Exercises 96
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
80 POPULATIONS, SAMPLES, STANDARD ERRORS AND CONFIDENCE INTERVALS
Summary
In this chapter the concepts of a population and a population parameter are
described. The sample from a population is used to provide the estimates of
the population parameters. The standard error is introduced and methods
for calculating confidence intervals for population means for continuous data
having a Normal distribution and for discrete data which follow Binomial or
Poisson distributions are given.
6.1 Populations
In the statistical sense a population is a theoretical concept used to describe
an entire group of individuals in whom we are interested. Examples are the
population of all patients with diabetes mellitus, or the population of all
middle-aged men. Parameters are quantities used to describe characteristics
of such populations. Thus the proportion of diabetic patients with nephropa-
thy, or the mean blood pressure of middle-aged men, are characteristics
describing the two populations. Generally, it is costly and labour intensive
to study the entire population. Therefore we collect data on a sample of
individuals from the population who we believe are representative of that
population, that is, they have similar characteristics to the individuals in the
population. We then use them to draw conclusions, technically make infer-
ences, about the population as a whole. The process is represented schemati-
cally in Figure 6.1. So, samples are taken from populations to provide estimates
Population parameter
Population
Confidence
Interval
Sampling mechanism: for population
random sample or parameter
convenience sample
Sample estimate
Sample of population
parameter
Mean m x̄
Standard deviation s s
Proportion p p
Rate l r
6.2 Samples
In some circumstances the sample may consist of all the members of a specifi-
cally defined population. For practical reasons, this is only likely to be the
case if the population of interest is not too large. If all members of the popu-
lation can be assessed, then the estimate of the parameter concerned is derived
from information obtained on all members and so its value will be the popu-
lation parameter itself. In this idealised situation we know all about the
population as we have examined all its members and the parameter is esti-
mated with no bias. The dotted arrow in Figure 6.1 connecting the population
ellipse to population parameter box illustrates this. However, this situation
will rarely be the case so, in practice, we take a sample which is often much
smaller in size than the population under study.
Ideally we should aim for a random sample. A list of all individuals from
the population is drawn up (the sampling frame), and individuals are selected
randomly from this list, that is, every possible sample of a given size in the
population has an equal chance of being chosen. Sometimes, there may be
difficulty in constructing this list or we may have to ‘make-do’ with those
subjects who happen to be available or what is termed a convenience sample.
Essentially if we take a random sample then we obtain an unbiased estimate
of the corresponding population parameter, whereas a convenience sample
82 POPULATIONS, SAMPLES, STANDARD ERRORS AND CONFIDENCE INTERVALS
may provide a biased estimate but by how much we will not know. The dif-
ferent types of sampling are described more fully in Chapter 12.
Figure 6.2 Dot plots showing mean birthweight (kg) for 100 random samples of size 4,
16, 25 and 100
Figure 6.4 Observed distributions of the means of 500 random samples of size 5, 10, 20
and 50 taken from the distribution of random digits 0 to 9
From these data d = x Int − x Con = 211 − 123 = 88 m and the correspond-
118 2 99 2
ing standard error from Table 6.4 is, SE ( d ) = + = 16.04 m.
93 91
and, in this case, is termed a 95% confidence interval as it includes the mul-
tiplier 1.96. Figure 6.5 illustrates that 95% of the distribution of sample means
Population mean m
lies within ±1.96 standard errors (the standard deviation of this distribution)
of the population mean.
In strict terms the confidence interval is a range of values that is likely to
cover the true but unknown population mean value, m. The confidence inter-
val is based on the concept of repetition of the study under consideration.
Thus if the study were to be repeated 100 times, of the 100 resulting 95%
confidence intervals, we would expect 95 of these to include the population
parameter. Consequently a reported confidence interval from a particular
study may or may not include the actual population parameter value of
concern.
Figure 6.6 illustrates some of the possible 95% confidence intervals that
could be obtained from different random samples of 25 babies from the 3226
babies whose birthweight data was recorded by O’Cathain et al (2002).
Ninety-four (94%) of these 100 confidence intervals contain the population
mean birthweight of 3.39 kg but 6 (6%) do not. This is close to what we would
expect – that the 95% confidence interval will not include the true population
mean 5% of the time.
Population mean
birthweight
m = 3.39 kg
Unfortunately the CIs ARE NOT pre-labelled with ‘I am a poor CI and do not include the population
mean: do not choose me!’
Figure 6.6 One hundred different 95% confidence intervals for mean birthweight con-
structed from random samples of size 25. The arrow indicates one of the 6CIs which does
not include m = 3.39 kg
6.7 CONFIDENCE INTERVALS FOR AN ESTIMATE 91
In an actual study, only one 95% CI is obtained, and we would never know
without detailed further study, whether it includes within it the true popula-
tion mean’s value.
For technical reasons, this expression given for a confidence interval for p
is an approximation and is referred to as the traditional approach. It is also
only in situations in which reasonable agreement exists between the shape
of the Binomial distribution and the Normal distribution (see Chapter 5) that
we would use the confidence interval expression just given. The approxima-
tion will usually be quite good provided p is not too close to 0 or 1, situations
in which either almost none or nearly all of the patients respond. The approx-
imation improves with increasing sample size n.
If n is small, however, or p close to 0 or 1, the disparity between the Normal
and Binomial distributions with the same mean and standard deviation,
similar to those illustrated in Figure 5.2, increases and the Normal distribu-
tion can no longer be used to approximate the Binomial distribution.
The preferred or recommended method for calculating a confidence inter-
val for a single proportion described by Altman et al (2000) and given in
Section 6.10, has better statistical properties than the traditional method just
given.
Provided the sample sizes in the two groups are large, this method of cal-
culating a confidence interval can be adapted for the comparison of two
proportions or the comparison of two rates with appropriate changes.
Table 6.3 Population parameters of the Normal, Binomial and Poisson distributions,
their estimates and the associated standard errors (SE) for a single group
Distribution Parameters Population values Sample estimate Standard error (SE)
Normal Mean m x̄ s
n
Binomial Proportion p p p (1 − p)
n
Poisson Rate l r r
n
6.10 TECHNICAL DETAILS 95
Table 6.4 Population parameters of the Normal, binomial and Poisson distributions,
their estimates and the associated standard errors (SE) for comparing two groups
Distribution Parameter Population Estimated SE (difference)
value difference
s12 s22
Normal Mean m1 − m2 x̄1 − x̄2 +
n1 n2
p1 (1 − p1 ) p2 (1 − p2 )
Binomial Proportion p 1 − p2 p1 − p2 +
n1 n2
r1 r2
Poisson Rate l 1 − l2 r1 − r2 +
n1 n2
A = 2r + z2 ; B = z z2 + 4r (1 − p); and, C = 2 ( n + z2 )
where z is as before the appropriate value, z1−α/2, from the standard Normal
distribution of Table T1. Then the recommended confidence interval for the
population proportion is given by:
( A − B) ( A + B)
to .
C C
When there are no observed events, r = 0 and hence p = 0/n = 0 (0%), the
z2
recommended confidence interval simplifies to 0 to , while when
( n + z2 )
n
r = n so that p = 1 (100%), the interval becomes to 1.
( z2 )
n +
Then the 95% confidence interval for the prevalence of abnormal pro-
lactin hormone concentrations in the population of such chronic pain
patients is
(5.84 − 5.39 ) (5.84 + 5.39 )
= 0.01 to = 0.30,
37.68 37.68
that is, from 1% to 30%.
In the same study, there were 21 chronic pain patients using opioid anal-
gesia, none of whom had prolactin hormone concentrations outside the
normal range. The estimated prevalence of abnormal prolactin hormone
concentrations for this group is 0 (0%), with 95% confidence interval from
1.96 2
0 to = 0.15 , that is 0 to 15%.
( 21 + 1.962 )
6.11 Exercises
Decide whether the following are true or false:
Table 6.5 Mid-upper arm circumference (mm) in a rural Indian population aged 12 to
60 months (10 random samples of size 4)
Sample Observations, X Sample mean, x̄ Standard
deviation, s
4. Table 6.6 shows ten random samples of size 16 drawn from the same
population of Indian children.
(a) Display as a dot plot alongside the previous one, the means of the ten
random samples of size 16 shown in Table 6.6.
(b) Calculate the standard error of the mean using the standard deviation
of random sample number 4 in Table 6.6.
(c) Compare the standard error (of the mean) for n = 4 with the standard
error (of the mean) for n = 16.
Table 6.6 Mid-upper arm circumference (mm) in a rural Indian population aged 12 to 60
months: random samples of size 16
Sample Observations, x Sample Standard
mean deviation
1 146 160 144 140 162 162 128 176 148 146 144 176 146 138 146 138 150.00 13.54
2 142 158 156 190 164 148 138 130 142 152 150 148 146 154 142 148 150.50 13.36
3 130 142 138 144 144 150 174 138 154 150 154 136 162 152 156 138 147.63 11.15
4 146 160 158 140 128 150 172 154 140 162 162 136 150 152 156 154 151.25 11.19
5 142 148 154 152 140 140 156 122 164 130 148 140 162 162 136 142 146.13 11.88
6 148 142 134 158 130 156 144 154 148 138 168 140 146 154 146 152 147.38 9.63
7 140 140 146 146 138 154 156 136 146 146 152 142 138 156 156 154 146.63 7.18
8 156 140 152 158 164 148 140 128 132 156 148 162 164 142 156 134 148.75 11.61
9 146 160 138 134 162 148 156 154 148 172 154 154 162 152 150 156 153.00 9.27
10 152 142 148 150 154 136 148 144 158 144 134 140 144 176 144 148 147.62 9.80
98 POPULATIONS, SAMPLES, STANDARD ERRORS AND CONFIDENCE INTERVALS
5. (a) Estimate the 95% confidence interval for one selected sample of size
4 (sample number 10 in Table 6.5) and display this on the dot plot for
n = 4.
(b) Estimate the 95% confidence interval for one selected sample of size
16 (sample number 4 in Table 6.5) and display this on the dot plot for
n = 16.
6. A surgeon in a large hospital is investigating acute appendicitis in people
aged 65 and over. As a preliminary study he examines the hospital case
notes over the previous 10 years and finds that of 120 patients in this age
group with a diagnosis confirmed at operation 73 were women and 47 were
men. Calculate a 95% confidence interval for the proportion of females
with acute appendicitis.
7 p-values and
statistical inference
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
100 p-VALUES AND STATISTICAL INFERENCE
Summary
The main aim of statistical analysis is to use the information gained from a
sample of individuals to make inferences about the population of interest.
There are two basic approaches to statistical analysis: Estimation (with Con-
fidence intervals) and Hypothesis Testing (with p-values). The concepts of
the null hypothesis, statistical significance, the use of statistical tests, p-values
and their relationship to confidence intervals are introduced.
7.1 Introduction
We have seen that in sampling from a population which can be assumed to
have a Normal distribution the sample mean can be regarded as estimating
the corresponding population mean m. Similarly, s estimates the population
standard deviation, s. We therefore describe the distribution of the popula-
tion with the information given by the sample statistics x and s. More gener-
ally, in comparing two populations, perhaps the population of subjects
exposed to a particular hazard and the population of those who were not,
two samples are taken, and their respective summary statistics calculated. We
might wish to compare the two samples and ask: ‘Could they both come from
the same population?’ That is, does the fact that some subjects have been
exposed, and others not, influence the characteristic or variable we are
observing? If it does not, then we regard the two populations as if they were
one with respect to the particular variable under consideration.
A statistical significance test considers the p-value obtained from the study.
If it is small, conventionally less than 0.05, the null hypothesis is rejected as
implausible. While if p > 0.05 this is often taken as suggesting that insufficient
information is available to discount the null hypothesis.
16 116 126 10
15 126 132 6
9 128 146 18
7 132 144 12
4 134 148 14
3 136 134 −2
5 138 144 6
13 138 146 8
6 140 136 −4
2 142 152 10
8 144 150 6
1 148 152 4
12 150 162 12
14 154 156 2
11 162 162 0
10 170 174 4
Mean, d̄ 6.63
SD 5.97
SE (d̄ ) 1.49
7.4 STATISTICAL INFERENCE 105
That is: If the p-value is less than or equal to a conclude that the data
are not consistent with the null hypothesis. Whereas if the p-value is
greater than a, do not reject the null hypothesis, and view it as ‘not
yet disproven’.
106 p-VALUES AND STATISTICAL INFERENCE
Step 1 State your null hypothesis (H0) and alternative hypothesis (HA)
It is easier to disprove things than to prove them. In a court of law the defen-
dant is assumed innocent until proven guilty. Often statistical analyses involve
comparisons between different treatments, such as between standard and
new – here we assume that the treatment effects are equal until proven dif-
ferent. Therefore the null hypothesis is often the negation of the research
hypothesis which is that the new treatment will be more effective than the
standard.
p-value
Your results are unlikely when the null Your results are likely when the null
hypothesis is true hypothesis is true
→
and accept the alternative
We cannot say the null hypothesis
is true, only that there is not
enough evidence to reject it.
p-value Interpretation
run, the proportion of times the test statistic equals, or is greater than the
observed value is the p-value.
In terms of the notation of Chapter 4 the p-value is equivalent to the prob-
ability of the data (D), given the hypothesis (H), that is, P(D|H) (strictly the
probability of the observed data, or data more extreme). It is not P(H|D),
the probability of the hypothesis given the data, which is what most people
want. Unfortunately, unlike diagnostic tests we cannot go from P(D|H) to
P(H|D) using Bayes’ theorem, because we do not know the a priori probabil-
ity (that is before collecting any data) of the null hypothesis being true P(H),
which would be analogous to the prevalence of the disease. Some people try
to quantify their subjective belief in the null hypothesis, but this is not objec-
tive as different investigators will have different levels of belief and so differ-
ent interpretations from the same data will arise.
Whenever a significance test is used, the corresponding report should
quote the exact p-value to a sensible number of significant figures together
with the value of the corresponding test statistic. Merely reporting whichever
appropriate, p < 0.05 or worse, p > 0.05, or p = ‘NS’ meaning ‘Not statistically
significant’, is not acceptable.
True False
a trial is ≤a, then one rejects the null hypothesis and concludes that there is
a statistically significant difference between treatments. On the other hand,
if the p-value is >α then one does not reject the null hypothesis. This seems
a clear-cut decision with no chance of making a wrong decision. However, as
Table 7.2 shows there are two possible errors when using a p-value to make
a decision.
Even when the null hypothesis is in fact true there is still a risk of rejecting
it. To reject the null hypothesis when it is true is to make a type I error.
Plainly the associated probability of rejecting the null hypothesis when it is
true is equal to a. The quantity α is interchangeably termed the test size,
significance level or probability of a type I (or false-positive) error.
Table 7.3 Relationship between Type I and Type II errors and significance tests
Test statistically significant Difference exists Difference does not exist
(HA true) (H0 true)
Figure 7.1 Use of confidence intervals to help distinguish statistical significance from
clinical importance
112 p-VALUES AND STATISTICAL INFERENCE
Key points
• Research questions need to be turned into a statement for which we can
find evidence to disprove – the null hypothesis.
• The study data is reduced down to a single probability – the probability of
observing our result, or one more extreme, if the null hypothesis is true
(p-value).
• We use this p-value to decide whether to reject or not reject the null
hypothesis.
• But we need to remember that ‘statistical significance’ does not necessarily
mean ‘clinical significance’.
• Confidence intervals should always be quoted with a hypothesis test to give
the magnitude and precision of the difference.
Table 7.4 Population parameters of the Normal and binomial distributions, their esti-
mates and the associated standard errors (SE) for comparing two groups under the null
hypothesis of no difference between groups
Distribution Parameters SE (Difference)
Normal Mean
1 1 ( n1 − 1) s12 + ( n2 − 1) s22
difference sPooled + sPooled =
d = m1 − m2 n1 n2 ( n1 − 1) + ( n2 − 1)
Binomial Difference
⎛ 1 1⎞ n1 p1 + n2 p2
in proportions p(1 − p) ⎜ + ⎟ p=
⎝ n1 n2 ⎠ n1 + n2
d = p1 − p2
7.10 Exercises
1. Gaffney et al (1994) compared 141 babies who developed cerebral palsy
to a control group of (control) babies made up from the babies who
appeared immediately after each cerebral palsy case in the hospital deliv-
ery book. The corresponding hospital notes were reviewed by a researcher,
who was blind to the baby’s outcome, with respect to medical staff response
to signs of fetal stress. Failure to respond to signs of fetal distress by the
medical staff was noted in 25.8% of the cerebral palsy babies and in 7.1%
of the next delivery controls: a difference of 18.7%. This difference had
standard error 4.2% and the 95% CI was 10.5 to 26.9%.
(a) What is the statistical null hypothesis for this study? What is the alter-
native hypothesis?
(b) What is meant by ‘the difference was 18.7%’?
(c) What can we conclude from the 95% CI?
2. A randomised controlled trial was conducted to investigate the cost-
effectiveness of community leg ulcer clinics (Morrell et al 1998). A total
of 233 patients were randomly allocated to either intervention (120
patients, treatment at a leg ulcer clinic) or control (113, usual care at home
by district nursing service). At the end of 12 months the mean time (in
weeks) that each patient was free from ulcers during follow up was 20.1
and 14.2 in the clinic and control groups, respectively. On average, patients
in the clinic group had 5.9 more ulcer-free weeks (95% CI 1.2 to 10.6
weeks) than the control patients. Mean total costs were £878 per year for
the clinic group and £863 for the control group (p = 0.89).
7.10 EXERCISES 115
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
118 TESTS FOR COMPARING TWO GROUPS OF CATEGORICAL OR CONTINUOUS DATA
Summary
In this chapter we will now be putting some of the theory into practice
and looking at some of the more basic statistical tests that you will
come across in the literature and in your own research. The choice of
method of analysis for a problem depends on the comparison to be made
and the data to be used. We explain some of the basic methods appro-
priate for comparing two groups. We consider the comparison of two
independent groups such as groups of patients given different treatments
and the comparison of paired data, for example, the response of one
group under different conditions as in a cross-over trial, or of matched pairs
of subjects.
8.1 Introduction
There are often several different approaches to even a simple problem. The
methods described here and recommended for particular types of question
may not be the only methods, and may not be universally agreed as the best
method. However, these would usually be considered as valid and satisfac-
tory methods for the purposes for which they are suggested here.
Example dataset
We shall illustrate some of various statistical tests by using data from a ran-
domised controlled trial which aimed to compare a new treatment regime for
patients with leg ulcers with usual care (Morrell et al 1998). In this trial, 233
patients with venous leg ulcers were randomly allocated to the Intervention
(120) or the Control (113) group. The intervention consisted of weekly treat-
ment with four layer bandaging in a leg ulcer clinic (Intervention group) or
usual care at home by the district nursing service (Control group). Patients
were treated and followed up for 12 months. The trial used a variety of out-
comes which included: time to complete ulcer healing (in weeks); ulcer status
(healed or not healed) at 3 and 12 months; ulcer free weeks (amount of time
that patient was ulcer free during the 12 month follow-up period) and patient
health-related quality of life (HRQoL) at baseline, 3 months and 12 months.
HRQoL was measured using the general health dimension of the SF-36. This
outcome is scored on a 0 (poor health) to 100 (good health) scale.
Compare differences
or paired samples
No No
Wilcoxon matched
pairs test
No
No
(i.e. the data
are binary)
McNemar’s test
Paired t-test
Two groups of paired observations, x11, x12, . . . , x1n in Group 1 and x21,
x22, . . . , x2n in Group 2 such that x1i is paired with x2i and the difference
between them, di = x1i − x2i. The null hypothesis is that the mean difference
in the population is zero.
Assumptions
• The di’s are plausibly Normally distributed. It is not essential for the origi-
nal observations to be Normally distributed.
• The di’s are independent of each other.
Steps
• Calculate the differences di = x1i − x2i, i = 1 to n.
• Calculate the mean d and standard deviation, sd of the differences di.
• Calculate the standard error of the mean difference SE ( d ) = sd n
d
• Calculate the test statistic t =
SE (d )
Figure 8.2 Histogram of differences in HRQoL between baseline and 3 months (n = 36)
the t-distribution with df = 35 df. Table T3 (p. 319), which only goes up to df
= 30, suggests a p-value of somewhere between 0.02 and 0.01. The computer
output in Table 8.1 gives a precise p-value = 0.012.
The 100 (1 − a)% confidence interval for the mean difference in the popu-
lation is:
d − ⎡⎣tdf ,α × SE (d )⎤⎦ to d + ⎡⎣tdf ,α × SE (d )⎤⎦,
where tdf,a is taken from the t distribution with df = n − 1 degrees of
freedom.
From Table T1 with df = 35, t35,.05 ≈ 2.03, giving the 95% CI for the mean
difference as
7.3 − ( 2.03 × 2.8 ) to 7.3 + ( 2.03 × 2.8 )
or 1.7 to 12.9.
The computer output for the comparison of HRQoL for these 36 patients
at baseline and 3 months shows that the result is statistically significant
(Table 8.1). The confidence interval of the difference suggests that we
are 95% confident that HRQoL has changed by between 1.7 and 12.9
8.2 COMPARISON OF TWO GROUPS OF PAIRED OBSERVATIONS – CONTINUOUS OUTCOMES 123
Mean n SD SE
Health related
quality of life: 66.3 36 18.8 3.1
baseline
Health related
quality of life: 58.9 36 22.0 3.7
3 months
Paired differences
95% CI of the
Difference
points over the period and the best estimate is a mean change of 7.3 points.
In actual fact HRQoL has declined over time from a mean of 66.3 at baseline
to 58.9 at 3 months.
The assumptions underlying the use of the paired t-test are outlined above.
If these are not met, Figure 8.1 shows that a non-parametric alternative, the
Wilcoxon signed rank sum test, can be used, to assess whether the differences
are centred around zero.
Table 8.2 Example computer output for Wilcoxon signed rank sum test
Ranks n Mean Sum of
rank ranks
Test statistics
HRQoL:
3 month − Baseline
z −2.511a
p-value 0.012
a
Based on positive ranks.
The p-value or probability of observing the test statistic of −2.511 or more extreme under the null
hypothesis is 0.012. This means that this result is unlikely when the null hypothesis is true (of no dif-
ference in HRQoL). The result is said to be statistically significant because the p-value is less than
the significance level (a) set at 5% or 0.05 and there is sufficient evidence to reject the null hypothesis.
The alternative hypothesis that there is a difference or change in HRQoL between baseline and 3
months in patients whose leg ulcer had healed, is accepted.
Assumptions
• The di’s come from a population with a symmetric distribution.
• The di’s are independent of each other.
Steps
• Calculate the differences di = x1i − x2i, i = 1 to n.
• Ignoring the signs of the differences, rank them in order of increasing
magnitude from 1 to n′, with zero values being ignored (so n′ is the number
of non-zero differences, and so may be less than the original sample size
n). If some of the observations are numerically equal, they are given tied
ranks equal to the mean of the ranks which would otherwise have been
used.
8.3 COMPARISON OF TWO INDEPENDENT GROUPS – CONTINUOUS OUTCOMES 125
Assumptions
1. The groups are independent.
2. The variables of interest are continuous.
3. The data in both groups have similar standard deviations.
4. The data is Normally distributed in both groups.
126 TESTS FOR COMPARING TWO GROUPS OF CATEGORICAL OR CONTINUOUS DATA
Compare two
independent groups
No No
Mann–Whitney
U test
No
No
No
(i.e. the data
Reduce number of categories Chi-squared
are binary) by combining or excluding as test
appropriate
Large sample,
Comparison of
all expected Yes
two proportions or
frequencies >5? Chi-squared test
No
Chi-squared test
with Yates’
correction
Figure 8.3 Statistical methods for comparing two independent groups or samples
8.3 COMPARISON OF TWO INDEPENDENT GROUPS – CONTINUOUS OUTCOMES 127
Steps
1. First calculate the mean difference between groups x 1 − x 2.
(n1 − 1) s12 + (n2 − 1) s22
2. Calculate the pooled standard deviation SDpooled = .
n1 + n2 − 2
3. Then calculate the standard error of the difference between two means
1 1
SE ( x1 − x2 ) = SDpooled × + .
n1 n2
x1 − x2
4. Calculate the test statistic t = .
SE ( x1 − x2 )
5. Compare the test statistic with the t distribution with n1 + n2 − 2 degrees
of freedom. This gives us the probability of the observing the test statistic
t or more extreme under the null hypothesis.
The assumption of Normality can be checked by plotting two histograms,
one for each sample; these do not need to be perfect, just roughly symmetrical.
The two standard deviations should also be calculated and as a rule of thumb,
one should be no more than twice the other. At this stage, we shall assume
the outcome, ulcer free weeks, is Normally distributed in both groups, but we
will check this assumption later on. In this example a suitable null hypothesis
(H0) is that there is no difference in mean ulcer free weeks between Interven-
tion and Control groups, that is, mIntervention − mControl = 0 weeks. The alternative
hypothesis (HA) is that there is a difference in mean ulcer free weeks between
Intervention and Control groups i.e. mIntervention − mControl ≠ 0 weeks.
The summary statistics for the ulcer free weeks for the Intervention and
Control groups are shown in the top half of the computer output in Table
8.3. We have a mean difference between the groups, x 1 − x 2 = 20.1 − 14.2 =
5.9 weeks and the standard error of this mean difference SE( x 1 − x 2) = 2.4
weeks. In this example the degrees of freedom are, df = n1 + n2 − 2 or 120 +
113 − 2 = 231. The test or t-statistic is t = 5.9/2.4 = 2.485. This value is then
compared to values of the t-distribution with df = 231. From Table T3, the
closest tabulated value is with df = 30 but with such large df we can use the
final row of the table which has infinite degrees of freedom suggesting a p-
value of somewhere between 0.02 and 0.01. This is clearly less than 0.05. The
computer output in Table 8.3 shows that the exact p-value = 0.014.
The 100 (1 − a)% confidence interval for the mean difference in the popu-
lation is:
( x1 − x2 ) − [tdf ,α × SE ( x1 − x2 )] to ( x1 − x2 ) + [tdf ,α × SE ( x1 − x2 )],
where tdf,a is taken from the t distribution with df = n1 + n2 − 2. For a 95%
CI t231,0.05 = 1.970. Thus giving the 95% CI for the mean difference as:
5.9 − (1.970 × 2.4) to 5.9 + (1.970 × 2.4) or 1.2 to 10.5 weeks.
128 TESTS FOR COMPARING TWO GROUPS OF CATEGORICAL OR CONTINUOUS DATA
Table 8.3 Computer output from the two independent samples t-test
Group statistics
Group n Mean SD SE
Lower Upper
Table 8.3 shows the computer output for comparing ulcer-free weeks
between the two groups using the two independent samples t-test. It can be
seen that there is a significant difference between the groups; the 95%
CI for the difference suggests that patients in the clinic group have
between 1.2 and 10.5 more ulcer-free weeks than patients in the control
group and the best estimate is a mean difference of 5.9 more ulcer-free
weeks.
When conducting any statistical analysis it is important to check that
the assumptions which underpin the chosen method are valid. For the two
independent samples t-test, the assumption that the outcome is Normally
distributed in each group can be checked by plotting two histograms, one
for each sample. Figure 8.4 shows two histograms for the ulcer-free
weeks outcome. The outcome in both groups is clearly not Normally dis-
tributed and both distributed appear positively skewed. Hence in these
circumstances it looks like the two-independent samples t-test is not the
most appropriate test. The flow diagram of Figure 8.3, suggests that the
Mann–Whitney U test may be a more suitable alternative. An alternative
would be to use the log rank test, suitable for survival data and described in
Chapter 10.
8.3 COMPARISON OF TWO INDEPENDENT GROUPS – CONTINUOUS OUTCOMES 129
Mann–Whitney U test
When the assumptions underlying the t-test are not met, then the non-
parametric equivalent, the Mann–Whitney U test, may be used. There are
two derivations of the test, one due to Wilcoxon and the other to Mann and
Whitney. It is better to call the method the Mann–Whitney U test to avoid
confusion with the paired test due to Wilcoxon.
The Mann–Whitney test requires all the observations to be ranked as
if they were from a single sample. We can now use two alternative test
statistics, U and W. The statistic W (due to Wilcoxon) is simply the sum
of the ranks in the smaller group and is easier to calculate by hand. The
statistic U (due to Mann and Whitney) is more complicated. U is the number
of all possible pairs of observations comprising one from each sample
for which the value in the first group precedes a value in the second
group. Whilst the independent samples t-test is specifically a test of the null
hypothesis that the groups have the same mean value, the Mann–Whitney
U test is a more general test of the null hypothesis that the distribution
130 TESTS FOR COMPARING TWO GROUPS OF CATEGORICAL OR CONTINUOUS DATA
of the outcome variable in the two groups is the same; it is possible for the
outcome data in the two groups to have similar measures of central tendency
or location, such as mean and medians, but different distributions.
Suppose we wish to test the null hypothesis that two samples come from
the same from populations. The data are at least ordinal and from two inde-
pendent groups of size n1 and n2 respectively.
Assumptions
1. The groups are independent.
2. The variables of interest are at least ordinal (can be ranked).
Steps
First combine the two groups and rank the entire data set in increasing order
(smallest observation to the largest). If some of the observations are numeri-
cally equal, they are given tied ranks equal to the mean of the ranks which
would otherwise have been used. Sum the ranks for one of the groups. Let
W be the sum of the ranks for the n1 observations in this group.
If there are no ties or only a few ties, calculate the test statistic
n1 ( n1 + n2 + 1) ⎞
W −⎛
⎝ 2 ⎠
z= .
n1n2 ( n1 + n2 + 1)
12
Under the null hypothesis that the two samples come from the same popu-
lation, the test statistic, z, is approximately Normally distributed with mean
zero, and standard deviation of 1, and can be referred to Table T1 to calculate
a p-value.
Many text books give special tables for the Mann–Whitney U test, when
sample sizes are small, that is when n1 and n2 are less than 20. However, the
above expression is usually sufficient. The formula is not very accurate if
there any many ties in the data. The reader is referred to Armitage et al
(2002) in such situations.
Examining the output from the Mann–Whitney U test in Table 8.4 we see
there is sufficient evidence to reject the null hypothesis and accept the alter-
native hypothesis that there is a difference in ulcer free weeks between the
Intervention and Control groups.
However, this example illustrates that the t-test is very robust to violations
of the assumptions of Normality and equal variances, particularly for moder-
ate to large sample sizes, as the p-values and conclusions, from both the t-test
and Mann–Whitney test are the same, despite the non-Normal distribution
of the data.
8.3 COMPARISON OF TWO INDEPENDENT GROUPS – CONTINUOUS OUTCOMES 131
Test statistics
Leg ulcer-free
time (weeks)
Mann–Whitney U 5 596.0
Wilcoxon W 12 037.0
z −2.388
p-value 0.017*
*p-value: probability of observing the statistic, W or U, under the null hypothesis. As the value of
0.017 is less than the significance level (a) set at 0.05 or 5% this means that the result obtained is
unlikely when the null hypothesis is true. Thus there is sufficient evidence to reject the null hypothesis
and accept the alternative hypothesis that there is a difference in ulcer free weeks between the
Intervention and Control groups.
Group
Chi-square tests
Figure 8.3 shows that there are several different approaches to analysing
these data. One approach which we outlined in Chapter 7 would be to
compare the proportions of ulcers healed at 3 months follow-up in the two
groups. In this example a suitable null hypothesis (H0) is that there is no dif-
ference in outcomes, the proportion of patients with healed leg ulcers, at 3
months between Intervention and Control groups, that is, pInt − pCon = 0. The
alternative hypothesis (HA) is that there is a difference in outcomes, propor-
tion of patients with healed leg ulcers, at 3 months, between Intervention and
Control groups, that is, pInt − pCon ≠ 0.
The hypothesis test assumes that there is a common proportion, p,
(n p + n p )
estimated by p = 1 1 2 2 and standard error for the difference in pro-
(n1 + n2 )
⎛ 1 1⎞
portions is estimated by SE ( p1 − p2 ) = p (1 − p) ⎜ + ⎟ (see Table 7.4).
⎝ n1 n2 ⎠
From this we can compute the test statistic: z = (p1 − p2)/SE(p1 − p2).
We can then compare this value to what would be expected under the null
hypothesis of no difference, in order to get a p-value. The computer output
in the top half of Table 8.5 gives: n1 = 120, p1 = 22/120 = 0.18; n2 = 113,
p2 = 17/113 = 0.15 and p1 − p2 = 0.033.
⎛ 1 1⎞
p (1 − p) ⎜ + ⎟ = 0.167 (1 − 0.167 ) ⎜⎛
1 1 ⎞
and SE ( p1 − p2 ) = + = 0.049
⎝ n1 n2 ⎠ ⎝ 120 113 ⎟⎠
The test statistics is: z = (p1 − p2)/SE(p1 − p2) = 0.033/0.049 = 0.673 and the
probability of observing the test statistic z = 0.67 or more extreme under the
null hypothesis, using Table T1, is 0.502.
The 95% CI for the difference in proportions is:
( p1 − p2 ) ± [1.96 × SE ( p1 − p2 )]
For the calculation of the confidence interval, we do not need to make any
assumptions about there being a common proportion p and use the formula
in Table 6.7 for the SE(p1 + p2):
Therefore we are 95% confident that the true population difference in the
proportion of leg ulcers healed, at 12 weeks, between the Clinic and Home
treated patients lies somewhere between −6.3% to 12.9%, but our best esti-
mate is 3.3%.
Figure 8.3 also shows that an alternative approach to the comparisons of
two proportions, assuming a large sample and all expected frequencies >5, is
the chi-squared test. The null hypothesis is that the two classifications (group
and ulcer-healed status at 3 months) are unrelated in the relevant population
(leg ulcer patients). More generally the null hypothesis, H0, for a contingency
table is that there is no association between the row and column variables in
the table, that is, they are independent. The general alternative hypothesis,
HA, is that there is an association between the row and column variables in
the contingency table and so they are not independent or unrelated. For the
chi-squared test to be valid two key assumptions need to be met, as outlined
below. If these are not met, Figure 8.3 suggests that Fisher’s exact test can
be used for 2 × 2 tables.
Assumptions
• Two independent unordered categorical variables that form an r × c con-
tingency table.
• At least 80% of expected cell counts >5.
• All expected cell counts >1.
Steps
1. Calculate the expected frequency (Eij) for the observation in row i and
column j of the r × c contingency table:
Row total ( Ri ) × Column total (C j )
Eij = , where N is the total sample size.
N
2. For each cell in the table calculate the difference between the observed
value and the expected value (Oij − Eij).
3. Square each difference and divide the resultant quantity by the expected
value (Oij − Eij)2/Eij.
4. Sum all of these to get a single number, the χ2 statistic.
8.4 COMPARISON OF TWO INDEPENDENT GROUPS – CATEGORICAL OUTCOMES 135
r
χ2 = ∑∑
c
(Oij − Eij )2 =∑
(O − E )2
i =1 j =1 Eij E
5. Compare this number with tables of the chi-squared distribution with the
following degrees of freedom: df = (no. of rows − 1) × (no. of columns − 1).
Table 8.6 shows more details of the calculations and how we compare what
we have observed (O) with what we would have expected (E) under the null
hypothesis of no association. If what we have observed is very different from
what we would have expected, then we reject the null hypothesis.
(O − E )2 is 0.45; this is given in Table 8.5 as ‘Pearson chi-
The value of
∑ E
square’. This value can be compared with tables for the chi-squared distribu-
tion with df = (no. of rows − 1) × (no. of columns − 1) = (2 − 1) × (2 − 1) = 1.
Under the null hypothesis of no association the probability of observing this
value of the test statistic c 2 or more, is p-value = 0.502.
If more than 20% of expected cell counts are less than 5 then the
test statistic does not approximate a chi-squared distribution. If any
expected cell counts are <1 then we cannot use the chi-squared distribu-
tion. In large tables we may have to combine categories to make bigger
numbers (providing it’s meaningful). The bottom half of Table 8.5 shows
the typical computer output for a chi-squared test. In this example it
appears that the chi-squared test is valid as all the expected counts are
greater than 5.
In 2 × 2 tables, even when expected cell counts are bigger than 5,
the observed value of c 2 (calculated from count data) can be made closer
to the true c 2 value (calculated on a continuous scale) using Yates’ conti-
nuity correction, cCC2
. This simply involves subtracting 0.5 from the abso-
lute value for the difference between the observed and expected cell values,
( O − E − 0.5)2 .
χ CC
2
=∑
E
Table 8.6 Observed and expected cell counts for leg ulcer data
O E O−E (O - E)2/E
Again this value can be compared with Table T4 for the chi-squared distribu-
tion with df = 1. Under the null hypothesis of no association, the probability
of observing this value of the test statistic or more, is about 0.620.
Yes No
f +g
tions in large samples. For the data of Brown et al (1987) we have
( 11 − 3 − 1)2
= 3.5 . We compare this with the tabulated values of c
2
χ C2 =
11 + 3
with df = 1 and find that p-value ≈ 0.05. In fact, more exact calculations may
be obtained by using the fact that the square root of a c 2 distribution with
df = 1 is a standard Normal distribution. The square root of 3.5 is z = 1.87,
and referring to Table T1 (p. 316) gives p = 0.06 so we do not have enough
evidence to reject the null hypothesis. An exact test for paired data, equiva-
lent to Fisher’s exact test for unpaired data, is described in Section 8.10.
values of s very far from σ will not be uncommon, and one consequence
is that although x will still have a Normal distribution, it can no longer
be assumed that the ratio, z = x/SE( x), will. The previous discussion effec-
tively assumed that s was close in value to the (unknown) population
parameter s.
As a consequence it is necessary to modify the calculation of both the p-
value and a confidence interval. For the confidence interval za is replaced by
tdf ,a, in the expression given for a confidence interval for the difference
between two means in Section 6.2, to obtain
d − tdf ,α × SE (d ) to d + tdf ,α × SE (d ),
d
while the expression for z is relabelled, t = . This then known as
SE ( d )
Student’s t-statistic. Under the null hypothesis of no difference in the means
t is assumed to be distributed as Student’s t-distribution rather than as a
Normal distribution.
In the expression for the confidence interval the particular value for
tα, depends not only on a but also on the number of degrees of free-
dom, df, on which s is estimated. We explain how to calculate degrees
of freedom in Section 8.8. Table T3 gives some values of ta for dif-
ferent values of df and a. Examination of the bottom row of Table T3
shows that with df = ∞, that is with very large degrees of freedom, the
same value for ta is obtained as for za in Table T1 for each value of
a. However, the values of ta get larger as the df get smaller. This reflects
the increasing uncertainty concerning the estimate of s as sample sizes
get smaller.
Table 8.8 Notation for unmatched 2 × 2 table. Number of subjects classified by factors
A and B
Factor A
Factor B Present a c m
Absent b d n
Total r s N
A B
Yes 2 6 8
No 18 14 32
Total 20 20 40
Table 8.10 (ii) Odds ratio = 10.2 and (iii) Odds ratio = ∞
Deaths Ward Total Ward Total
A B A B
Yes 1 7 8 0 8 8
No 19 13 32 20 12 32
Total 20 20 40 20 20 40
8.9 TECHNICAL DETAILS 143
Example Consider the notation in Table 8.11, which gives the results of a
parallel group clinical trial with ordered outcomes.
With the notation given in Table 8.11, calculate
c c
c c ∑ ai ∑ ni xi
Txp = ∑ ni ( pi − p) ( xi − x ) = ∑ ai xi − i =1 i =1
and
i =1 i =1 N
Txx = ∑ ni xi2 − ( ∑
ni xi )
c 2
.
i =1 N
Txp2
2
Finally calculate X trend = where q = 1 − p. This chi-squared test for
(Txx pq )
trend has df = 1.
Thus from Table 8.11, Txp = −26 − 144 × (−12)/196 = −17.18, Txx = 228 −
(−12)2/196 = 227.27 and χ2trend = (−17.18)2/(227.27 × 0.2653 × 0.7347) = 6.66.
From Table T4, we find p = 0.01.
Example In the case–control study of Brown et al (1987) the four tables for
calculation are:
4 11 4 12 4 13 4 14
3 241 2 241 1 241 0 241
Giving
14 14
14! ⎛ 1 ⎞ 14! ⎛ 1 ⎞
P (i ) = = 0.022217, P (ii ) = = 0.005554
11! 3! ⎝ 2 ⎠ 12! 2! ⎝ 2 ⎠
14 14
14! ⎛ 1 ⎞ 14! ⎛ 1 ⎞
P (iii ) = = 0.000854, P (iv) = = 0.000061.
13!1! ⎝ 2 ⎠ 14!0! ⎝ 2 ⎠
Thus the total probability is 0.028686. For a two-sided test p = 0.057. This
is very close to the value p = 0.06 calculated in Section 8.5 using a McNemar’s
test with Yates’s correction.
An approximate 95% CI for the true difference in proportions can be
calculated as follows. First calculate p1 = (e + f )/N and p2 = (e + g)/N and
the difference between them is p1 − p2 =
( f − g ) . The standard error for the
N
difference p1 − p2 is given by SE ( p1 − p2 ) =
{
f + g − ( f − g) N
2
} . Hence,
N
the 95% confidence interval for the true difference in proportion is
(p1 − p2) − {1.96 × SE(p1 − p2)} to (p1 − p2) + {1.96 × SE(p1 − p2)}.
8.10 Exercises
1. Table 8.12 shows the 24 hour total energy expenditure of groups of lean
and obese women. The aim of this study was to compare total energy
expenditure between the lean and obese women.
8.10 EXERCISES 145
6.13 8.79
7.05 9.19
7.48 9.21
7.48 9.68
7.53 9.69
7.58 9.97
7.90 11.51
8.08 11.85
8.09 12.79
8.11
8.40
10.15
10.88
Mean 8.066 10.298
SD 1.238 1.398
From Prentice et al (1986). High levels of energy expenditure in obese
women. British Medical Journal, 292, 983–987: reproduced by permis-
sion of the BMJ Publishing Group.
(a) Write out a suitable null and alternative hypothesis for this problem
and data.
(b) Do these data suggest that women in the lean group have a different
total energy expenditure to women in the obese group? Stating any
assumptions you make, perform an appropriate hypothesis test to
compare mean 24 hour total energy expenditure (MJ/day) between
the groups of lean and obese women. Comment on the results of this
hypothesis test.
(c) Calculate a 95% CI for the difference in mean 24 hour total energy
expenditure (MJ/day) between the groups of lean and obese women.
Discuss whether the confidence interval suggests that women in the
obese group might have higher total energy expenditure than women
in the lean group.
Magnesium 12 3 15
Placebo 3 14 17
146 TESTS FOR COMPARING TWO GROUPS OF CATEGORICAL OR CONTINUOUS DATA
(b) Do these data suggest that the mean daily dietary intake over the 10
pre and 10 post-menstrual days is different? Stating any assumptions
you make, perform an appropriate hypothesis test to compare mean
daily dietary intake (kJ/day) between the pre and post-menstrual
phases in this sample of 11 women. Comment on the results of this
hypothesis test.
(c) Calculate a 95% CI for the difference in mean daily dietary intake
(kJ/day) between the pre and post-menstrual phases in this sample of
11 women. Discuss whether the confidence interval suggests that
women might have a lower dietary intake in the post-menstrual phase
than women in the pre-menstrual phase.
This page intentionally left blank
9 Correlation, linear and
logistic regression
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
150 CORRELATION, LINEAR AND LOGISTIC REGRESSION
Summary
Correlation and linear regression are techniques for dealing with the relation-
ship between two or more continuous variables. In correlation we are looking
for a linear association between two variables, and the strength of the asso-
ciation is summarised by the correlation coefficient. In regression we are
looking for a dependence of one variable, the dependent variable, on another,
the independent variable. In linear regression the dependent variable is con-
tinuous whereas in logistic regression it is binary. The relationship is sum-
marised by a regression equation consisting of a slope and an intercept. In
linear regression the slope represents the amount the dependent variable
increases with unit increase in the independent variable, and the intercept
represents the value of the dependent variable when the independent vari-
able takes the value zero. In logistic regression the slope represents the
change in log odds for a unit increase in the independent variable and the
intercept the log odds when the independent variable is zero. In multiple
regression we are interested in the simultaneous relationship between one
dependent variable and a number of independent variables.
9.1 Introduction
Given two continuous variables measured on a group of subjects, possibly
the simplest question to ask in this situation is: ‘Are the variables associ-
ated?’. The first task would then be to plot the data. If the association appears
linear then it is reasonable to ask: ‘How strongly are they associated?’. This
is the question answered by correlation.
On the other hand, where it is believed that one variable is a direct cause
of the other, or that if the values of one variable is changed, then as a direct
consequence the other variable also changes, or if the main purpose of the
analysis is prediction of one variable from the other, then the associations
between them are better explored using regression rather than by simple
correlation. The simplest possible method of describing a relationship
between two continuous variables is by a straight line. In this case one
variable changes in proportion to the other, and this type of relationship
has proved very useful in medical research.
random sample of 20 women from the group are given in Table 9.1, which
we will use to illustrate the ideas underlying correlation and linear
regression.
It is not clear whether Hb affects PCV or the other way around. Here
one is interested in the association between these two variables and would
use correlation techniques.
On the other hand, if there is a relationship between Hb and age then
it is clear that it is growing old that affects Hb, and not the other way
around. Thus one might wish to predict a value of Hb given a patient’s
age, and so one would use regression for this purpose.
9.2 Correlation
Some facts about the correlation coefficient
In Chapter 3 we described methods of plotting data when associations
between two variables are to be explored. In such cases we would like a sta-
tistic that summarises the strength of the relationship, in much the same way
that the mean and standard deviation summarise the location and variability
of the data.
Table 9.1 Haemoglobin level (Hb), packed cell volume (PCV), age and menopausal
status in a group of 20 women
Subject number Hb (g/dl) PCV (%) Age (years) Menopause
0 = No, 1 = Yes
1 11.1 35 20 0
2 10.7 45 22 0
3 12.4 47 25 0
4 14.0 50 28 0
5 13.1 31 28 0
6 10.5 30 31 0
7 9.6 25 32 0
8 12.5 33 35 0
9 13.5 35 38 0
10 13.9 40 40 1
11 15.1 45 45 0
12 13.9 47 49 1
13 16.2 49 54 1
14 16.3 42 55 1
15 16.8 40 57 1
16 17.1 50 60 1
17 16.6 46 62 1
18 16.9 55 63 1
19 15.7 42 65 1
20 16.5 46 67 1
Figure 9.1 Scatter diagram of haemoglobin (Hb) and packed cell volume (PCV) in 20
women (+ marks an additional and hypothetical data point to illustrate an outlier)
9.2 CORRELATION 153
Figure 9.2 Scatter plots showing data sets with different correlations: (a) strong positive,
(b) weak positive, (c) uncorrelated and (d) weak negative
and age it does not matter whether blood pressure is measured in mmHg, lb
per square inch or kPa per square cm, or PCV expressed as a percentage or
a proportion, as the correlation coefficient remains unaffected.
The square of the correlation coefficient gives the proportion of the varia-
tion of one variable ‘explained’ by the other.
Figure 9.3 Examples where the use of the correlation coefficient is not appropriate
One situation where this may occur is if observations, say PCV and
Hb, are made on a group of patients, and also in a group of healthy
controls. Such studies may result in two distinct clusters of points with
zero correlation within each cluster but when combined produce the
same effect as the outlier in Figure 9.3(c).
(iv) The correlation coefficient should not be used in situations where one
of the variables is determined in advance.
For example, if one were measuring responses to different doses of
a drug, one would not summarise the relationship with a correlation
coefficient. It can be shown that the choice of the particular drug dose
levels used by the experimenter will result in different correlation coef-
ficients, even though the underlying dose-response relationship is fixed.
Thus if the dose range chosen to investigate is narrow estimates of the
correlation will tend to be small while if the doses are very disparate
the estimates will tend to be large.
Tests of significance
Having plotted the data, and established that it is plausible the two variables
are associated linearly, we have to decide whether the observed correlation
could have arisen by chance, since even if there were no association between
the variables, the calculated correlation coefficient is extremely unlikely to
be exactly zero. The associated statistical test of the null hypothesis r = 0 is
t = r/SE(r), where r is the estimated correlation coefficient calculated as
1 − r2
described in Section 9.6 and SE(r ) = . This follows a Students’
n−2
t-distribution with df = n − 2.
Figure 9.4 A scatter plot of haemoglobin and age in 20 women with the corresponding
fitted regression line
158 CORRELATION, LINEAR AND LOGISTIC REGRESSION
we had estimates for a and b then, for any subject i with value xi, we could
predict their yi by Yi = a + bxi. Clearly, we would like to choose a and b so
that yi and Yi are close and hence make our prediction error as small as pos-
sible. This can be done by choosing a and b to minimise the sum Σ(yi − Yi)2.
This leads us to call a and b the least-squares estimates of the population
parameters a and b. The model now becomes yi = a + bxi + ei. The ei are the
error terms and are usually assumed to be Normal and to have an average
value of zero. They are the amount that the observed value differs from that
predicted by the model, and represent the variation not explained by fitting
the straight line to the data.
All sample estimates like b have an inherent variability, estimated by the
SE(b). To calculate the degrees of freedom associated with the standard
error, given n independent pairs of observations, two degrees of freedom are
removed for the two parameters a and b that have been estimated; thus
df = n − 2.
that is the observed y minus the predicted y, denoted Yi against xi. These
are the sample estimates of the error terms ei defined earlier. If there is
any discernible relationship between the residuals ei and xi, then it is
likely that the relationship between yi and xi is not linear.
Figure 9.5 A scatter plot of residuals from linear regression against age
160 CORRELATION, LINEAR AND LOGISTIC REGRESSION
(iii) The residuals about the fitted line are Normally distributed.
This does not imply that the yi’s themselves must be Normally
distributed, or even that they must be continuous variables. Thus a
simple rating scale variable may take only values such as 0, 1, 2, 3,
but when related to some x variable by means of linear regression
may give residuals about that line that are Normally distributed. One
method of verifying Normality is to plot the histogram of the
residuals, with the best-fit Normal distribution superimposed on it.
An example of a best-fit Normal curve is given in Figure 5.4. A more
efficient way of examining the results is to plot the residuals against
their ordered Normal scores or Normal ordinates, as described in
Section 9.9, in which deviations from linearity indicate lack of
Normality.
Figure 9.6 A scatter plot of residuals from linear regression against fitted values
9.3 LINEAR REGRESSION 161
Figure 9.7 A scatter plot of residuals from the linear regression of Hb on age against
their ordered Normal scores
162 CORRELATION, LINEAR AND LOGISTIC REGRESSION
Figure 9.8 (a) A scatter plot of monthly number of AIDS cases in the UK from January
1983 to December 1986 against time, and (b) the residuals from linear regression against
time (Tillett et al, 1988)
Figure 9.9 Percentage of water in the cortex and longitudinal relaxation time T1 (reprinted
from The Lancet Vol i, Bell et al, Brain water measured by magnetic resonance imaging.
Correlation with direct estimation and changes after mannitol and dexamethasone, pp.
66–69, copyright © 1987, by permission of Elsevier)
with x = 1. This result is useful because computer packages that can carry out
regression can also be used to do t-tests.
and, as is often the case, has no real interpretation since such patients are
rare! However, it is usually produced by multiple regression programs and
is needed in the prediction equation. PCV and Age are the two indepen-
dent variables and the regression coefficients are the estimates of the b’s
in the regression equation. We therefore write
Predicted Hb = 5.24 + 0.097 (PCV) + 0.110 (Age).
The interpretation of the regression coefficient associated with PCV is
that for a given age, Hb increases by 0.097 g/dl for every unit increase in
PCV. Note that this is less than the value 0.134 calculated earlier when
age was not taken into account in the relationship. For a given value of
PCV, Hb increases by 0.110 g/dl for every year of age.
Every parameter estimate has associated with it a standard error. The
corresponding t-value is the regression coefficient estimate, b, divided
by its SE and the df are given by the number of observations minus the
number of estimated parameters – here a, bPCV and bAge. In this case,
df = 20 − 3 = 17. From these we can derive the p-value by use of Table T3.
These are given in Table 9.2. The p-values correspond to the probability
of observing that particular regression coefficient, or one more extreme,
on the null hypothesis assumption that the true regression coefficient is
in fact zero. Since the regression coefficient associated with PCV is still
highly significant, the conclusion is that Hb and PCV are related even
when age is taken into account.
Table 9.2 Output obtained from a multiple regression of the dependent variable Hb on
PCV and age
Variable Regression coefficient Estimate SE t p-value
Table 9.3 Output obtained from a multiple regression of Hb on age and menopausal
status
Variable Regression coefficient Estimate SE t p-value
Constant a 9.74
Age bAge 0.081 0.033 2.41 0.028
Menopause bMenopause 1.884 1.032 1.82 0.086
9.6 LOGISTIC REGRESSION 169
π ⎞
log ⎛ = α + β x.
⎝ 1−π ⎠
The values of the regression coefficients a and b are chosen as the ones
that give expected proportions that are closest (in a particular mathematical
sense) to the observed proportions, usually using a technique known as
maximum likelihood.
The above equation may be compared with that for linear regression in
Section 9.3. The right-hand side of the logistic equation has the same form,
but y on the left-hand side is replaced not by p, but by the so-called logit of
p. The essential reason for this is that p itself can take only values between
0 and 1, whereas the logit which is log[p/(1 − p)] may range from −∞ to +∞,
as can the continuous variable y. Essentially this transformation ensures that
the probabilities, which we want to estimate, lie between 0 and 1.
The logit transform has the useful property that if an independent variable,
x, in the model is binary with values 0 or 1, and has associated regression
coefficient b, then exp(b) is the odds ratio, OR, of someone with x = 1 having
a positive result.
Table 9.4 Output obtained from a logistic regression analysis with dependent variable
‘Anaemia’, independent binary variable ‘Age < 30’ (date of Table 9.1)
Variable Regression Estimate SE Wald* df p-value OR = exp(b30)
coefficient
Table 9.5 Relationship between anaemia and age in 20 women (data of Table 9.1)
Age < 30 x ‘Anaemic’ ‘Non-anaemic’ Total Proportion anaemic
Yes 1 2 3 5 0.40
No 0 2 13 15 0.13
Total 4 16 20
Table 9.6 Output obtained from a logistic regression analysis with dependent variable
‘Anaemia’, independent continuous variable ‘Age’ (date of Table 9.1)
Variable Regression Estimate SE Wald df p-value OR = exp(b30)
coefficient
Model checking
An important question is whether the logistic model describes the data well.
If the logistic model is obtained from grouped data, then there is no problem
comparing the observed proportions in the groups and those predicted by
the model.
There are a number of ways the model may fail to describe the data well
and these include:
1. lack of an important covariate
2. outlying observations
3. ‘extra-binomial’ variation.
174 CORRELATION, LINEAR AND LOGISTIC REGRESSION
The first problem can be investigated by trying all available covariates, and
the possible interactions between them. Provided the absent covariate is not
a confounder, then inference about the particular covariate of interest is
usually not affected by its absence. Suppose the proportion of people aged
under 25 in the study by Oakeshott et al (1998) was the same in each racial
group. For example the proportion of (say) Welsh people aged under 25 was
the same as the proportion of (say) English people aged under 25. Then the
estimated risk of chlamydial infection for people aged under 25 will not be
affected by whether race is or is not included in the model.
Outlying observations can be difficult to check when the outcome variable
is binary. However, some statistical packages do provide standardised
residuals; that is, residuals divided by their estimated standard errors.
These values can be plotted against values of independent variables to
examine patterns in the data. It is important also to look for influential
observations, perhaps a subgroup of subjects that if deleted from the analysis
would result in a substantial change to the values of regression coefficient
estimates.
Extra-binomial variation can occur when the data are not strictly indepen-
dent; for example, if the data comprise repeated outcome measures from
the same individuals rather than a single outcome from each individual,
or if patients are grouped for treatment which may be the case in an inter-
vention trial randomised by clusters rather than for each individual (see
Section 13.5). In such cases, although the estimates of the regression
coefficients are not unduly affected, the corresponding standard errors are
usually underestimated. This then leads to a Type I error rate higher than the
expected (say 5%).
∑ ( y − y )( x − x )
i i
i =1
r= .
n n
∑ (y − y) ∑ (x − x )
i
2
i
2
i =1 i =1
r
t= .
(1 − r ) ( n − 2 )
2
Linear regression
Given a set of pairs of observations (x1, y1), (x2, y2), . . . , (xn, yn) the regression
coefficient of y given x is
n
∑ ( x − x )( y − y )
i i
i =1
b= n
.
∑ (x − x )
i
2
i =1
Table 9.7 Relationship beween FEV1 and height in five patients with asthma
FEV1 (litres) Height (cm) xy y2 x2
y x
Exy = ∑ ( y − y ) − b2 ∑ ( x − x ) , Exx = ( n − 2 ) ∑ ( x − x ) ,
2 2 2
and hence
SE (b) = Exy Exx .
Then compare t = b/SE(b) with the distribution of Table T3 with
df = n − 2.
A 95% CI for the slope is given by
b − tn − 2,0.05 × SE (b) to b + tn − 2,0.05 × SE (b).
Table 9.8 Residuals for the linear regression of FEV1 and height in five patients with
asthma
FEV1 (litres) Height (cm) Predicted Residuals Ordered (i − ½)/5 zi
y x FEV1 residuals
-2 -1 0 1 2
Normal ordinate
Figure 9.10 Plot of the residuals calculated from the regression of Table 9.7 against
Normal ordinates. As this plot is approximately linear, we can see that there is no real
evidence of a lack of Normality for these data
9.10 EXERCISES 179
9.10 Exercises
1. A survey was conducted in 295 people asking about arthritic pain on a
visual analogue scale (can be treated as continuous) in 295 people. Sex
was coded 1 = male 0 = female. Medication was coded 1 = on medication
0 = not on medication.
The output from a multiple linear regression computer program is
shown in Table 9.8.
2. A survey was conducted and asked ‘do you consider your health to
be poor?’ This was coded 1 for ‘yes’ and 0 for ‘no’. The effect of age
(in decades) and sex on the outcome was examined using logistic
regression.
180 CORRELATION, LINEAR AND LOGISTIC REGRESSION
Logit estimates
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
182 SURVIVAL ANALYSIS
Summary
The major outcome variable in some clinical studies is the time measured
from patient or subject entry into a study until a pre-specified ‘critical event’
has occurred. These times often have a rather skewed distribution. However,
a key feature of ‘survival-time’ data is the presence of ‘censored’ observa-
tions. Censored observations arise in subjects that are included in the study
but for whom the critical event of interest has not yet been observed.
We describe the Kaplan–Meier survival curve, the Logrank test for compar-
ing two groups, the use of the hazard ratio for data summary and the
Cox proportional hazards regression model, which replaces linear regres-
sion when the continuous outcome data are survival times with censored
observations.
in any clinical trial in which the potential patients are those presenting
at a particular clinic over a period of time and not all on the same date.
The progress of patients recruited to the trial is then monitored for a
period as is described in the appropriate trial protocol. Also at some future
Survival
Time to Progression
Response Duration
Time to Response
Start of
Treatment Response Progression Death
Study End
Figure 10.1 Endpoints or critical events relevant to a clinical trial in children with
neuroblastoma
E L
E
End of
E F study
E
E F
E C
E F
E C
E F
date (calendar time) the trial will close and an analysis conducted. For a
patient recruited late in the trial, this may mean that some of their endpoint
observations will not be made. Thus for such a patient, in the example of
Figure 10.1, at the date of analysis only time to response may be observed,
in which case time to progression and survival time will both be censored
with the same survival time value, and response duration will also be
censored. The calendar time on which these censorings occur will be the
same date.
At this analysis (calendar) time, the patients will now be viewed as in the
lower panel of Figure 10.2, that is, time will be measured from the start of
entry to the study, that is by patient (follow-up) time rather than calendar
time.
Although survival time is a continuous variable one often cannot use
the standard t-test of Chapter 8 for analysis as the distribution of survival
times is unlikely to be Normal and it may not be possible to find a transfor-
mation that will make it so. However, the major reason for the use of
‘survival’ methods is not the shape of the distribution but the presence
of ‘censored’ observations. Censored observations arise in patients that
are included in a study but for whom the critical event of interest has not
yet been observed. For example, although some of the patients recruited
to a particular trial may have died and their survival time is calculable, others
may still be alive. The time from randomisation to the last date the live
patient was examined is known as the censored survival time. Thus in
Figure 10.2, although two patients ‘Fail’, three are ‘Censored’. Here failure
implies that the study endpoint has been reached (perhaps they have died),
while of those censored, two were censored as the trial analysis was con-
ducted while they were still known to be alive (they had therefore not yet
died), and one patient had been ‘Lost’. Essentially, ‘Lost’ means known
to have lived for the period indicated, and then ceased to be followed by
the study team for some reason. Perhaps the patient failed to return for
scheduled follow-up visits.
Censored observations can arise in three ways:
(i) The patient is known to be still alive when the trial analysis is carried
out.
(ii) Was known to be alive at some past follow-up, but the investigator has
since lost trace of him or her.
(iii) Has died of some cause totally unrelated to the disease in question.
Figure 10.3 Kaplan–Meier survival curves for time from randomisation to recurrence of
ulcerative colitis in 67 patients who had achieved remission by initially taking azathio-
prine. From Hawthorne et al (1992). Randomised controlled trial of azathioprine with-
drawal in ulcerative colitis. British Medical Journal, 305, 20–22: reproduced by permission
of the BMJ Publishing Group
If there are no censored observations, then the K-M survival curve for n patients
starts at time 0 with a value of 1 (or 100% survival) then continues horizontally
until the time the first death occurs, it then drops by 1/n at this point. The curve
then proceeds horizontally once more until the time of the second death when
again it drops by 1/n. This process continues until the time of the last death,
when the survival curve drops by the final 1/n to take a value of 0 (0%). If two
deaths happen to occur at the same time then the step down would be 2/n.
The K-M estimate of the survival curve when there are censored observa-
tions mimics this process but essentially ‘jumps’ over the ‘censored’ observa-
tions which then leads to steps down of unequal sizes. The precise method
of calculating the K-M survival curve is summarised below.
1. First, order (rank) the survival times from smallest to largest. If a cen-
sored observation and a time to death are equal, then the censored
observation is assumed to follow the death.
2. An event is a death. A censored observation has no associated event.
3. Determine the number at risk, ni, as the number of patients alive imme-
diately before the event at time ti.
4. Calculate the probability of survival from ti−1 to ti as 1− di /ni. Note that
we start at time zero with t0 = 0.
5. The cumulative survival probability, S(ti), is the probability of surviving
from 0 up to ti. It is calculated as
10.2 KAPLAN–MEIER SURVIVAL CURVE 187
When comparing two or more survival curves, we usually assume that the
mechanisms that result in censored observations occurring do not depend on
the group concerned, that is, the censoring is ‘non-informative’ in that it tells
us nothing relevant to the comparison of the groups. For example, in a ran-
domised clinical trial, it is assumed that patients are just as likely to be lost
to follow-up in one treatment group as in another. If there are imbalances in
such losses then this can lead to spurious differences in survival between
groups and false conclusions being drawn by the analysis.
On the K-M survival curve of Figure 10.4, the small spikes correspond to the
censored observations. Above each spike, the number of patients censored
at that time is given. In this example, all are marked ‘1’ except for the longest
censored observation at 365+ days where there is a ‘3’. When there are a
large number of patients and perhaps a large number of censored observa-
tions, the ‘spikes’ may clutter the K-M curve. In which case the numbers at
risk, which are a selection of the ni of Table 10.1, are tabulated at convenient
intervals beneath the K-M curves as illustrated.
188
Table 10.1 Illustration of calculations for the Kaplan–Meier survival curve and Logrank test in a clinical trial of 16 patients
Kaplan–Meier Logrank test
0 0 16 – 1 1 – 8 0
SURVIVAL ANALYSIS
2 33+ 15 0 1 0.938 A 7 0
3 42 14 1 0.929 0.871 B 6 0.429
4 55 13 1 0.923 0.804 A 6 0.462
5 69 12 1 0.917 0.737 A 5 0.417
6 100+ 11 0 1 0.737 B 4 0
7 130 10 2 0.800 0.590 A 4 0.800
8 130 A
9 210 8 1 0.875 0.516 B 2 0.250
10 250+ 7 0 B *
11 290+ 6 0 A
12 310+ 5 0 A
13 365+ 4 0 B
14 365+ B
15 365+ B
16 365+ B
*The expected number of events is not be calculated for times beyond the last recorded event – here 210 days.
10.3 THE LOGRANK TEST 189
1.00
1.
1.
0.75
Survival(%)
1. 1. 1. 1. 3.
0.50
0.25
0.00
Survival (days)
Number
at risk 16 14 11 10 8 7 6 5
Figure 10.4 Kaplan–Meier survival curve for the 16 patients of Table 10.1
The hazard ratio (HR) has been specifically developed for survival data,
and is used as a measure of the relative survival experience of two groups.
1.00
1. 1.
0.75
Survival(%) 1. 1. 3.
0.50
A B
1. 1.
0.25
0.00
Survival (days)
Figure 10.5 Kaplan–Meier survival curves by treatment group of the data of Table 10.1
It also turns out that if MA and MB are the respective median survival times
of two groups, then the inverse of their ratio, that is 1/(MA/MB) or MB/MA, is
approximately the HR.
2. Calculate: SE ( log HR ) = ⎛⎜
1 1 ⎞
+ , although this should strictly only
⎝ EA EB ⎟⎠
be used if the number of events EA + EB = OA + OB is relatively large.
10.5 MODELLING TIME TO EVENT DATA 193
the same age, and it may be that particular groups may have (on average)
higher values than others. Thus the hazard of developing dental caries
may be greater in those who live in areas where fluoridation has not
occurred. This leads us to quantify the benefit of fluoridation through the
ratio of hazards (the HR) in those from fluoridation areas to those from non-
fluoridation areas whose value may also be influenced by other factors such
as dietary intake and tooth brushing frequency.
In Chapter 9 we described linear regression techniques for continuous
data, logistic regression for binary data and both allowed the dependent vari-
able to be related to one or more independent variables or covariates x1, x2,
. . . xk. Although survival time is also a continuous variable the possibility of
censored observations has to be taken account of in the regression modelling
process. This leads us to the Cox proportional hazards regression model
which models, as the dependent variable, the instantaneous hazard, h(t), as
it is the change in this that ultimately determines our survival time.
The multivariable Cox model links the hazard to an individual i at time t,
hi(t) to a baseline hazard h0(t) by
log [ hi (t )] = log[h0 (t )] + β1 x1 + β 2 x2 + . . . + β k xk ,
where x1, x2, . . . , xk are covariates associated with individual i. The baseline
log hazard, log[h0(t)], serves as a reference point, and can be thought of as
the intercept, a, of a multiple regression equation of Chapter 9; for conve-
nience often labelled b0.
The Cox model is called the proportional hazards model because if we
imagine two individuals i and j, then the equation assumes that the ratio of
one hazard to the other, hi(t)/hj(t), remains constant at whatever time, t, we
consider their ratio. Thus irrespective of how h0(t) varies over time, the
hazards of the two individuals remain proportional to each other.
The above expression for the Cox model can also be written as
hi (t ) = h0 (t ) exp (β1 x1 + β 2 x2 + . . . + β k xk ).
More strictly hi(t) should be written hi(t; x1, x2, . . . , xk) as it depends both
on t and the covariates x.
Technical example
Assume x is a binary variable taking values 0 and 1 for males and females
respectively and the estimate of the regression coefficient, b, calculated
from the survival data of both groups using the Cox model gives b = 1.5 say.
With x = 0, hMale = exp(1.5 × 0) = 1.0 while with x = 1, hFemale = exp(1.5 × 1) =
exp(1.5) = 4.5. The associated HR = hFemale/hMale = exp(1.5 × 1)/ exp(1.5 × 0)
= 4.5/1.0 = 4.5. In this case, there is a greater risk of dying for females.
The Cox model, once fitted to the survival time data, provides a link to the
Logrank test and the associated HR. In fact, since log HR = b, the regression
coefficient itself is often referred to as the log hazard ratio.
When the Cox model includes several covariates, although the fitting pro-
cedure is straightforward using standard statistical packages, care should be
taken to avoid including too many variables in the multivariable model. It
has to be recognised that it is the number of events observed, rather than the
number of subjects in the study that is important. In very broad terms, for
every variable included in a multivariable Cox model a minimum of 10
(better 20) events should have been observed. This is to ensure that the
regression coefficients estimated have reasonable precision.
196 SURVIVAL ANALYSIS
1.00
Cumulative proportion healed
0.25 0.50
0.00 0.75
0 10 20 30 40 50
Initial leg ulcer healing time (weeks)
Figure 10.6 Healing times of initial leg ulcers by clinic and home care group From
Morrell et al (1998). Cost effectiveness of community leg clinics. British Medical Journal,
316, 1487–1491: reproduced by permission of the BMJ Publishing Group
Table 10.2 Cox multivariable proportional hazards regression model fitted to the healing
times of 213 patients with leg ulcers (data from Morrell et al, 1998)
b SE(b) z p-value HR = exp(b) 95% CI
Further details of the Cox model are given by Walters (2003), Campbell
(2006) and Machin et al (2006).
10.7 Exercises
1. In the clinical trial of Hancock et al. (2004) to compare a new treatment
for malignant melanoma (a form of skin cancer), patients were randomised
to one of two groups: treatment with low-dose interferon alfa-2a as adju-
vant therapy (Intervention – interferon), or no further treatment (Control
– observation). They were followed up until the patient died or 5 years
from randomisation. The survival times in years for a random sample of
10 patients from the Intervention group were as follows:
0.91, 1.30, 1.56, 2.59*, 3.74, 3.76*, 4.28, 4.43, 5.0*, 5.0*
(* A star indicates a censored observation.)
(a) Explain what is meant by a censored observation. Also explain the
meaning of the term hazard function.
(b) Construct the Kaplan–Meier survival curve for this random sample of
10 patients from the Intervention group and show it on a suitable
graph.
(c) The full trial involved 674 patients, with 338 randomised to the Inter-
vention group and 336 to the Control group. Figure 10.7 shows Kaplan–
Meier estimates of survival functions for the overall survival times for
the two treatment groups, and the results of a log-rank test.
Use Figure 10.7 to estimate the median overall survival times for the
two treatment groups. Is there a difference in the survival patterns of the
two treatment groups? Comment on the results of the Logrank test.
Previous studies have suggested that age, gender and histology are
important factors in predicting overall survival time. Cox proportional
hazards regression analysis was used to adjust survival times for these
prognostic variables.
Table 10.7 shows abbreviated computer output from two Cox regres-
sion models. In Analysis 1, a simple regression of overall survival time on
10.7 EXERCISES 199
Group
1.0
Control - Observation
0.6
0.4
0.2
(a) Interpret the hazard ratios for comorbid respiratory disease in the
univariate and multivariate analysis.
(b) Is comorbid cardiovascular disease a significant risk factor? Discuss
why the univariate and multivariate analyses differ. Is there any other
variable that changes significance in the multivariate analysis?
(c) Why do you think the hazard ratio for post-operative chest infection
is reduced?
(d) What assumption underlies the model for these variables? Do you
think it equally likely for all the variables?
11 Reliability and
method comparison
studies
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
202 RELIABILITY AND METHOD COMPARISON STUDIES
Summary
In the health sciences, often measurements are made which need to be vali-
dated. Physiotherapists may need a reliable method of measuring pain, an
occupational therapist a reliable method of assessing whether someone is
lifting a heavy weight correctly. In addition, different observers may come to
different conclusions. Radiologists may disagree on the interpretation of an
X-ray, physiotherapists on the level of pain actually experienced or patholo-
gists on the histological grade of a tumour. Many projects start with a pro-
posed method of measuring something, and the important question is: ‘Does
this instrument measure what it purports to measure?’ In many disciplines
new techniques evolve that are simpler or less invasive than earlier proce-
dures and an important question is whether the new procedure can be used
instead of the earlier one. This chapter has a different emphasis to preceding
ones in that we are not testing whether something is reliable but rather mea-
suring how reliable it is.
11.1 Introduction
Many measurements that are taken during any study require some degree of
subjective judgement, whether this is when taking a temperature with a ther-
mometer, assessing the results of diagnostic procedures or observing the effects
of therapies. As a consequence, were the same observer to repeat, or different
observers to appraise, the same outcome measure they may not obtain identi-
cal results. Observer agreement studies investigate the reproducibility of a
single observer, and the level of the consensus between different observers,
assessing the same unit, be it a specimen, radiograph or pathology slide.
Typically in observer agreement studies, several observers make assess-
ments on each of a series of experimental units and these assessments are
compared. For example, to examine the variation in measurements of the
volume of intracranial gliomas from computed tomography, different observ-
ers might evaluate scans from a series of patients. The values of tumour
volume so recorded could then be compared. In other circumstances, the
assessments may be of binary form such as a conclusion with respect to the
presence or absence of metastases seen on liver scintigraphy. Clearly, an ideal
situation is one in which all the observers agree and the answer is correct.
The correct answer can only be known if there is a ‘gold’ standard means of
assessment available. For some diseases this may be only possible at autopsy
but this is clearly too late for patient care purposes.
Assessment of reliability consists of determining that the process used for
measurement yields reproducible and consistent results. Any measurement
whether on a numerical scale or by more subjective means, should yield
11.2 REPEATABILITY 203
11.2 Repeatability
A basic requirement of a measurement is that it is repeatable; if the same
measurement is made on a second occasion, and nothing has changed then
we would expect it to give the same answer, within experimental error.
Coefficient of variation
For a continuous observation which is measured more than once a simple
measure of repeatability is the coefficient of variation (CV) which is the within
subject standard deviation divided by the mean.
100 × ( Within subject SD) 100 sWithin
CV = = ,
Mean x
where x and sWithin are calculated from continuous data obtained from the
same subject in a stable situation.
The CV is a measure of variation which is independent of the units in which
the observation is measured. It is often used in, for example, clinical biochem-
istry where repeated assays are made on a substance with known concentration
to test the assay method. Commonly a CV of <5% is deemed acceptable.
where sWithin and sBetween are the within and between subject standard
deviations.
If we only have one observation per person we cannot estimate the within
person standard deviation. If we have more than one observation per person,
we can estimate the standard deviation for each person and take the average
variance as an estimate of s 2Within. We can estimate the between person
variance from the variance of the means for each person as shown in
Section 11.5.
If the ICC is large (close to 1), then the within rater (or random error)
variability is low and a high proportion of the variance in the observations is
attributable to variation between raters. The measurements are then described
as having high reliability. Conversely, if the ICC is low (close to 0), then the
random error variability dominates and the measurements have low reliabil-
ity. If the error variability is regarded as ‘noise’ and the true value of raters’
scores as the ‘signal’, then the ICC measures the signal–noise ratio.
The ICC is the most commonly used method for assessing reliability with
continuous data. It is also sometimes used for ordered categorical data that
have more than four or five response categories. A value of at least 0.90 is
often recommended if the measurements of concern are to be used for evalu-
ating future patients for which therapeutic decisions are to be made.
In the context of a questionnaire, say to assess quality of life (QoL), if a
patient is in a stable condition, an instrument should yield repeatable and
reproducible results if it is used repeatedly on that patient. This is usually
assessed using a test–retest study, with patients who are thought to have
stable disease and who are not expected to experience changes due to treat-
ment effects or toxicity. The patients are asked to complete the same QoL
11.2 REPEATABILITY 205
Inappropriate method
Despite the ICC being the appropriate measure to use, the Pearson correla-
tion coefficient, r, of Sections 9.2 and 9.9, is sometimes mistakenly used in
this context. Clearly, if duplicate measures are made on n subjects, then r can
be calculated. However, repeated measurements may have a value of r close
to 1 and so be highly correlated yet may be systematically different. For
example, if the observer records consistently higher values on the first occa-
sion than on the second by (say) exactly 10 units on whatever measuring
instrument is being used, then there would be zero agreement between the
two assessments. Despite this, the correlation coefficient would be 1, indicat-
ing perfect association. So as well as good association, good agreement is
required, which implies near equality of the measures being taken.
11.3 Agreement
A common problem is measuring how well two observers make a binary
(Yes/No) diagnostic decision, say after examining a patient or perhaps a
specimen taken from a patient. A similar problem is how consistent does a
single observer make the same decision. To assess the latter, we would
require the same assessments to be repeated by the same observer. For
example, the same slide would need to be reviewed by the pathologist on
two occasions. The second review would need to be undertaken ‘blind’ to the
results of the first review and clearly some time later. A ‘wash-out’ period
long enough to ensure that the pathologist did not ‘recognise’ the slide but
not too much later if the period may cause deterioration of the specimen or
after the observer (now more experienced) changes his/her methods in a
systematic way.
For a single observer examining the same specimen on two occasions, or
two observers examining the same specimen but independently of each other,
the degree of reproducibility is quantified by the probability of making a
chance error. In the context of making a definitive (and binary) diagnosis,
this is the probability of ascribing either absent (coded 0) to a diagnosis when
it should be present (coded 1), or a 1 to a diagnosis that should be 0. For
NRepeat specimens this process is described in Table 11.2.
One method of measuring whether a reviewer agrees with themselves, or
two reviewers agree, is simply to calculate the percentage of occasions the
same response is obtained.
The observed values in the diagonal (in bold) are O11 = 22, O22 = 7,
O33 = 36 and O44 = 7. The corresponding expected values are E11 = 26 ×
27/112 = 6.27, E22 = 2.79, E33 = 22.39 and E44 = 1.38. Further, pObserved = (22
+ 7 + 36 + 7)/112 = 0.64 and pExpected = (6.27 + 2.79 + 22.39 + 1.38)/112 =
0.29. Hence, k = (0.64 − 0.29)/(1 − 0.29) = 0.49. This is only ‘moderate’
agreement and such a low value may then stimulate the pathologists con-
cerned to review their classification methods in detail.
I II III IV
I 22 2 2 0 26
II 5 7 14 0 26
III 0 2 36 0 38
IV 0 1 14 7 22
Totals 27 12 66 7 112
11.4 VALIDITY 209
11.4 Validity
Cronbach’s alpha (aCronbach)
Some questionnaires, such as those used to assess concepts such as anxiety
and depression in patients often comprise a series of questions. Each question
is then scored, and the scores combined in some way to give a single numeri-
cal value. Often this is done by merely summing the scores for each answer
to give an overall scale score. The internal validity of each of the component
questions of the scale is indicated if they are all positively correlated with
each other; a lack of correlation of two such items would indicate that at least
one of them was not measuring the concept in question. Alternatively, one
might frame a question in two different ways, and if the answers are always
similar, then the questions are internally consistent.
A measure of internal consistency is Cronbach’s alpha, aCronbach (sometimes
spelled Chronbach). It is essentially a form of correlation coefficient; a value
of 0 would indicate that there was no correlation between the items that make
up a scale, and a value of 1 would indicate perfect correlation.
If a questionnaire has k items, and this has been administered to a group
of subjects, then the standard deviation, si, of the ith item and sT the standard
deviation of the sum score T of all the items is required. From which
α Cronbach =
k ⎛
1 −
∑ si2 ⎞ .
k − 1 ⎜⎝ sT2 ⎟⎠
A worked example is given in Section 11.7. For comparing groups, aCronbach
values of 0.7 to 0.8 are regarded as satisfactory, although for clinical applica-
tions much higher values are necessary. However, a value of 1 would indicate
that most of the questions could in fact be discarded, since all the information
is contained in just one of them. Cronbach’s a is essentially a measure of how
correlated items are. Clearly, one would like items that all refer so a single
concept such as pain to be related to each other. However, if they are too
closely related then some of the questions are redundant. When constructing
a questionnaire, one might omit items which have a weak or very strong cor-
relation with other items in the domain of interest.
0 1 2 3 4 5
Vitalograph (l)
Respiradyne (l) y
Figure 11.1 FEV1 (litres) in 56 subjects by two different spirometers with the line of
equality
11.5 METHOD COMPARISON STUDIES 211
.5
0
d=y-x
-.5
-1
0 1 2 3 4 5
(y + x)/2
Figure 11.2 Scatter diagram of the difference between methods against the mean of both
for the data of Figure 11.1
2
Thus sBetween = 0.0676 − 0.0075/2 = 0.06385.
Table 11.4 FEV1 (in litres) for four patients measured on two
occasions
Subject FEV1 (litres)
1 1 1 2 4
2 3 3 2 8
3 5 5 4 14
4 3 2 3 8
SD 1.63 1.71 0.95 4.12
α Cronbach =
k ⎛
1 −
∑ si2 ⎞ .
k − 1 ⎜⎝ sT2 ⎟⎠
Thus for our data k = 3, and Σsi2 = 1.632 + 1.712 + 0.952 = 6.4835, sT2 = 16.9744
and so a = 1.5(1 − 6.4835)/16.9744 = 0.927.
The reason that aCronbach is a measure of correlation is as follows. If X1 . . . Xk
are independent random variables, and T = X1 + . . . + Xk then Var(T) =
Var(X1) + . . . + Var(Xk) and so the numerator and denominator in the braces
in the equation for aCronbach are the same and so aCronbach = 0. If X1 . . . Xk are
perfectly correlated so that X1 = X2 = . . . = Xk then T = kX1 and Var(T) =
k2Var(X1), whereas ΣVar(Xi) = kVar(X1). Thus the ratio in the braces is now
1/k and so aCronbach = 1.
11.8 Exercises
1. Collecting a urine sample in young non-toilet trained children can be chal-
lenging. The standard method is a urine collection bag device, but this is
uncomfortable and can be contaminated. Farrell et al (2002) compare the
bag, with the use of an absorbent sanitary pad. They studied 20 children
and used the methods concurrently and their results are summarised in
Table 11.6.
Find Cohen’s kappa and interpret.
Bacteria present 2 0 2
Bacteria absent 3 15 18
Total 5 15 20
2. Bland and Altman (1997) describe the mini-HAQ that measures impair-
ment in patients with cervical myelopathy. There are 10 items relating to
activities of daily living: stand, get out of bed, cut meat, hold cup, walk,
climb stairs, wash, use toilet, open a jar and enter/leave a car. The standard
deviations from 10 questions in 2549 subjects are respectively: 1.04, 1.11,
1.12, 1.06, 1.04, 1.04, 1.01, 1.09, 1.02 1.03. The 10 items were summed for
each subject and the SD of the total score was 8.80. Calculate and comment
on the value of aCronbach.
This page intentionally left blank
12 Observational studies
12.1 Introduction 218
12.2 Risk and rates 218
12.3 Taking a random sample 220
12.4 Questionnaire and form design 221
12.5 Cross-sectional surveys 222
12.6 Non-randomised studies 224
12.7 Cohort studies 227
12.8 Case–control studies 231
12.9 Association and causality 237
12.10 Points when reading the literature 238
12.11 Technical details 238
12.12 Exercises 239
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
218 OBSERVATIONAL STUDIES
Summary
This chapter considers the design of observational studies: cross-sectional
surveys, case–control studies and cohort studies together with the problems
of inferring causality from such studies. A vital tool for eliciting information
from subjects is the questionnaire and we discuss how these may be con-
structed and also how samples may be chosen.
12.1 Introduction
In an observational study one cannot determine which subjects get exposed
to a risk, or given a new treatment. This is in contrast to the randomised
controlled trial, to be described in Chapter 13. In many situations where an
investigator is looking for an association between exposure to a risk factor
and subsequent disease, it is not possible to randomly allocate exposure
to subjects; you cannot insist that some people smoke and others do not,
or randomly expose some industrial workers to radiation. Thus, studies
relating exposure to outcome are often observational; the investigator
simply observes what happens and does not intervene. The options under
the control of the investigator are restricted to the choice of subjects,
whether to follow them retrospectively or prospectively, and the size of the
sample.
The major problem in the interpretation of observational studies is that
although an association between exposure and disease can be observed, this
does not necessarily imply a causal relationship. For example, many studies
have shown that smoking is associated with subsequent lung cancer. Those
who refuse to believe causation argue, however, that some people are geneti-
cally susceptible to lung cancer, and this same gene predisposes them to
smoke! Factors that are related to both the exposure of a risk factor and the
outcome are called confounding factors (see Figure 1.1 in Chapter 1). In
observational studies it is always possible to think of potential confounding
factors that might explain away an argument for causality. However, some
methods for strengthening the causality argument are given later in the
chapter.
Thus if 100 people sat down to a meal and 10 suffered food poisoning, we
would say the risk of food poisoning was 0.1 or 10%.
Often, however, we are interested in the number of events over a period
of time. This leads to the definition of a rate, which is the number of events,
for example deaths or cases of disease, per unit of population, in a particular
time span. For example, Figure 4.1 shows that the crude United Kingdom
mortality rate per person per year is about 0.010. Since this is a small number
we usually multiply it by a larger number such as 1000, and express the mor-
tality rate as 10 deaths per 1000 population per year.
To calculate a rate the following are needed:
• a defined period of time (for example, a calendar year);
• a defined population, with an accurate estimate of the size of the popula-
tion during the defined period (for example the population of a city, esti-
mated by a census);
• the number of events occurring over the period (for example the number
of deaths occurring in the city over a calendar year).
The event could be a permanent one (like death) or a temporary one (like
a cold). For a permanent event the person is no longer at risk of the event,
and is removed from the ‘at risk’ population. Strictly, we should measure all
the time that each member of the population is at risk.
Incidence is defined as
Number of events in defined period
Incidence = × 1000
Total person-time at risk
When the number of events is relatively small compared with the popula-
tion at risk, then the total person-time at risk can be approximated by the
mid-period population multiplied by the length of the period.
The incidence rate refers to the number of new cases of a particular disease
that develop during a specified time interval. The prevalence (which is strictly
not a rate since no time period is specified) refers to the number of cases of
disease that exist at a specified point in time.
Often the time period is implicit and risk and incidence are used
synonymously.
Types of questions
There are two major types of question: open or closed. In an open question
respondents are asked to reply in their own words, whereas in a closed ques-
tion the possible responses are given.
The advantages of open type questions are that more detailed answers are
possible. They give the responders the feeling that they can express their own
ideas. On the other hand, they take more time and effort to complete and
they can be difficult to code and hence analyse since there may be a wide
variety of disparate responses from different individuals. Closed questions
can be answered by simply circling or ticking responses. When constructing
responses to closed questions it is important to provide a suitable range of
replies, or the responder may object to being forced into a particular cate-
gory, and simply not answer the question. A useful strategy is to conduct a
pilot study using open questions on a limited but representative sample of
people. From their responses one can then devise suitable closed questions.
Another type of closed question is to make a statement and then ask
whether the respondent agrees or disagrees. When a closed question has an
odd number of responses, it is often called a Likert scale.
Some researchers prefer to omit central categories, such as ‘average’ or
‘don’t know’ so as to force people to have an opinion. The danger is that if
people do not wish to be forced, then they will simply not reply.
222 OBSERVATIONAL STUDIES
from the list and the questionnaire be sent to this sample. The sampling
proportion will have to be chosen carefully. It is important that those who
are selected be selected by an appropriate random sampling technique.
In some situations a visit by an interviewer to those included in the sample
may be more appropriate. However, this may be costly both in time and
money and will require the training of personnel. As a consequence this will
usually involve a smaller sample than that possible by means of a postal
questionnaire. On the other hand, response rates to postal questionnaires
may be low. A low response rate can cause considerable difficulty in
interpretation of the results as it can always be argued (whether true or not)
that non-responders are atypical with respect to the problem being investi-
gated and therefore estimates of prevalence, necessarily obtained from the
responders only, will be inherently biased. Thus, in a well-designed survey,
one makes every attempt to keep the numbers of non-responders to a
minimum, and takes the potential response rate into account when estimat-
ing sample size.
Volunteers often present considerable problems in cross-sectional surveys.
When the object of interest is a relationship within subjects, for example
physiological responses to increasing doses of a drug, then one cannot avoid
the use of volunteers. However, suppose one was interested in the prevalence
of hypertension in the community. One approach would be to ask volunteers
to come forward by advertising in the local newspaper. The difficulty here is
that people may volunteer simply because they are worried about their blood
pressure (this is known as selection bias) and also there is no way one can
ascertain the response rate, or investigate reasons why people did not volun-
teer. A better approach would be to take a random sample from the com-
munity, either from an electoral roll, general practitioners’ lists or a telephone
list, and then invite each one individually to have their blood pressure
measured. In that way the response rate is known and the non-responders
identified.
Market research organisations have complex sampling schemes that often
contain elements of randomisation. However, in essence they are grab or
convenience samples, in that only subjects who are available to the inter-
viewer can be questioned. So-called quota samples ensure that the sample is
representative of the general population in say, age, gender and social class
structure. Problems associated with the interpretation of quota samples are
discussed in detail by Machin and Campbell (2005). They are not recom-
mended, in general, for use in medical research.
Other biases are possible in cross-sectional studies. Consider a cross-
sectional study that reveals a negative association between height and age.
Possible interpretations include: people shrink as they get older, younger
generations are getting taller, or tall people have a higher mortality than
short people!
224 OBSERVATIONAL STUDIES
Successive patients in the 1978 series who had had a CT scan were
matched by age, diagnosis and level of consciousness with patients in the
1974 series. A total of 29 matched pairs were obtained and their survival
times compared. The results, given in Table 12.1, Column 2, appeared to
show a marked improvement in the 1978 patients over those from 1974
with 31% with better survival and only 7% worse. This was presumed to
be due to the CT scanner.
However, the study was then extended to an analysis of the 1978 patients
who had not had a CT scan (Table 12.1, Column 3) compared with a
matched group of 89 patients from 1974 using the same matching criteria.
This second study again found an improvement; with 38% of the 1978
patients were doing better than the 1974 patients, and 19% doing
worse. Taking the two components of the study together, then whether
or not patients had received a CT scan, the outcome had improved over
the years.
In the absence of the control study, the comparison of patients who had
had no CT scan, the investigators may well have concluded that the installa-
tion of a CT head scanner had improved patient survival time. There are two
possible explanations of the apparent anomaly. One is to suppose that other
improvements in treatment, unrelated to CT scanning, had taken place
between 1974 and 1978. The other is to ask what would a clinician do with a
stroke patient even if he knew the outcome of a CT scan? The answer is,
usually, very little. It is therefore possible that the patients in 1978 were, in
fact, less seriously ill than those in 1974, despite the attempts at matching,
and hence would live longer.
However, in certain circumstances before-and-after studies without control
groups are unavoidable if the design is not in the direct control of the inves-
tigator. Such situations may arise when national policy legislates for a change,
for example compulsory seat belt wearing, the value of which may still need
to be evaluated.
Yes No
Quasi-experimental designs
A prospective study that has both a test group and a control group, but
in which the treatment is not allocated at random, is known as a quasi-
experimental design. It is often used to take advantage of information on the
merits of a new treatment which is being implemented in one group of
patients, but where randomisation is difficult or impossible to implement.
The main disadvantage of a quasi-experimental study is that, because treat-
ments are not randomised to the subjects, it is impossible to state at the outset
that the subjects are comparable in the two groups. Thus, for example, when
comparing survival rates in patients undergoing different types of surgery,
each performed by different surgeons, it is possible that different surgeons
will have different selection thresholds of risk for admitting patients to surgery.
As a consequence, any difference in mortality observed between types of
surgical intervention may be clouded by systematic patient differences, and
hence not reflect the relative mortality of the surgical alternatives.
Design
The progress of a cohort study is described in Figure 12.1 and Table 12.2
provides the corresponding notation. Thus members of the ‘without’ disease
group are first identified (clearly those who already have the disease of inter-
est are not of concern here) and their ‘exposure’ status determined. They are
then followed for a pre-specified duration after which time their disease
status (Present/Absent) is determined.
Relative risk From Table 12.2, the risk of developing the disease within the
follow-up time is a/(a + c) for the exposed population and b/(b + d) for the
unexposed population.
The relative risk (RR) is the ratio of these two, that is
a (a + c ) a (b + d )
RR = = .
b (b + d ) b (a + c )
228 OBSERVATIONAL STUDIES
Yes a b a+b
No c d c+d
Total a+c b+d N
Attributal risk The terminology is not standard, but if IPopulation is the inci-
dence of a disease in the population and IExposed and INon-Exposed are the inci-
dence in the exposed and non-exposed respectively. Then the excess incidence
attributable to the risk factor is simply IPopulation − INon-Exposed and the population
attributable risk is
AR = (IPopulation − INon-Exposed)/IPopulation.
that is the proportion of the population risk that can be associated with the
risk factor.
Some authors define the excess risk (or absolute risk difference) as IExposed
− INon-Exposed and the population attributable risk as (IExposed − INon-Exposed)/
INon-Exposed, but the definition given above has the advantage of greater
logical consistency.
If we define, from Table 12.2, qExposed = (a + b)/N to be the proportion of
the population of size N exposed to the risk factor, then it can be shown
that
θ Exposed( RR − 1)
AR = .
1 + θ Exposed( RR − 1)
The advantage of this formula is that it enables us to calculate the attribut-
able risk from the relative risk, and the proportion of the population exposed
to the risk factor. Both of these can be estimated from cohort studies and
also from case–control studies in certain circumstances when the controls are
a random sample of the population.
230 OBSERVATIONAL STUDIES
Size of study
The required size of a cohort study depends not only on the size of the risk
being investigated but also on the incidence of the particular condition under
investigation. In the vasectomy example, cardiovascular events are not par-
ticularly rare among a cohort of men aged 40–50, and this may determine
that the cohort of middle-aged men be investigated. On the other hand, if a
rare condition were being investigated very few events would be observed
amongst many thousands of subjects, whether exposed to the ‘insult’ of inter-
est or not. This usually prevents the use of cohort studies to investigate aetio-
logical factors in rare diseases.
Post-marketing surveillance
Post-marketing surveillance is a particular type of cohort study carried out
on a population of people receiving an established drug. In such an example
a drug that is in routine use nationwide may be monitored; not for its efficacy
but for any untoward medical event happening to patients receiving the drug.
The incidence of such adverse events with the new drug is then compared
with the incidence in patients receiving alternatives to the new medicine.
quantitative, the average levels of the risk factor in the cases and controls
are utilised.
The design and progress of a case–control study is shown in Figure 12.2.
Here we identify people with a disease and select a group of controls
who do not have the disease. We then retrospectively determine whether,
in the past, how much exposure to the risk factor of interest each group
has had.
There are two possible variations in design. The control subjects can
be chosen to match individual cases for certain important variables such
as age and gender, leading to what is known as a matched design. Alterna-
tively, the controls can be a sample from a suitable non-diseased popula-
tion, leading to an unmatched design. It is a common misconception that
there must be matching criteria in all case–control studies, but this is not
so. However, it is important that the statistical analysis utilised reflects the
chosen design.
Unmatched study
As just indicated, in an unmatched design the controls can be a sample from
a suitable non-diseased population and Table 12.4 gives the notation for this
situation.
Exposed a b
Not exposed c d
Total a+c b+d
12.8 CASE–CONTROL STUDIES 233
Matched studies
In some case–control studies each case is matched on an individual basis with
a particular control. In this situation the analysis should take matching
into account. The notation for a matched case–control study is given in
Table 12.6.
In this situation we classify each of the N case–control pairs by exposure
of the case and the control. An important point here is that the concordant
pairs, that is, situations where the case and control are either both exposed
or both not exposed, tell us nothing about the risk of exposure separately
for cases or controls. Consider a situation where it was required to discrimi-
nate between two students in tests that resulted in either a simple pass
or fail. If the students are given a variety of tests, in some they will both
pass and in some they will both fail. However, it is only by the tests
where one student passes and the other fails, that a decision as to who is
better can be given.
The odds ratio for a matched case–control study is given by
OR = f/g.
Exposed e f a
Not exposed g h c
Total b d N
12.8 CASE–CONTROL STUDIES 235
The odds ratio for a key worker on holiday as a risk for suicide is given by
OR = 19/7 = 2.7, with 95% CI 1.09 to 7.64 (see Section 12.11) suggesting that
this may be an important, albeit quite uncommon risk factor.
Analysis by matching?
In many case–control studies matching is not used with the control of bias or
increase of precision of the odds ratio in mind, but merely as a convenient
criterion for choosing controls. Thus for example, a control is often chosen
to be of the same sex, of a similar age and with the same physician as the
case for convenience. The question then arises whether one should take this
matching into account in the analysis. The general rule is that the analysis
should reflect the design. Matched and unmatched analyses will give similar
results if, in the notation of Table 12.6, f × g is close to e × h. This is clearly
not the case in the suicide example of Table 12.7.
Selection of controls
The general principle in selecting controls is to select subjects who might have
been cases in the study, and to select them independently of the exposure
Yes 0 19 19
No 7 267 274
Total 7 286 293
From King et al (2001). The Wessex Recent Inpatient Suicide Study:
a case control study of 234 recently discharged psychiatric patient
suicides. British Journal of Psychiatry, 178, 531–536: by permission of
The Royal College of Psychiatrists.
236 OBSERVATIONAL STUDIES
variable. Thus if the cases were all treated in one particular hospital the
controls should represent people who, had they developed the disease, would
also have gone to the same hospital. Note that this is not the same as select-
ing hospital controls (see the example below). Since a case–control study is
designed to estimate relative, and not absolute, risks, it is not essential that
the controls be representative of all those subjects without the disease, as has
been sometimes suggested. It is also not correct to require that the control
group be alike in every respect to the cases, apart from having the disease of
interest. As an example of this ‘over-matching’ consider a study of oestrogens
and endometrial cancer. The cases and controls were both drawn from women
who had been evaluated by uterine dilatation and curettage. Such a control
group is inappropriate because agents that cause one disease in an organ
often cause other diseases or symptoms in that organ. In this case it is possible
that oestrogens cause other diseases of the endometrium, which requires
the women to have dilatation and curettage and so present as possible
controls.
The choice of the appropriate control population is crucial to a correct
interpretation of the results.
Confounding
Confounding arises when an association between an exposure and an outcome
is being investigated, but the exposure and outcome are both strongly associ-
ated with a third variable. An extreme example of confounding is ‘Simpson’s
paradox’, when the third factor reverses the apparent association between
the exposure and outcome.
No Yes
No Yes No Yes
SE ( log RR ) = ⎛ −
1 1 1 1 ⎞
+ −
⎝ a a + c b b + d⎠
The reason for computing the standard error on the logarithmic scale is
that this is more likely to be Normally distributed than the RR itself. It is
12.12 EXERCISES 239
important to note that when transformed back to the original scale, the con-
fidence interval so obtained will be asymmetric about the RR. There will be
a shorter distance from the lower confidence limit to the RR than from the
RR to the upper confidence limit.
Worked example
From the data of Table 12.3
SE ( log RR ) = ⎛
1 1 1 1 ⎞
− + − = 0.061.
⎝ 379 726 230 529 ⎠
Thus a 95% CI for log(RR) is 0.191 − 1.96 × 0.061 to 0.191 + 1.96 × 0.061
or 0.071 to 0.310.
The corresponding 95%CI for the RR is 1 .07 to 1.36.
Worked example
For the data of Table 12.5, OR = 1.01 and so log OR = 0.01, while
1 1 1 1
SE ( log OR ) = + + + = 0.083.
537 534 639 622
This gives a 95% CI of −0.14 to 0.17.
The corresponding 95% CI for the OR is exp(−0.14) to exp(0.17) or 0.87
to 1.19.
12.12 Exercises
1. What type of study is being described in each of the following
situations?
(a) All female patients over the age of 45 on a general practitioner’s list
were sent a questionnaire asking whether they had had a cervical
smear in the last year.
240 OBSERVATIONAL STUDIES
(b) A group of male patients who had had a myocardial infarction (MI)
were asked about their egg consumption in the previous month. A
similar-sized group of males of the same age who had not had an MI
were also asked about their egg consumption in the last month, to
investigate whether egg consumption was a risk factor for MI.
(c) A secondary school’s records from 50 years previously were used to
identify pupils who were active in sport and those who were not. These
were traced to the present day, and if they had died, their death cer-
tificates were obtained to see whether the death rates were different
in the two groups.
(d) A new method of removing cataracts (phacoemulsification) has
been developed. Eye surgeons are randomised to receive training
in the new technique immediately or after one year. The outcome of
patients in the two groups is compared in the 6 months following
randomisation.
(e) A new centre for chiropractic opens in town. An investigator com-
pares the length of time off work after treatment for patients with
back pain who attend the chiropractic centre and those who attend
the local hospital physiotherapy centre over the same period.
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
242 THE RANDOMISED CONTROLLED TRIAL
Summary
This chapter emphasises the importance of randomised clinical trials in evalu-
ating alternative treatments or interventions. The rationale for, and methods
of, randomising patients are given. We delineate the ‘ABC’ of clinical trials:
Allocation at random, Blindness and Control. The value of a study protocol
is stressed. Different types of randomised trials, such as factorial, cluster and
cross-over trials are described and we distinguish between those to estab-
lished superiority from those that seek equivalence. Checklists of points to
consider when designing, analysing and reading the reports describing a clini-
cal trial are included. We also discuss the use of the summary statistic Number
Needed to Treat (NNT).
13.1 Introduction
A clinical trial is defined as a prospective study to examine the relative effi-
cacy of treatments or interventions in human subjects. In many applications
one of the treatments is a standard therapy (control) and the other a new
therapy (test).
Even with well established and effective treatments it is well recognised
that individual patients may react differently once these are administered.
Thus aspirin will cure some with headache speedily whilst others will con-
tinue with their headache. The human body is a very complex organism,
whose functioning is far from completely understood, and so it is not surpris-
ing that it is often difficult to predict the exact reaction that a diseased indi-
vidual will have to a particular therapy. Even though medical science might
suggest that a new treatment is efficacious, it is only when it is tried in practice
that any realistic assessment of its efficacy can be made and the presence of
any adverse side-effects identified. Thus it is necessary to do comparative
trials to evaluate the new treatment against the current standard.
Although we are concerned with the use of statistics in all branches of
medical activity, this chapter is focussed primarily on the randomised clinical
trial because it has a central role in the development of new therapies. It
should be emphasised, however, that randomised controlled trials are relevant
to other areas of medical problems and not just therapeutic interventions; for
example, in the evaluation of screening procedures, alternative strategies
for health education and in the evaluation of contraceptive efficacy.
for the study, there is one extra question to answer. This is: ‘Are each of the
treatments under study appropriate for this particular patient?’ If the answer
is ‘Yes’ the patient is then randomised. If ‘No’ the patient is not included in
the trial and would receive treatment according to the discretion of the physi-
cian. It is important that the physician does not know, at this stage, which of
the treatments the patient is going to receive if they are included in the trial.
The randomisation list should therefore be prepared and held by separate
members of the study team or distributed to the clinician in charge in sealed
envelopes to be opened only once the patient is confirmed as eligible for
the trial.
The ethical justification for a physician to randomise a patient in a clinical
trial is his or her uncertainty as to the best treatment for the particular
patient.
Historical controls
In certain circumstances, however, randomisation is not possible; one classic
example is the first studies involving heart transplantation and the subse-
quent survival experience of the patients. At that time, it would have been
difficult to imagine randomising between heart transplantation and some
other alternative, and so the best one could do in such circumstances was to
compare survival time following transplant with previous patients suffering
from the same condition when transplants were not available. Such patients
are termed historical controls. A second possibility is to make comparisons
with those in which a donor did not become available before patient death.
There are difficulties with either approach. One is that those with the most
serious problems will die more quickly. The presence of any waiting time for
a suitable donor implies only the less critical will survive this waiting time.
This can clearly bias comparisons of survival experience in the transplanted
and non-transplanted groups. For this reason one should interpret studies
which use historical controls with care.
patient. This has several advantages: it removes the possibility of the physi-
cian not randomising properly; it will usually be more efficient in that a list
may be computer generated very quickly; it also allows some difficulties with
simple randomisation to be avoided.
To avoid the use of a coin or die for simple randomisation one can consult
a table of random numbers such as Table T2. Although Table T2 is in fact
computer generated, the table is similar to that which would result from
throwing a 10-sided die, with faces marked 0 to 9, on successive occasions.
The digits are grouped into blocks merely for ease of reading. The table is
used by first choosing a point of entry, perhaps with a pin, and deciding the
direction of movement, for example along the rows or down the columns.
Suppose the pin chooses the entry in the 10th row and 13th column and
it had been decided to move along the rows; the first 10 digits then give
534 55 425 67; even numbers assigned to A and odd to B then generate
BBA BBAAB AB. Thus of the first 10 patients recruited four will receive
A and 6 B.
Although simple randomisation gives equal probability for each patient to
receive A or B it does not ensure, as indeed was the case with our example,
that at the end of patient recruitment to the trial equal numbers of patients
received A and B. In fact even in relatively large trials the discrepancy from
the desired equal numbers of patients per treatment can be quite large. In
small trials the discrepancy can be very serious perhaps, resulting in too few
patients in one group to give acceptable statistical precision of the corre-
sponding treatment effect.
Blocked randomisation
To avoid such a problem, balanced or restricted randomisation techniques
are used. In this case the allocation procedure is organised in such a way that
equal numbers are allocated to A and B for every block of a certain number
of patients. One method of doing this, say for successive blocks of four
patients, is to generate all possible combinations but ignoring those, such as
AAAB, with unequal allocation. The valid combinations are:
1 AABB 4 BABA
2 ABAB 5 BAAB
3 ABBA 6 BBAA
These combinations are then allocated the numbers 1 to 6 and the ran-
domisation table used to generate a sequence of digits. Suppose this sequence
was 534 55 425 67 as before, then reading from left to right we generate the
allocation BAAB ABBA BABA BAAB for the first 16 patients. Such a
246 THE RANDOMISED CONTROLLED TRIAL
device ensures that for every four successive patients recruited balance
between A and B is maintained. Should a 0, 7, 8 or 9 occur in the random
sequence then these are ignored as there is no associated treatment combina-
tion in these cases. It is important that the investigating physician is not aware
of the block size, otherwise he or she will come to know, as each block of
patients nears completion, the next treatment to be allocated. This fore-
knowledge can introduce bias into the allocation process since the physician
may subconsciously avoid allocating certain treatments for particular patients.
Such a difficulty can be avoided by changing the block size at random as
recruitment continues.
In clinical trials which involve recruitment in several centres, it is usual to
use a randomisation procedure for each centre to ensure balanced treatment
allocation within centres. Another important use of this stratified randomisa-
tion in clinical trials is if it is known that a particular patient characteristic
may be an important prognostic indicator perhaps good or bad pathology
then equal allocation of treatments within each prognostic group or strata
may be desirable. This ensures that treatment comparisons can be made
efficiently, allowing for prognostic factors. Stratified randomisation can be
extended to more than one stratum, for example, centre and pathology, but
it is not usually desirable to go beyond two strata.
One method that can balance a large number of strata is known as mini-
misation. One difficulty with the method is that it requires details of all
patients previously entered into the trial, before allocation can be made.
The above discussion has used the example of a randomised control trial com-
paring two treatments as this is the simplest example. The method extends
relatively easily to more complex designs, however. For example, in the case of
a 2 × 2 factorial design involving four treatments, the treatments, labelled A, B,
C and D, could be allocated the pair of digits 0-1, 2-3, 4-5 and 6-7 respectively.
The random sequence 534 55 425 67 would then generate CBC CCCBC DD;
thus in the first 10 patients none would receive A, two B, six C and two D.
Balanced arrangements to give equal numbers of patients per group can be pro-
duced by first generating the combinations for blocks of an appropriate size.
whether or not the treatment is continuing for that individual patient. Thus
a patient who refuses a second injection in a drug study should be monitored
as closely as one who agreed to the injection. From considerations of sample
size (see Chapter 14) it is often preferable to compare at most two treatments,
although, clearly, there are situations in which more than two can be evalu-
ated efficiently.
Blind assessment
Just as the physician who determines eligibility to the study should be blind
to the actual treatment that the patient would receive, any assessment of the
patient should preferably be ‘blind’! Thus one should separate the assessment
process from the treatment process if this is at all possible. To obtain an even
more objective view of efficacy it is desirable to have the patient ‘blind’ to
which of the treatments he is receiving. It should be noted that if a placebo
or standard drug is to be used in a double-blind trial, it should be packaged
in exactly the same way as the test treatment. Clinical trials are concerned
with real and not abstract situations so it is recognised that the ideal ‘blind’
situation may not be possible or even desirable in all circumstances. If there
is a choice, however, the maximum degree of ‘blindness’ should be adhered
to. In a ‘double-blind’ trial, in which neither the patient nor the physician
know the treatment, careful monitoring is required since treatment-related
adverse side-effects are a possibility in any trial and the attendant physician
may need to be able to have immediate access to the actual treatment given
should an emergency arise.
where even when a drug is prescribed there is no guarantee that the patient
will take it. In general we would recommend that trials be analysed on an
ITT basis although there are situations where a so-called ‘per protocol’ analy-
sis is best. For example, a trial in which blood levels of the drugs were also
to be monitored where it is important that only those actually taking the
drugs (rather than allocated to the drug and possibly not taking it) are used
to summarise the profiles.
Cross-over designs
In a cross-over design the subjects receive both the test and the control treat-
ments in a randomised order. This contrasts with the parallel group design
in that each subject now provides an estimate of the difference between test
and control. Situations where cross-over trials may be useful are in chronic
diseases that remain stable over long periods of time, such as diabetes or
arthritis, where the purpose of the treatment is palliation and not cure. The
two-period cross-over design is described in Figure 13.2.
Figure 13.2 Stages of a two group two period cross-over randomised controlled trial
Factorial trials
A factorial trial is used to evaluate two or more interventions simultaneously.
Note that a factorial trial is not a study which merely balances prognostic
factors, such as age or gender, but which are not interventions, as has been
stated in several textbooks!
Here the two types of treatment are leaflets and the tape/slide pro-
gramme. The evaluation of the four experimental conditions was conducted
on four weekdays (Monday to Thursday) for 4 weeks. In order to eliminate
bias, a Latin square experimental procedure was employed, in which each
experimental condition was evaluated on each of the four weekdays.
13.6 Meta-analysis
In many circumstances randomised trials have been conducted that are unre-
alistically small, some unnecessarily replicated while others have not been
published as their results have not been considered of interest. It has now
been recognised that to obtain the best current evidence with respect to a
particular therapy that all pertinent clinical trial information needs to be
obtained, and if circumstances permit, the overview is completed by a formal
combination of all the trials by means of a (statistical) meta-analysis of all
the trial data. This recognition has led to the Cochrane Collaboration and a
worldwide network of overview groups addressing numerous therapeutic
questions (Chalmers et al 1993). In certain situations this has brought defini-
tive statements with respect to a particular therapy. For others it has lead to
the launch of a large-scale confirmatory trial.
Although it is not appropriate to review the methodology here, it is clear
that the ‘overview’ process has led to many changes to the way in which
clinical trial programmes have developed. They have provided the basic
information required in planning new trials, impacted on an appropriate trial
size (see Chapter 14), publication policy and very importantly raised report-
ing standards. They are an integral part of evidence-based medicine and are
13.7 THE PROTOCOL 255
impacting directly on decisions that affect patient care and questioning con-
ventional wisdom in many areas.
be identified so that the clinician involved can ensure that these are
assessed in each patient.
8. Treatment schedules. Clear and unambiguous descriptions of the actual
treatment schedules need to be provided. These could be very simple
instructions in the case of prescribing a new antibiotic for otitis media,
or be very complex in a chemotherapy regimen for osteosarcoma.
9. Trial supplies. It is clearly important that there be sufficient supplies of
the new drug available and that those responsible for dispensing the drug
and other supplies are identified.
10. Patient consent. The method of obtaining patient consent should be
summarised and, if appropriate, a suggested consent form included.
11. Required size of study. The anticipated treatment effect, the test size and
power (see Chapter 14) should be specified and the number of patients
that need to be recruited estimated. It is often useful to include an esti-
mate of the patient accrual rate.
12. Forms and data handling. Details of how the data are to be recorded
should be provided. It is usual for a copy of the data forms to be attached
to the protocol.
13. Statistical analysis. This would give a brief description of how the data
are to be analysed. It would include the tests that are to be used and
whether one- or two-sided comparisons are to be utilised.
14. Protocol deviations. Treatment details are required for patients who
deviate from or refuse the protocol therapy. Clearly, a particular therapy
may be refused by a patient during the course of the trial so alternative
treatment schedules may be suggested. This section may also describe
dose modifications permitted within the protocol which are dependent
on patient response or the appearance of some side-effect.
Design
The main consideration here is that should the design not be suitable to
answer the trial questions(s) posed no amount of ‘statistical juggling’ at the
analysis stage can correct any basic faults. For example, if a cross-over trial
design is used without an adequate washout period then this cannot be
13.8 CHECKLISTS FOR DESIGN, ANALYSIS AND REPORTING 257
CONSORT
It is widely recognised that randomised controlled trials are the only reliable
way to compare the effectiveness of different therapies. It is thus essential
that randomised trials be well designed and conducted, and it is also impor-
tant that they be reported adequately. In particular, readers of trial reports
should not have to infer what was probably done – they should be told explic-
itly. To facilitate this, the CONSORT statement of Altman et al (2001) has
been published and includes a list of 22 items which should be covered in any
trial report and a suggested flow chart to describe the patient progress through
the trial. The checklist applies principally to trials with two parallel groups.
Some modification is needed for other situations, such as cross-over trials
and those with more than two treatment groups.
In essence the requirement is that authors should provide enough informa-
tion for readers to know how the trial was performed so that they can judge
whether the findings are likely to be reliable.
The CONSORT recommendations have been adopted by many of the
major clinical journals, and together with the use of checklists similar to those
above, these will impact on the design and conduct of future trials by increas-
ing awareness of the requirements for a good trial.
1
NNT = .
pTest − pControl
The vertical straight brackets mean take the absolute value of ( pIest − pControl),
that is, ignore whether the difference is positive or negative. The value
obtained in the calculation is rounded to the nearest whole number above.
This illustrates one of the problems of the NNT; namely that it depends
on the baseline incidence. A treatment with the same relative risk reduction
will have vastly different NNTs in populations with differing baseline rates.
It is also possible to calculate a confidence interval for an NNT, but this
is difficult to understand when the treatments are not statistically signifi-
cantly different, and we recommend confidence intervals for the difference
( pIest − pControl) instead.
3. Check the diagnostic criteria for patient entry. Many treatments are tested
in a restricted group of patients even though they could then be prescribed
for other groups. For example, one exclusion criterion for trials of non-
steroidal anti-inflammatory drugs (NSAIDs) is often extreme age, yet the
drugs once evaluated are often prescribed for elderly patients.
4. Was the analysis conducted by ‘intention to treat’ or ‘per protocol’?
5. Is the actual size of the treatment effect reported, and the associated con-
fidence interval reported?
6. Does the Abstract correctly report what was found in the paper?
7. Have the CONSORT suggestions been followed?
13.11 Exercises
The authors of this book have been involved in the design of many clinical
trials. We suggest, as an exercise for the reader in judging how well we as
authors but into practice what we have advocated in this chapter, that some
of our papers are subjected to critical appraisal in a systematic way. Some
are published before the CONSORT statement and some after and so one
might judge whether reporting on our part has improved.
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
262 SAMPLE SIZE ISSUES
Summary
We cover the rationale for sample size calculations. Calculations when the
objective is to estimate a prevalence, or to compare two groups with binary
or continuous outcomes are described.
14.1 Introduction
Why sample size calculations?
There are a number of reasons for requiring investigators to perform a
power-based sample size calculation before the start of a study. A study that
is too small may be unethical, since it subjects people to procedures that may
turn out to be of no value, if the study is not powerful enough to demonstrate
a worthwhile difference. Similarly, a study that is too large may also be
unethical since one may be giving people a treatment that could already have
been proven to be inferior. On more pragmatic grounds, funding agencies
will require a sample size estimate since the cost of a study is usually directly
proportional to the size, and the agency will want to know that its money is
well spent. Many journals now have checklists that include a question on
whether a sample size is included (and to be reassured that is was carried out
before the study and not in retrospect!). For example, the statistical guide-
lines for the British Medical Journal in Altman et al (2000) state that: ‘Authors
should include information on . . . the number of subjects studied and why
that number of subjects was used.’ Such a question often forms part of mea-
sures of quality of papers.
Summing up
Our experience is that sample size calculations are invaluable in forcing the
investigator to think about a number of issues before the study commences.
The mere fact of the calculation of a sample size means that a number of
fundamental issues have been thought about: (i) What is the main outcome
variable and when it is to be measured? (ii) What is the size of effect judged
clinically important? (iii) What is the method and frequency of data analysis?
Some medical journals now require protocols to be lodged in advance of the
study being conducted, and it can be instructive to see whether the outcomes
reported in a paper coincide with those highlighted in the protocol. A study
may declare two treatments equivalent, but a glance at the protocol may
show that the confidence interval for the difference includes values deemed
clinically important prior to the study.
An investigator should not expect a single number carved in stone, from
a medical statistician, rather the statistician can supply two answers. First,
whether the study is worth attempting, given the time and resources avail-
able. Second, a range of numbers which would indicate what size sample
would be required under different scenarios.
It is important to know that the number of patients required depends on
the type of summary statistic being utilised. In general, studies in which the
outcome data are continuous and can be summarised by a mean require
fewer patients than those in which the response can be assessed only as either
a success or failure. Survival time studies (see Chapter 10) often require
fewer events to be observed than those in which the endpoint is ‘alive’ or
‘dead’ at some fixed time after allocation to treatment.
treatment is better, rather than risk going over to a new treatment, will all
its possible attendant problems such as long-term side effects, and different
procedures.
benefit, but the study should be planned so that if such an advantage does
exist there will be a good chance of detecting it.
0 b a/2 d
Accept H0 Reject H0
Figure 14.1 Distribution of the mean difference d, under the null and alternative
hypothesis
14.3 CONTINUOUS DATA 267
Formulae for more precise calculations for the number of patients required
to make comparisons of two proportions and for the comparison of
two means are given in Section 14.8. The book by Machin et al (2008)
gives extensive examples, tables and computer software for this and other
situations.
It is usual at the planning stage of a study to investigate differences that
would arise if the assumptions used in the calculations are altered. In particu-
lar we may have over-estimated the response rate of the controls. If pPlan,C
is set to 0.60 rather than 0.65, then, keeping pPlan,T = 0.50, dPlan = 0.10, and
there is a change in our estimate of the required number of patients from
m = 170 to approximately 388 per group. As a consequence we may have to
be concerned about the appropriate value to use for the response rate for
the controls as it is so critical to the final choice of sample size.
Table 14.1 Sample size m per group required for a given response rate in the control group (p1) and the effect size anticipated (d = p2 – p1)
with 80% power (1 – b = 0.80) and 5% (a = 0.05) two-sided significance
p2 p1
0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90
0.10 435
0.15 141 686
0.20 76 199 906
0.25 49 100 250 1094
14.4
0.30 36 62 121 294 1251
0.35 27 43 73 138 329 1377
BINARY DATA
0.40 22 32 49 82 152 356 1471
0.45 18 25 36 54 89 163 376 1534
0.50 15 20 27 39 58 93 170 388 1565
0.55 12 16 22 29 41 61 96 173 392 1565
0.60 11 14 17 23 31 42 62 97 173 388 1534
0.65 9 11 14 18 24 31 43 62 96 170 376 1471
0.70 8 10 12 15 19 24 31 42 61 93 163 356 1377
0.75 7 8 10 12 15 19 24 31 41 58 89 152 329 1251
0.80 6 7 8 10 12 15 18 23 29 39 54 82 138 294 1094
0.85 5 6 7 8 10 12 14 17 22 27 36 49 73 121 250 906
0.90 4 5 6 7 8 10 11 14 16 20 25 32 43 62 100 199 686
0.95 4 4 5 6 7 8 9 11 12 15 18 22 27 36 49 76 141 435
1.00 3 4 4 5 6 6 7 8 10 11 13 15 18 22 27 35 48 74
The cells in the table give the number of patients required in each treatment arm.
269
270 SAMPLE SIZE ISSUES
14.5 Prevalence
We described surveys in Chapter 12 and one might be designed to find
out, for example, how many people wear dentures. Such a study is non-
comparative and therefore does not involve hypothesis testing, but does require
a sample size calculation. Here, what we need to know is how accurately we
should estimate the prevalence of people wearing dentures in the population.
Recall from Chapter 6 that, if m (rather than n) is the sample size, then the
estimated standard error of the proportion p estimated from a study is
p (1 − p ) p (1 − p )
SE ( p) = . This expression can be inverted to give m = .
m SE 2
Thus if we state that we would like to estimate a prevalence, which is
anticipated to have a particular value pPlan, and we would like to have a 95%
confidence interval of pPlan ± 1.96SEPlan, we have the ingredients for a sample
size calculation if we specify a required magnitude for the SE in advance.
Specifically
π (1 − π )
m = Plan 2 Plan .
SEPlan
Here, there is no explicit power value. The type I error is reflected in the
width of the confidence interval. If we do carry out a survey of the prescribed
size, m, and the prevalence is about the size pPlan we specified, then we would
expect our calculated confidence interval to be wider than the specified 50%
of the time, and narrower than the specified 50% of the time.
Here pPlan = 0.1 and the anticipated width of the confidence interval
is 0.16 − 0.04 = 0.12, suggesting SEPlan = 0.12/(2 × 1.96) ≈ 0.03. Thus m =
[0.1(1 − 0.1)]/(0.032) = 100. This implies the upper and lower limits of the
confidence interval are ±0.06 away from the estimated prevalence, pPlan.
Using Table 14.2, this leads to a more accurately estimated sample size
of m = 97.
Note m is the number of responders to the survey. We may have to
survey more patients to allow for non-response. If we assume a 50%
response rate to the postal survey then we actually need to mail out 2 ×
100 = 200 questionnaires to get the required number of responders.
Table 14.2 Sample size m required to estimate the anticipated prevalence (πPlan) with
upper and lower confidence limits of ±0.01, ±0.02, ±0.05, ±0.06, or ±0.10 away from the
anticipated value
Required precision for the upper and lower confidence
limits for the anticipated prevalence πPlan
2. Check if the variable used in the sample size calculation is the main
outcome in the analysis
3. If a study is not significant, and the authors are claiming equivalence, look
at the size of the effect considered clinically important in the sample size
calculation and see if the confidence intervals reported in the analysis
contain this effect. If so, the equivalence is not proven.
Comparison of proportions
Suppose we wished to detect a difference in proportions dPlan = pPlan,T − pPlan,C
with two-sided significance level a and power 1 − b. For a χ2 test, the number
in each group should be at least
⎡ π Plan,T (1 − π Plan,T ) + π Plan,C (1 − π Plan,C ) ⎤
m=θ⎢ ⎥.
⎣ δ Plan
2
⎦
We can also use Table 14.1, if we only require a significance level of 5%
and a power of 80%.
5% 80% 7.8
5% 90% 10.5
1% 80% 11.7
1% 90% 14.9
274 SAMPLE SIZE ISSUES
14.10 Exercises
1. Suppose we wish to estimate the prevalence of nurses dissatisfied with
their job. We think it will be about 20%, and we would like to estimate
this to within 5%. How many subjects do we need?
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
278 COMMON PITFALLS
Summary
Some common errors found in the medical literature are described. They
comprise problems in using the t-test, repeated measure studies, plotting the
change of a variable in time against the initial value, regression to the mean
and confusing statistical and clinical significance.
15.1 Introduction
Many of the statistical errors that occur in the medical literature are fre-
quently not very major and could be overcome with a little more care by the
writing team and by more vigilance from any reviewers (Cole et al 2004). For
example, using a t-test when it is dubious that the data are Normally distrib-
uted, or failing to provide enough information for the reader to discover
exactly how a test was carried out. There are frequent examples of poor
presentation, or of presentation in the Abstract of results irrelevant to the
problem being tackled by the paper. These errors do not usually destroy a
paper’s total credibility; they merely detract from its quality and serve to
irritate the reader. However, some errors stem from a fundamental misun-
derstanding of the underlying reasoning in statistics, and these can produce
spurious or incorrect analyses. One of these we discussed in Chapter 11,
which is the inappropriate use of the correlation coefficient in method com-
parison studies.
The first problem encountered with Table 15.1 is that the degrees of
freedom for the t-statistic are not given. If it is a straightforward two-sample
t-test then they can be assumed to be 2n − 2 = 28. However, it is possible that
the design is that of a crossover trial and hence is paired, in which case a
paired t-test used with df = n − 1 = 14, or the results come from an adjusted
comparison, using multiple regression as described in Chapter 9. In both
these cases the degrees of freedom will be less than the presumed 28. Of
course, some clue to which is appropriate may be given in the supporting
text.
The second problem is that the comparison of interest is the difference
in response between the NSAID and placebo, together with an estimate of
uncertainty or precision of this difference, and yet this comparison is not
given. Two extra columns should therefore be added to Table 15.1. The first
would give the mean difference in the observations between placebo and
NSAID, and the second a measure of the precision of this estimate, such as
a 95% confidence interval. We cannot obtain these with the information
given in Table 15.1 without knowledge of the full design and/or type of analy-
sis conducted.
From the data it can be seen that for both the change in VAS and the
number of tablets taken, the SDs in each treatment group are similar in size
as their respective means. Since a change in VAS can be either positive or
negative, this need not be a problem. However, the number of tablets cannot
be negative, it must be zero or a positive number, and so the large SD indi-
cates that these data must be markedly skewed. This calls into question the
validity of the use of the t-test on data which is non-Normal. Either a trans-
formation of the original data, perhaps by taking the logarithm of the number
of tablets, or perhaps the use of the non-parametric Mann–Whitney test of
Chapter 8 would be more appropriate.
For the number of tablets of paracetamol and haemoglobin the table gives
p = NS. The abbreviation means ‘not significant’ and is usually taken to mean
a p-value >0.05, but the notation is uninformative and should not be used.
Its use gives no indication of how close p is to 0.05. For the number of tablets
of paracetamol taken, if df = 28 then from Table T1, p > 0.20 (more precise
value 0.42) and for haemoglobin 0.05 < p < 0.10 (more precise value 0.08).
Both are larger than the conventional value of 0.05 for formal statistical sig-
nificance. However, the p-values suggest that a larger trial may have pro-
duced a ‘significant’ difference for haemoglobin but not for the number of
tablets although for the latter, since the analysis is clearly incorrect, this may
not be the case. Further, if we assume the unpaired t-test with df = 28 is
appropriate for comparing the mean haemoglobin values, the corresponding
95% CI for the difference is −0.09 to 1.49 g/dl. This indicates the possibility
of the existence of quite a large effect of the NSAID on haemoglobin. A
large (clinically important) effect is usually taken as a difference in excess of
280 COMMON PITFALLS
about 0.8 of the SD. Here the SD for the NSAID group is 2.5 and the
upper limit of the 95% CI about 1.5, so the possible effect may be as much
as 1.5/2.5 = 0.6. This may be thought of as a moderate difference and may be
of clinical importance were it found to be the case.
cance for an association between a change and the initial value invalid.
Thus in the above example with r = −0.79, we do not know how much of
this negative value is due to the phenomenon we have just described.
However, provided that the two sets of data have approximately the
same variability, a valid test of significance can be provided by correlating
(A − B) with (A + B)/2. Somewhat surprisingly, if we took any two equal
sets of random numbers (say) A and B as before and plotted A − B on the
y-axis against (A + B)/2 on the x-axis we would not get an intrinsic nega-
tive correlation but one close to zero of any sign; its magnitude differing
from zero only by the play of chance.
Table 15.2 Birthweight and 1-month weight of 10 babies – data ordered by increasing
birthweight for convenience
Birthweight (g) 1-month weight (g) Weight gain Mean
(1-month – Birth) (1-month + Birth)/2
successive values are independent of each other and this may not be entirely
the case. Nevertheless the chance of the next observation being less than this
quite extreme observation will be high. This phenomenon is termed regres-
sion to the mean but, as we have illustrated, despite its name it is not confined
to regression analysis. It also occurs in intervention studies which target
individuals who have a high value of a risk variable, such as cholesterol. In
such a group, the values measured later will, by chance, often be lower even
in the absence of any intervention effect.
In intervention studies having the same entry requirement for both groups
can compensate for the regression to the mean. In this situation, if the inter-
ventions were equally effective then both groups would regress by the same
amount. Thus it would not be a problem in a trial in which the interventions
are randomised. However, it can appear in more insidious guises, for example
by choosing a locality which for 1 year only has had a high cot death rate;
even if nothing is done, the cot death rate for that district is likely to fall in
the next. In randomised studies, where we have a priori evidence that the
baseline results should be comparable, then the correct method to adjust for
baseline is multiple regression as described in Chapter 9. The dependent
15.3 PLOTTING CHANGE AGAINST INITIAL VALUE 283
Figure 15.2 Weight gain of 10 babies in 1 month against the mean of birth and 1-month
weight
variable is the outcome, and the dependent variables include the baseline
and a dummy variable for the intervention. One would get the same result
if the dependent variable is the difference between outcome and baseline,
but the former is easier to understand and more generalisable.
Figure 15.3 Change in fasting serum cholesterol after 30 weeks of training. From Findlay
et al (1987). Cardiovascular effects of training for a marathon run in unfit middle-aged men.
British Medical Journal, 295, 521–524: reproduced by permission of the BMJ Publishing
Group.
The numerous significance tests would appear to imply, for example, that,
at 25–28 weeks of pregnancy the metabolic rate of a woman 60 minutes after
ingesting a meal was not significantly different from control, but that it was
significantly different at 45 and 75 minutes.
15.4 REPEATED MEASURES 285
*
*
*
***
***
***
***
Figure 15.4 Rise in metabolic rate in response to test meal. Female subjects after lacta-
tion (dotted line) and at 12–15, 25–28 and 34–36 weeks of pregnancy (solid line). Points
are means. Bars are SEM (standard error of mean). * p < 0.05, *** p < 0.001
286 COMMON PITFALLS
Invalid approaches
The implication of the error bars used in the graphs is that the true curve
could be plausibly drawn through any point that did not take it outside the
ranges shown. This is not true for several separate reasons. Since the error
bars are in fact 68% confidence intervals (one standard error either side of
the mean), then crudely there is a 68% chance that the true mean is within
the limit. If we had 10 independent observations, then the chances of the true
line passing through each set of intervals is 0.6810 = 0.02. This is small and
hence true line is very unlikely to passing through them all. However, the
observations are certainly not independent, so this calculation gives only a
guide to the true probability that the curve passes through all the intervals.
Nevertheless it does suggest that this probability is likely to be small.
Additionally, the average curve calculated from a set of individual curves
may differ markedly from the shape of these individual curves.
Often the stated purpose of the significance test is to ask the question,
‘When does the response under one treatment differ from the response under
another?’ It is a strange logic that perceives the difference between two
groups of continuous variables changing from not significantly different to
significantly different between two adjacent time points. Thus suppose the
time points in Figure 15.4 had been only 1 minute (or 1 second) apart rather
than 15 minutes, then it would certainly seem very strange to test for a dif-
ference between successive time points – yet in reality, if the curve is truly
15.4 REPEATED MEASURES 287
Figure 15.5 Response curves from three individuals and their a average response at each
time point. The three subjects change from level 1 to level 2 at times, a, b and c
respectively
changing, then they will be different but it is not sensible to say they are sig-
nificantly different even if two values (far apart) are very different. Similarly
it is the whole curve that one wishes to compare between groups not indi-
vidual points along the profiles.
Valid approaches
Having plotted the individual response curves, a better approach is to try
to find a small number of statistics that effectively summarise the data.
For example in Figure 15.5, each individual can be summarised by the
time at which they change from Level 1 to Level 2. These are times a, b
and c. Similarly in Figure 15.4 the area under the curve from 0 to 120
minutes will effectively summarise the change in metabolic rate over the
period.
Summary statistics for repeated measure curves:
• area under the curve (AUC);
• maximum (or minimum) value achieved;
• time taken to reach the maximum (or minimum);
• slope of the line.
The above statistics can then be used in an analysis as if they were raw
observations; one for each subject. Thus in the example of Figure 15.4, one
could compare the area under the metabolic rate curve for the four periods:
after lactation, 12–15, 25–28 and 34–36 weeks, In general the analysis of
repeated measures is quite tricky, and a statistician should be consulted early
in the process.
288 COMMON PITFALLS
Multiple comparisons
In some cases, it may be sensible to carry out a number of hypothesis tests
on a single data set. Clearly if one carried out a large number of such tests,
each with significance level set at 5%, then, even in the absence of any real
effects, some of the tests would be significant by chance alone.
There are a number of solutions to controlling the consequentially inflated
(above 5%) Type I error rate. A simple ad-hoc method is to use a Bonferroni
correction. The idea is that if one were conducting k significance tests, then
to get an overall Type I error rate of a, one would only declare any one of
them significant if the p-value was less than a/k. Thus, if a clinician wanted
to test five hypotheses in a single experiment (say five different treatments
against a control) then he/she would not declare a result significant unless
the p-value for any one of the tests was less that 0.01. The test tends to be
rather conservative; that is the true Type I error rate will now be less than
0.05, because the hypothesis tests are never truly independent. Thus it would
miss detecting a significant result for an uncertain number of the tests con-
ducted. However, it can be useful to temper enthusiasm when a large number
of comparisons are being carried out!
There is no general consensus on what procedure to adopt allow for
multiple comparisons (Altman et al, 2000). We would therefore recommend
the reporting unadjusted p-values (to three decimal places/significant
figures) and confidence limits with a suitable note of caution with respect to
290 COMMON PITFALLS
15.8 Exercises
1. A police authority installed speed cameras at accident black spots. In the
following year they noted that the number of accidents at these sites had
fallen from the year before the cameras were installed. Can one thus con-
clude that speed cameras are successful in reducing accidents?
Altman DG (1991). Practical Statistics for Medical Research. London, Chapman & Hall.
Altman DG, Machin D, Bryant TN and Gardner MJ (2000). Statistics with Confidence,
2nd edition. London, British Medical Journal.
Altman DG, Schultz KF, Moher D, Egger M, Davidoff F, Elbourne D, Gotzsche PC and
Lang T (2001) The revised CONSORT statement for reporting randomised trials:
Explanation and Elaboration. Annals of Internal Medicine, 134, 663–694.
ATAC (Arimidex, Tamoxifen Alone or in Combination) Trialists’ Group (2002). Anas-
trozole alone or in combination with tamoxifen versus tamoxifen alone for adjuvant
treatment of postmenopausal women with early breast cancer: first results of the ATAC
randomised trial. Lancet, 359, 2131–2139.
Armitage P, Berry G and Matthews JNS (2002). Statistical Methods in Medical Research,
4th edition. Oxford, Blackwell Science.
Bell BA, Smith MA, Kean DM, McGhee CN, MacDonald HL, Miller JD, Barnett GH,
Tocher JL, Douglas RH and Best JJ (1987). Brain water measured by magnetic reso-
nance imaging. Correlation with direct estimation and changes after mannitol and
dexamethasone. Lancet, i, 66–69.
Birkett MA and Day SJ (1994). Internal pilot studies for estimating sample size. Statistics
in Medicine, 13, 2455–2463.
Bland M (2000). An Introduction to Medical Statistics, 3rd edition. Oxford, Oxford Uni-
versity Press.
Bland JM and Altman DG (1986). Statistical methods for assessing agreement between
two methods of clinical measurement. Lancet, 1, 307–310.
Bland JM and Altman DG (1997) Statistics notes: Cronbach’s alpha. British Medical
Journal, 314, 572.
Brown LM, Pottern LM and Hoover RN (1987). Testicular cancer in young men: the
search for causes of the epidemic increase in the United States. Journal of Epidemiology
and Community Health, 41, 349–354.
Burke D and Yiamouyannis J (1975). Letters to Hon. James Delany. Congressional
Record, 191, H7172–7176 and H12731–12734.
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
292 REFERENCES
Glazener CMA, Herbison GP, Wilson PD, MacArthur C, Lang GD, Gee H and Grant
AM (2001). Conservative management of persistent postnatal urinary and faecal incon-
tinence: randomised controlled trial. British Medical Journal, 323, 1–5.
Gardner MJ, Machin D and Campbell MJ (2000). Use of checklists for the assessment of
the statistical content of medical studies. In: Altman DG, Machin D, Bryant TN and
Gardner MJ (eds) Statistics with Confidence. London, BMJ Books.
Griffiths TL, Burr ML, Campbell IA, Lewis-Jenkins V, Mullins J, Shiels K, Turner-Lawlor
PJ, Payne N, Newcombe RG, Lonescu AA, Thomas J and Tunbridge J (2000). Results
at 1 year of outpatient multidisciplinary pulmonary rehabilitation: a randomised con-
trolled trial. Lancet, 355, 362–368.
Hancock BW, Wheatley K, Harris S, Ives N, Harrison G, Horsman JM, Middleton MR,
Thatcher N, Longman PC, Marsden JR, Borrows L, Gore M (2004). Adjuvant inter-
feron in high-risk melanoma: the AIM HIGH study. Journal of Clinical Oncology, 22,
53–61.
Hawthorne AB, Logan RFA, Hawkey CJ, Foster PN, Axon AT, Swarbrick ET, Scott BB
and Lennard-Jones JE (1992). Randomised controlled trial of azathioprine withdrawal
in ulcerative colitis. British Medical Journal, 305, 20–22.
Henquet C, Krabbendam L, Spauwen J, Kaplan C, Lieb R, Wittchen H and Van Os
J (2005). Prospective cohort study of cannabis use, predisposition for psychosis and
psychotic symptoms in young people British Medical Journal, 330, 11–14.
Hepworth SJ, Schoemaker MJ, Muir KR, Swerdlow AJ, Tongeren MJ and McKinney PA
(2006). Mobile phone use and risk of glioma in adults: case-control study. British
Medical Journal, 332, 883–887.
Hippisley-Cox J, Cater R, Pringle M and Coupland C. (2003) Cross-sectional survey of
effective lipid lowering drugs in reducing serum cholesterol concentrations in patients
in 17 general practices. British Medical Journal, 326, 689–692.
Hobbs FDR, Davis RC, Roalfe AK, Hare R, Davies MK and Kenkre JE (2002). Reli-
ability of N-terminal pro-brain natriuretic peptide assay in diagnosis of heart failure:
cohort study in representative and high risk community populations. British Medical
Journal, 324, 1498–1500.
Jenkins SC, Barnes NC and Moxham J (1988). Evaluation of a hand held spirometer, the
Respirodyne, for the measurement of forced expiratory volume in the first second
(FEV1), forced vital capacity (FVC) and peak expiratory flow rate (PEFR). British
Journal of Diseases of the Chest; 82, 70–75.
Johnson CD, Toh SKC and Campbell MJ (2004). Comparison of APACHE-II score and
obesity score (APACHE-O) for the prediction of severe acute pancreatitis. Pancreatol-
ogy, 4, 1–6.
Julious SA and Mullee MA (1994) Confounding and Simpson’s paradox. British Medical
Journal, 309, 1480–1481.
Juniper EF, Guyatt GH, Feeny DH, Ferrie PJ, Griffith LE and Townsend M
(1996). Measuring quality of life in children with asthma. Quality of Life Research, 5,
35–46.
King EA, Baldwin DS, Sinclair JMA, Baker N, Campbell MJ and Thompson C (2001).
The Wessex Recent Inpatient Suicide Study: a case control study of 234 recently
discharged psychiatric patient suicides British Journal of Psychiatry, 178, 531–536.
Kinmonth AL, Woodcock A, Griffin S, Spiegal N and Campbell MJ (1998). Randomised
controlled trial of patient centred care of diabetes in general practice: impact on current
well-being and future disease risk. British Medical Journal, 317, 1202–1208.
294 REFERENCES
Oldham PD and Newell DJ (1977). Fluoridation of water supplies and cancer a possible
association? Applied Statistics, 26, 125–135.
O’Sullivan JJ, Derrick G, Griggs P, Foxall R Aitkin M and Wren C (1999).
Ambulatory blood pressure in schoolchildren. Archives of Diseases of Childhood, 80,
529–532.
Peacock JL, Bland JM and Anderson HR (1995). Preterm delivery: effects of socieco-
nomic factors, psychological distress, smoking, alcohol, and caffeine. British Medical
Journal, 311, 6531–6535.
Pearson ADJ, Pinkerton CR, Lewis IJ, Imeson J, Ellershaw C and Machin D (Submitted).
Randomised trial of high dose rapid schedule with conventional schedule for stage 4
neuroblastoma over the age of one year.
Perneger TV (1998). What’s wrong with Bonferroni adjustments? British Medical Journal,
316, 1236–1238.
Persantine-Aspirin Reinfarction Research Study Group (1980). Persantine and aspirin in
coronary heart disease. Circulation, 62, 449–461.
Poon C-Y, Goh B-T, Kim M-J, Rajaseharan A, Ahmed S, Thongprasom K, Chaimusik
M, Suresh S, Machin D, Wong H-B and Seldrup J (2006). A randomised con-
trolled trial to compare steroid with cyclosporine for the topical treatment of oral
lichen planus. Oral Surgery, Oral Pathology, Oral Radiology and Odontology, 102,
47–55.
Prentice AM, Black AE, Coward WA, Davies HL, Goldberg GR, Murgatroyd PR,
Ashford J, Sawyer M and Whitehead RG (1986). High levels of energy expenditure in
obese women. British Medical Journal, 292, 983–987.
Quist-Paulsen P and Gallefoss F (2003). Randomised controlled trial of smoking cessation
intervention after admission for coronary heart disease. British Medical Journal, 327,
1254–1257.
Rigby AS, Armstrong GK, Campbell MJ and Summerton N (2004). A survey of
statistics in three UK general practice journals. BMC Medical Research Methodology,
4, 28.
Roche JJW, Wenn RT, Sahota O and Moran CG (2005). Effect of comorbidities and
postoperative complications on mortality after hip fracture in elderly people: prospec-
tive observational cohort study. BMJ doi:10:1136.
Sackett DL, Richardson WS Rosenberg W and Haynes RB (1997). Evidence-Based Medi-
cine. How to Practice and Teach EBM. New York, Churchill Livingstone.
Sargent RP, Shepard RM and Glantz SA (2004). Reduced incidence of admissions for
myocardial infarction associated with public smoking ban: before and after study.
British Medical Journal, 328, 977–983.
Scott RS, Knowles RL and Beaver DW (1984). Treatment of poorly controlled non-
insulin-dependent diabetic patients with acarbose. Australian and New Zealand Journal
of Medicine, 14, 649–654.
Shaw JL, Sharpe S, Dyson SE, Pownall S, Walters S, Saul C, Enderby P, Healy K and
O’Sullivan H (2004). Bronchial auscultation: An effective adjunct to speech and lan-
guage therapy bedside assessment when detecting dysphagia and aspiration? Dyspha-
gia, 19, 211–218.
Simpson AG (2004). A comparison of the ability of cranial ultrasound, neonatal neuro-
logical assessment and observation of spontaneous general movements to predict
outcome in preterm infants. PhD Thesis, University of Sheffield.
Streiner G and Norman DL (2003). Health measurement scales: a practical guide to their
development and use, 3rd edition. Oxford, OUP.
296 REFERENCES
Stulemeijer M, de Jong LW, Fiselier TJ, Hoogveld SW and Bleijenberg G (2005). Cogni-
tive behaviour therapy for adolescents with chronic fatigue syndrome: randomised
controlled trial. British Medical Journal, 330, 14–19.
Swinscow TV and Campbell MJ (2002). Statistics at Square One, 10th edition. Oxford,
Blackwell, BMJ Books.
Taylor B, Miller E, Lingam R, Andrews N, Simmons A and Stowe J (2002). Measles,
mumps, and rubella vaccination and bowel problems or development regression in
children with autism: population study. British Medical Journal, 324, 393–396.
Thomas KB (1987). General practice consultations: Is there any point in being positive?
British Medical Journal, 294, 1200–1202.
Thomas KJ, MacPherson H, Thorpe L, Brazier J, Fitter M, Campbell MJ, Roman M,
Walters SJ and Nicholl J (2006). Randomised controlled trial of a short course of tra-
ditional acupuncture compared with usual care for persistent non-specific low back
pain. British Medical Journal, 333, 623–625.
Tillett HE, Galbraith NS, Overton SE, Porter K (1988). Routine surveillance data on
AIDS and HIV infections in the UK: a description of the data available and their use
for short-term planning. Epidemiology and Infection, 100, 157–169.
Walters SJ (2003). What is a Cox model? Volume 1, number 10. www.evidence-based-
medicine.co.uk.
Wight J, Jakubovic M, Walters S, Maheswaran R, White P and Lennon V (2004). Varia-
tion in cadaveric organ donor rates in the UK. Nephrology Dialysis Transplantation,
19, 963–968.
Xu W-H, Zheng W, Xiang Y-B, Ruan Z-X, Cheng J-R, Dai Q, Gao Y-T and Shu X-O
(2004). Soya food intake and risk of endometrial cancer among Chinese women in
Shanghai: population based case–control study. British Medical Journal, 328, 1285–
1291.
Yates J and James D (2006) Predicting the ‘strugglers’: a case–control study of students
at Nottingham University Medical School. British Medical Journal, doi:10.1136/
bmj.38730.678310.63.
Solutions to exercises
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
298 SOLUTIONS TO EXERCISES IN CHAPTER 1
Chapter 1
1. (i) continuous (ii) ordinal (iii) continuous (iv) continuous
(v) count (vi) binary.
2. They are both quantitative variables. There are two main differences: (i)
Shoe size can, in theory be measured exactly; it is merely convenience to
group them into different categories. There is no underlying continuous
variable for family size; one cannot have a family with 1.5 children. (ii)
The labels for shoe size are not on a ratio scale since there is no shoe size
0. Thus someone with a shoe size 10 (EU scale) does not have feet twice
as big as someone with shoe size 5. Family size, on the other hand, is a
count variable. A family with two children has twice as many children as
a family with one child.
3. One loses information on the spread of the data. You will know how many
people have a BMI > 30, but not how many have a BMI > 25 kg/m2 say. If
you were told a patient was anaemic, you would like to know the propor-
tion of healthy people who are anaemic in the same age/gender group as
the patient. It would be useful to know the exact value, to see how far
from the cut-off the patient was (although for this to be useful one would
also need to know the variability of the data). One might conduct further
tests, for example an endoscopy, before treating the patient.
Chapter 2
1. (i) Bar chart of the blood group of 55 women diagnosed as suffering from
thromboembolic disease.
35
30
25
Frequency
20
15
10
0
A B AB O
Blood group
SOLUTIONS TO EXERCISES IN CHAPTER 2 299
60
50
40
30
Thromboembolic
20 women
(n=55)
Percent
10 Healthy women
(n=145)
0
A B AB O
Blood group
(ii) It would appear that there are more women in the thromboembolic
group in blood groups A and AB and fewer in group O.
2. (i) Proportion of women with epidural: Labour in water is 23/49 = 0.47
or 47%: Augmentation is 33/50 = 0.66 or 66%.
(ii) Relative risk of epidural for the Labour in water women compared
with those having Augmentation is 0.47/0.66 = 0.71.
(iii) Odds of epidural: Labour in water = 0.47/(1 − 0.47) = 0.89
Odds of epidural: Augmentation is 0.66/(1 − 0.66) = 1.94. OR of epi-
dural for the Labour in water women compared with Augmentation
women is 0.89/1.94 = 0.46. The OR is less than the RR and they differ
because the event is quite common.
(iv) ‘Risk’ of epidural on Labour in water is 23/49 = 0.47, ‘Risk’ of epidu-
ral on Augmentation is 33/50 = 0.66. The Absolute Risk Difference
for labour in water is ARR = ⏐0.47 − 0.66⏐ = 0.19.
3. One would like to know what is the actual risk of recurrence. Over what
time frame has the risk been measured? Does it work for all breast cancers
or only a specific type and grade? Also what are the types and risks of any
side-effects?
300 SOLUTIONS TO EXERCISES IN CHAPTER 3
Chapter 3
1. (i) Histogram and dot plot of the age (in years) of a sample of 20 motor
cyclists killed in road traffic accidents
10
4
Freq ue ncy
0
15.0 25.0 35.0 45.0 55.0 65.0 75.0
Age in years
Either the range or interquartile range should be used to describe the vari-
ability. The SD should not be used since the distribution is skewed.
(ii) Yes: there does appear to be a linear relationship: tall fathers seem
to have tall sons. Note that father’s heights are plotted on the hori-
zontal axis since causality goes from father to son, not vice versa.
Chapter 4
1. The way to answer this sort of question is to set up the 2 × 2 table sup-
posing we have (say) 100 people in the study. Then we would find that 30
have appendicitis and of these 0.7 × 30 = 21 would have a high tempera-
ture. We get the following table
Yes No
Test: High 21 28 49
Temperature Low 9 42 51
30 70 100
Chapter 5
1. Using the Binomial distribution formula (5.1)
5!
Prob (4 ‘trivials’ out of 5 patients) = 0.54 (1 − 0.5) = 0.156
4!(5 − 4)!
exp(−10)1010
Prob (10 new cases) = = 0.1251
10!
302 SOLUTIONS TO EXERCISES IN CHAPTER 5
3. First calculate Z, the number of standard deviations 160 is away from the
mean: (160 − 141.1)/13.62 = 1.39. Looking for Z = 1.39 in the Table T1
gives the probability of being outside the range of the mean ± 1.39 SD to
be 0.1645. Therefore the probability of having a systolic blood pressure of
160 mmHg or higher is 0.08225 (or 8%).
5. (i) First calculate the number of standard deviations 95 is away from the
mean:
(95 − 70)/10 = 2. Look for Z = 2.5 on the Normal distribution
Table T1 which gives the probability of being outside the range of
the mean ± 2.5 SD to be 0.0124. Therefore the probability of hav-
ing a diastolic blood pressure of 95 mmHg or above is 0.0062
(or 0.62%).
(ii) Calculate the number of standard deviations that 55 is away from the
mean (55 − 70)/10 = −1.5 (ignore minus sign)
Looking for Z = 1.5 in Table T1 gives the probability of being outside the
range of the mean ± 1.5 SD to be 0.1336. Therefore the probability of having
a diastolic blood pressure of 55 mmHg or less is 0.0668 (or 6.7%)
6. The expected referral rate is 2.8 per 1000 population. Thus in a population
of 6000 one would expect 16.8 referrals. Assuming a Poisson distribution,
the SD is 16.8 = 4.1. The GPs observation of 27 is (27 − 16.8)/4.1 = 2.48
SDs from the mean. From Table T1 we see that the probability of getting
a result this extreme is 0.013, so this GP’s rate is unusually high. Note
however, this also assumes this GP was chosen at random. If she was
picked out of a large number of GPs as being the highest then this proba-
bility is not relevant.
Chapter 6
1. (a) T (b) T (c) F (d) T (e) T.
3. (a) Sample mean = (156 + 154 + 140 + 158)/4 = 152.0 mm. Variance =
[(156 − 152)2 + (154 − 152)2 + (140 − 152)2 + (158 − 152)2] / (4 − 1) =
66.667 mm2. Hence SD = 66.667 = 8.16 mm.
SOLUTIONS TO EXERCISES IN CHAPTER 6 303
155
Mid-upper arm circumference (mm)
140 145135 150
0 2
Frequency
5. (a) The 95% CI = 152.0 − (1.96 × 4.08) to 152.0 + (1.96 × 4.08) or 144 to
160 mm.
Dot plots and 95% CIs for mid-upper arm circumferences for random samples
of size 4 and 16 with 95% confidence intervals for two selected samples.
The 95% CI for the true population proportion of female acute appendi-
citis patients is given by: 0.608 − (1.96 × 0.045) to 0.608 + (1.96 × 0.045) or
0.52 to 0.70.
Chapter 7
1. (a) The null hypothesis is that the percentage of deliveries where there
was a failure to respond to signs of foetal distress did not differ
between the cerebral palsy babies and the delivery book controls. The
alternative hypothesis is that there was a difference between the two
groups with respect to failure to respond to signs of foetal distress.
(b) Failure to respond to signs of foetal distress was noted in 25.8% of
the cerebral palsy babies and in 7.1 % of the delivery book babies.
The difference between these two percentages was 25.8 − 7.1 = 18.7%.
This is the actual or absolute difference in the two percentages and
so is expressed in percentage points, and is sometimes referred to as
the absolute risk difference or absolute risk reduction.
(c) The 95% CI shows that the difference between the two groups is
estimated to be at least as large as 10.5% and may be as great as
26.9%. Since the interval excludes 0, there is good evidence for a real
difference in the groups in the population from which the samples
come.
2. (a) On average the patients in the clinic group had 5.9 more ulcer-free
weeks than the control group and the 95% CI for this difference
ranged from 1.2 to 10.6 weeks. As this confidence interval does not
include 0 weeks we can conclude that there was a significant difference
between the two groups with respect to the number of ulcer-free
weeks over the 12 month study period.
(b) We know that the 95% CI is approximately (mean − 2 × SE) to
(mean + 2 × SE) and so we can use either the lower limit (or the upper
limit) of the confidence interval to obtain the SE. For example,
SE = (mean − lower limit) / 2 = (5.9 − 1.2) / 2 = 2.35 weeks.
(c) Mean costs were £878 per year for the clinic group and £863 for the
control group and the p-value for the difference was 0.89. As this
value is greater than the critical value of 0.05, we can conclude that
there is no evidence of a statistically significant difference between
the groups with respect to cost of treatment (technically speaking –
there is insufficient evidence to reject the null hypothesis).
(d) From the information above, it would be reasonable to conclude
that community based leg ulcer clinics are more effective than
306 SOLUTIONS TO EXERCISES IN CHAPTER 7
4. (a) This is the standard error. Estimates of population values vary from
sample to sample and therefore have a theoretical distribution: the
sampling distribution. The standard error of an estimate is a measure
of the variability of this distribution. The standard error is the stan-
dard deviation of the sampling distribution of the sample estimate.
The standard error therefore provides information about the preci-
sion of the estimate and is used to calculate confidence intervals
around the estimates. Here the value of 0.68 is the standard error of
the percentage of pre-term births. The units of the standard error are
SOLUTIONS TO EXERCISES IN CHAPTER 8 307
the same as for the sample estimate itself; here percentage points. The
standard error is used to assess the spread of the mean whilst the
standard deviation assesses the spread of the patients.
(b) This is the 95% CI. It is a range of values which we anticipate will
contain the true population percentage of pre-term births, for 95% of
samples. This is in the sense that if a large number of samples were
taken from the same population, then 95% of the calculated confi-
dence intervals would contain the population percentage. This implies
that 5% of these samples would not contain the true population per-
centage. Here we deduce that the population value is very likely to
lie between 6.1% and 8.8%, but our best estimate of it is 7.5%.
(c) If 90% limits were used the confidence interval would be narrower
and fewer (90% rather then 95%) confidence intervals from possible
repeats of the study would contain the population incidence. The 90%
limits would be 6.4 to 8.6%.
(d) If 99% limits were used the confidence interval would be wider and
more (99%) confidence intervals from possible samples would contain
the population incidence. Thus there would be less chance of being
wrong but the range of possible population values would be greater
(the 99% confidence limits would be 5.8 to 9.2%).
(e) The Danish study included many more subjects than the UK study
and so the estimate of the pre-term birth incidence is much more
precise. Hence, the 95% CI is narrower. There were 3% more pre-
term in the UK study than in the Danish study and the two 95% CI
do not overlap. Hence there is some evidence for a real difference
although this (non-overlapping confidence intervals) is not a formal
significance test.
Chapter 8
1. (a) H0: No difference in mean 24-hour total energy expenditure between
lean and obese groups of women i.e. μLean − μObese = 0.0 MJ/day.
HA: There is a difference in mean ulcer-free weeks between interven-
tion and control groups i.e. μLean − μObese ≠ 0.00 MJ/day.
Note that: In this case the two groups are independent (measurements are
not on the same individuals). Therefore we are interested in the difference
between the means of each group.
(b) Independent two-sample t-test for comparing means
Assumptions: Two ‘independent’ groups, continuous outcome vari-
able, outcome data in both groups are Normally distributed. Outcome
data in both groups have similar standard deviations.
308 SOLUTIONS TO EXERCISES IN CHAPTER 8
1 1
SE of difference = SE (d) = 1.306 × + = 0.57
13 9
8.07 − 10.30 The probability of the observing this test
t= = −3.946
䉳
0.57 statistic or more extreme under the null
hypothesis is 0.001 using the t distribu-
on 13 + 9 − 2 = 20 df tion on 20 df
What does P = 0.001 mean? The results are unlikely when the null hypothesis
is true. Is this result statistically significant? The result is statistically significant
because the P-value is less than the significance level (α) set at 0.05 or 5%.
Decision: There is sufficient evidence to reject the null hypothesis and
accept the alternative hypothesis that there is a difference in mean 24-hour
total energy expenditure (MJ/day) between the Lean and Obese groups of
women.
(c) The 100 (1 − α)% confidence interval for the difference in the two
population means is
Where d = x̄1 − x̄2 and t1−α is taken from the t distribution with n1 + n2 − 2
degrees of freedom. E.g. 13 + 9 − 2 = 20 df, so for a 95% confidence interval
t0.05 = 2.086. The 95% CI for the population difference in the two population
means is then given by:
Therefore we are 95% confident that the true population mean difference
in 24 hour total energy expenditure (MJ/day) between Lean and Obese
women lies somewhere between −3.41 to −1.05 MJ/day, but our best
estimate is −2.23 MJ/day. So the result is consistent with women in the
obese group having a higher total energy expenditure than women in the
lean group.
SOLUTIONS TO EXERCISES IN CHAPTER 8 309
What does P = 0.001 mean? Your results are unlikely when the null hypoth-
esis is true.
Is this result statistically significant? The result is statistically significant
because the p-value is less than the significance level (α) set at 0.05 or
5%.
Decision: That there is sufficient evidence to reject the null hypothesis.
Therefore there is reliable evidence of a difference in the proportion feeling
better at 6 weeks between the Magnesium and Placebo treated patient
groups.
(b) pMagnesium = 12/15 = 0.80
pPlacebo = 3/17 = 0.176
pMagnesium − pPlacebo = 0.80 − 0.176 = 0.624
SE (pMagnesium − pPlacebo) = 0.139
95% CI:
0.624 − (1.96 × 0.139) to 0.624 + (1.96 × 0.139)
0.351 to 0.896
Therefore we are 95% confident that the true population difference in the
proportions of CFS patients feeling better at 6 weeks between the Magne-
sium and Placebo treated groups lies somewhere between 35% to 90%, but
our best estimate is 62%.
So the result is consistent with CFS patients in the Magnesium group
having a better outcome, and feeling better than patients in the Placebo
group.
3. (a) H0: No difference (or change) in mean daily dietary energy intake (kJ)
over 10 pre-menstrual and 10 post-menstrual days in normally men-
struating female subjects i.e. μPre-menstrual− μPost-menstrual = 0.0 KJ.
HA: There is a difference (or change) in mean daily dietary energy
intake (kJ) over 10 pre-menstrual and 10 post-menstrual days in nor-
mally menstruating female subjects μPre-menstrual − μPost-menstrual ≠ 0.00 KJ.
310 SOLUTIONS TO EXERCISES IN CHAPTER 8
Note that: In this case the two groups are paired and not independent (meas-
urements are made on the same individuals). Therefore we are interested in
the mean of the differences not the difference between the two means (not
independent groups). We can use a paired t-test to test the null hypothesis.
(b) Assumptions for paired t-test:
The dis, differences in pre- and post-menstrual dietary intake are
plausibly Normally distributed. (Note it is not essential for the original
observations to be Normally distributed).
The dis are independent of each other.
Computer Output
Paired Samples Statistics
Std Std. Error
Mean N deviation Mean
95%confidence
interval of the
Std. difference
Std error Sig.
Mean deviation mean Lower Upper t df (2-tailed)
Pair Pre-menstrual
1 dietary intake
(kJ/day) −
1320.455 366.74551 110.5779 1074.072 1566.838 11.941 10 .000
Post-menstrual
dietary intake
(kJ/day)
What does P = 0.001 mean? Your results are unlikely when the null hypothesis
is true.
Is this result statistically significant? The results is statistically significant
because the P-value is less than the significance level (α) set at 0.05 or 5%.
Decision: That there is sufficient evidence to reject the null hypothesis and
accept the alternative hypothesis that there is a difference or change in mean
daily dietary intake (kJ) between pre- and post-menstrual phases of the cycle
in normal menstruating female subjects.
(c) We are 95% confident that the true population difference in mean
daily dietary intake between the 10 pre-menstrual and 10 post-
SOLUTIONS TO EXERCISES IN CHAPTER 10 311
Chapter 9
1. (i) A = 1.198 B = 2.92 (ii) Yes. Assumption is that the effect of medication
is the same for both sexes (iii) 94.18 (iv) 79.41 (v) No, the R-
squared value is very small. Only about 5% of the variation is accounted for.
2. (i) A = 0.812, B = 0.861, C = 1.392 (ii) No both P values are above
0.05. The value of C 1.39 means that a person of a given age has an odds
ratio (approximate relative risk) of being 40% more likely to consider
their health poor.
Chapter 10
1. (a) See Sections 10.1 and 10.4 for definitions of censored and hazard ratio
respectively.
(b)
0.8
0.6
0.4
0.2
0.0
(c) From the graph the estimated median survival times are 4.3 years and
3.5 years for the Intervention and Control groups respectively. The
log rank test is not significant (p-value > 0.05), which implies we
cannot reject the null hypothesis that the two groups come from the
same population as regards survival times.
(d) Only the terms for gender and histology are statistically significant. In
this sample age and treatment group (after allowing for the other
covariates) are not associated with survival. Statistical significance
alone does not mean one could use the model for prediction. One
should compare the observed and predicted outcomes.
(e) The regression coefficient (hazard ratio) for the simple model contain-
ing treatment group alone suggests that, the risk of dying in the Inter-
vention Group (coded 1) is 0.92 times (95% CI: 0.74 to 1.13) that of
the Control group (coded 0). This is of similar magnitude to the model
with other covariates included. As we would expect the p-value from
the Cox model (p = 0.391) is similar to the results of the log rank test.
However, analysis 2 reassures us that there is no difference in overall
survival between the two groups even after adjustment for age, gender
and histology.
2. (a) People with an acute hip fracture are 60% more likely to die in the
first year afterwards if they have respiratory disease. If one takes into
account the age and sex of the patient, and their other risk factors,
this is reduced to 40%.
(b) Comorbid cardiovascular disease is a significant risk factor in the
univariate analysis. The reason why this appears to be not a risk factor
in the multivariate analysis might be because people with comorbid
cardiovascular disease are likely to be older (and possibly male) than
those without. Thus given a person’s age and sex, comorbid cardio-
vascular disease is not a significant risk factor.
(c) In addition to possibly the fact that people who get a chest infec-
tion may be older than those who do not, it is also likely that they
have comorbid respiratory disease, so that given their age and respira-
tory disease, a chest infection is still important, but the hazard is
halved.
(d) The main assumption is that the risk factor remains constant over the
year. This is likely with the comorbid states and with Parkinson’s
disease, but a chest infection is likely only to be a risk factor whilst
the patient suffers it, and so the risk will revert to unity once the infec-
tion is cured.
SOLUTIONS TO EXERCISES IN CHAPTER 14 313
Chapter 11
1. k = 0.5, or only moderate agreement, so one would not substitute one
method for the other.
10 ⎛ 11.16 ⎞
finally α Cronbach 1− = 0.95 . This indicates a high degree of con-
10 − 1 ⎝ 77.44 ⎠
sistency and so may be regarded as satisfactory for clinical application.
Chapter 12
1. (a) Prevalence study (b) unmatched case–control study (c) retro-
spective cohort study (d) cluster randomised trial (e) quasi-
experimental study.
2. Women who are given HRT may be better educated and informed than
women not given it. Women who are better educated tend to have lower
risk of heart disease.
Chapter 14
1. Here pPlan = 0.2, SEPlan = 0.025, thus from Section 14.5 m = 0.2 × (1 − 0.2)
/ (0.0252) = 256. Allowing for a 20% refusal rate (often quite high in
surveys) increases this to 256/0.8 = 320
2. The previous trial based on 554 patients had a 95% CI for the effect
of 4.90 to 5.09. This leads to a SE = 0.10, so that a reasonable anti-
cipated value of the standard deviation for the new study is sPlan = 0.10 ×
554 = 2.35 or approximately 2.5. The anticipated effect size is dPlan =
0.5 mmol, then formula 14.1 gives m = 16 × (2.5/0.5)2 = 400 per group
or N = 800 subjects in all, a withdrawal rate of 10% would bring this close
to 900.
σ Plan
2
3. m = 2θ
δ Plan
2
σ2Plan = 272, δPlan = 10, α = 0.05 and 1 − β = 0.90, θ = 10.5 from Table 14.3.
m = (2 × 10.5) × (272/102) = 153.09
314 SOLUTIONS TO EXERCISES IN CHAPTER 15
This gives an approximate sample size of 154 in each group (308 in total).
Chapter 15
1. This is a classic regression to the mean phenomenon. Since black-spots
are chosen because their accident rates are high, one might expect, by
chance that the rates would fall on re-measurement. This is less of a
problem if the rates are consistently high for a number of years and then
fall after the camera is installed, but one should also consider other aspects,
such as whether accidents were falling generally over the period of
interest.
2. Since this a randomised controlled trial, with a control group, the regres-
sion to the mean phenomenon does not apply to the comparison between
groups, since it would be expected to apply equally to both groups. If other
aspects of the trial are satisfactory (for example a high proportion of the
eligible children took part in the trial, and a high proportion were follow-
up in both groups) then that is strong evidence for a casual effect. Whether
it can be recommend depends on a number of factors: (i) the size of the
effect: a very small effect may not be worthwhile; (ii) the cost of treatment:
an expensive treatment may not be affordable; (iii) side effects: cod liver
oil may have untoward gastro-intestinal effects that mean that it is unsuit-
able for many people.
Statistical Tables
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
316
Table T1 The Normal distribution. The value tabulated is the probability, x, that a random variable. Normally distributed with mean
zero and standard deviation one, will be greater than z or less than −z
STATISTICAL TABLES
z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.00 1.0000 0.9920 0.9840 0.9761 0.9681 0.9601 0.9522 0.9442 0.9362 0.9283
0.10 0.9203 0.9124 0.9045 0.8966 0.8887 0.8808 0.8729 0.8650 0.8572 0.8493
0.20 0.8415 0.8337 0.8259 0.8181 0.8103 0.8206 0.7949 0.7872 0.7795 0.7718
0.30 0.7642 0.7566 0.7490 0.7414 0.7339 0.7263 0.7188 0.7114 0.7039 0.6965
0.40 0.6892 0.6818 0.6745 0.6672 0.6599 0.6527 0.6455 0.6384 0.6312 0.6241
0.50 0.6171 0.6101 0.6031 0.5961 0.5892 0.5823 0.5755 0.5687 0.5619 0.5552
0.60 0.5485 0.5419 0.5353 0.5287 0.5222 0.5157 0.5093 0.5029 0.4965 0.4902
0.70 0.4839 0.4777 0.4715 0.4654 0.4593 0.4533 0.4473 0.4413 0.4354 0.4295
0.80 0.4237 0.4179 0.4122 0.4065 0.4009 0.3953 0.3898 0.3843 0.3789 0.3735
0.90 0.3681 0.3628 0.3576 0.3524 0.3472 0.3421 0.3371 0.3320 0.3271 0.3222
1.00 0.3173 0.3125 0.3077 0.3030 0.2983 0.2837 0.2891 0.2846 0.2801 0.2757
z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
1.00 0.3173 0.3125 0.3077 0.3030 0.2983 0.2937 0.2891 0.2846 0.2801 0.2757
1.10 0.2713 0.2670 0.2627 0.2585 0.2543 0.2501 0.2460 0.2420 0.2380 0.2340
1.20 0.2301 0.2203 0.2225 0.2187 0.2150 0.2113 0.2077 0.2041 0.2005 0.1971
1.30 0.1936 0.1902 0.1868 0.1835 0.1802 0.1770 0.1738 0.1707 0.1676 0.1645
1.40 0.1615 0.1585 0.1556 0.1527 0.1499 0.1471 0.1443 0.1416 0.1389 0.1362
1.50 0.1336 0.1310 0.1285 0.1260 0.1236 0.1211 0.1188 0.1164 0.1141 0.1118
1.60 0.1096 0.1074 0.1052 0.1031 0.1010 0.0989 0.0969 0.0949 0.0930 0.0910
1.70 0.0891 0.0873 0.0854 0.0836 0.0819 0.0801 0.0784 0.0767 0.0751 0.0735
1.80 0.0719 0.0703 0.0688 0.0672 0.0658 0.0643 0.0629 0.0615 0.0601 0.0588
1.90 0.0574 0.0561 0.0549 0.0536 0.0524 0.0512 0.0500 0.0488 0.0477 0.0466
TABLE T1
2.00 0.0455 0.0444 0.0434 0.0424 0.0414 0.0404 0.0394 0.0385 0.0375 0.0366
z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
2.00 0.0455 0.0444 0.0434 0.0424 0.0414 0.0404 0.0394 0.0385 0.0375 0.0366
2.10 0.0357 0.0349 0.0340 0.0332 0.0324 0.0316 0.0308 0.0300 0.0293 0.0285
2.20 0.0278 0.0271 0.0264 0.0257 0.0251 0.0244 0.0238 0.0232 0.0226 0.0220
2.30 0.0214 0.0209 0.0203 0.0198 0.0193 0.0188 0.0183 0.0178 0.0173 0.0168
2.40 0.0164 0.0160 0.0155 0.0151 0.0147 0.0143 0.0139 0.0135 0.0131 0.0128
2.50 0.0124 0.0121 0.0117 0.0114 0.0111 0.0108 0.0105 0.0102 0.0099 0.0096
2.60 0.0093 0.0091 0.0088 0.0085 0.0083 0.0080 0.0078 0.0076 0.0074 0.0071
2.70 0.0069 0.0067 0.0065 0.0063 0.0061 0.0060 0.0058 0.0056 0.0054 0.0053
2.80 0.0051 0.0050 0.0048 0.0047 0.0045 0.0044 0.0042 0.0041 0.0040 0.0039
2.90 0.0037 0.0036 0.0035 0.0034 0.0033 0.0032 0.0031 0.0030 0.0029 0.0028
3.00 0.0027 0.0026 0.0025 0.0024 0.0024 0.0023 0.0022 0.0021 0.0021 0.0020
317
318 STATISTICAL TABLES
df a
Table T4 The χ2 distribution. The value tabulated is c2 (α), such that if X is distributed
as χ2 with df degrees of freedom, then α is the probability that X ≥ c2
0 χ2 (α)
df a
Table T5 Normal ordinates for cumulative probabilities. The value tabulated is z such
that for a given probability α, a random variable, Normally distributed with mean zero
and standard deviation one will be less than z with probability α.
0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.00 −2.33 −2.05 −1.88 −1.75 −1.64 −1.56 −1.48 −1.41 −1.34
0.10 −1.28 −1.23 −1.17 −1.13 −1.08 −1.04 −0.99 −0.95 −0.92 −0.88
0.20 −0.84 −0.81 −0.77 −0.74 −0.71 −0.67 −0.64 −0.61 −0.58 −0.55
0.30 −0.52 −0.50 −0.47 −0.44 −0.41 −0.39 −0.36 −0.33 −0.31 −0.28
0.40 −0.25 −0.23 −0.20 −0.18 −0.15 −0.13 −0.10 −0.08 −0.05 −0.03
0.50 0.00 0.03 0.05 0.08 0.10 0.13 0.15 0.18 0.20 0.23
0.60 0.25 0.28 0.31 0.33 0.36 0.39 0.41 0.44 0.47 0.50
0.70 0.52 0.55 0.58 0.61 0.64 0.67 0.71 0.74 0.77 0.81
0.80 0.84 0.88 0.92 0.95 0.99 1.04 1.08 1.13 1.17 1.23
0.90 1.28 1.34 1.41 1.48 1.56 1.64 1.75 1.88 2.05 2.33
Index
Note: boxed text is indicated by emboldened page numbers, and Figures and Tables by
italic numbers
Medical Statistics Fourth Edition, David Machin, Michael J Campbell, Stephen J Walters
© 2007 John Wiley & Sons, Ltd
INDEX 323