Professional Documents
Culture Documents
Merlin
The best way to carry out statistical calculations is to use computer software. In school we have "Merlin", which is an Excel
add-in that performs all the statistics easily. To use Merlin:
1. Double-click on the file "Merlin.xla" (your teacher will tell you where to find it).
2. If you get a warning message about macros then click on "enable macros", or Merlin won't work.
3. Excel will start with Merlin installed. There will be a new "Merlin" menu item.
4. Open a new or existing Excel file and use the Merlin functions just like normal Excel functions. You can also plot
charts from the Merlin menu.
5. You can get help on all Merlin's functions using Merlin help in the Merlin menu.
Merlin is completely free and can be copied to any computer, so you can use it at home.
Descriptive Statistics
number of times each value
occurs
mean
95% CI
95% CI
normal
distribution
curve
values
The central value of the normal distribution curve is the mean (also known as the arithmetic mean or average). But how
reliable is this mean? If the data are all close together, then the mean is probably good, but if they are scattered widely, then
the calculated mean may not be very reliable. The
small confidence limit,
large confidence limit,
low variability,
high variability,
spread of the replicates is given by the standard
data close together,
data scattered,
deviation (SD), and the more spread out the
mean is reliable
mean is unreliable
replicates are, the larger the SD. The accuracy (or
confidence) of the calculated mean is given by
the 95% confidence interval (CI). You can be
95% confident that the real mean lies somewhere
in the range: calculated mean CI. For example
if a calculated mean is 10 with a CI of 2, then we are confident that the real mean lies somewhere in the range 8 to 12, and
there is only a 5% chance that it lies outside this range. Whenever you calculate a mean you should also calculate a
confidence interval to indicate the quality of your replicates. The confidence interval should be shown on a chart as an error
bar.
Non-Normal Data
Sometimes replicate data are not normally-distributed, and a histogram of replicates doesn't give a symmetrical, bell-shaped
curve. This can happen with arbitrary scales like "1-5", calculated data and data sets with extreme outliers. In this case it's
meaningless to calculate a mean or a CI, so instead of a mean you calculate the median; instead of a CI you calculate the
interquartile range; and instead of a bar chart you draw a box plot. This shows the median as a central line; the interquartile
range as a box; and the maximum and minimum values as "whiskers".
HGS Biology
NCM/01/06
A2 statistics page 2
Once you have drawn a graph, you can now change any aspect of it by double-clicking (or sometimes right-clicking) on the
part you want to change. For example you can: move and re-shape the graph; change the shape and size of the markers
(dots); or change the axes scales and tick marks.
HGS Biology
NCM/01/06
A2 statistics page 3
Questions
1. The effect of three different fertilisers on growth of wheat seedlings was investigated by measuring the heights of wheat
seedlings after treatment with fertiliser. Five plants were measured with each fertiliser, with the following results:
+HLJKWRIVHHGOLQJP
)HUWLOLVHU$
)HUWLOLVHU%
)HUWLOLVHU&
SODQW
SODQW
SODQW
SODQW
SODQW
PHDQ
&,
Use Merlin to calculate the means and 95% confidence limits of these results, then plot a bar chart graph of the mean
results with error bars.
2. In an investigation into the rate of photosynthesis in Elodea the number of bubbles given off in one minute was counted
under different light intensities. Each measurement was repeated 5 times. Use Merlin to calculate the means and 95%
confidence intervals of these results, then plot a graph of the mean results with error bars and a line of best fit.
1RRIEXEEOHVSHUPLQ
OLJKWLQWHQVLW\/X[
WULDO
WULDO
WULDO
WULDO
WULDO
PHDQ
&,
3.
The measured body temperature for a group of 30 students is 36.6 0.95C. Does this result agree with the human
body temperature of 37.5C given in the textbook?
4.
20
30
40
50
60
What conclusion can you draw from the bar chart on the right?
H eig h t
5.
10
HGS Biology
NCM/01/06
70
A2 statistics page 1
C o m p a ra tiv e S ta tistic s
Descriptive statistics are used to summarise data so you can simplify them and plot a graph. This is what you did in AS,
and includes the mean and 95% confidence interval. For non-normal data you may instead have to calculate the median and
interquartile range.
Inferential Statistics test a statement called the null hypothesis, and return a probability (called a P-value) that the null
hypothesis is true. The null hypothesis is a mathematical statement and is fixed for a given test (the exact null hypothesis is
given for each test on the next few pages). It has nothing to do with (and can be quite different from) any scientific
hypothesis you may be making about the result of the experiment. The lower the probability, the less likely it is that the null
hypothesis is true, and in biology we usually take 0.05 (or 5%) as the cut-off. This may seem very low, but it reflects the
facts that biology experiments are expected to produce quite varied results.
If P < 5% (0.05) then we reject the null hypothesis, and conclude that there is a significant difference or association.
If P 5% (0.05) then we accept the null hypothesis, and conclude that there is no significant difference or association.
There are two kinds of inferential statistics:
Comparative statistics are used to compare different sets of data to see if they are different (e.g. is this group bigger than
that group?). The null hypothesis states that there is no difference between the sets of data. You must also choose between
matched-sample experiments and independent sample experiments. In a matched-sample experiment each measurement
from the first group matches up with corresponding measurement in the other groups, perhaps because they were all made
on the same subject (e.g. a "before and after" experiment). Otherwise you have an independent sample experiment. If it isn't
obvious which value matches with which, then it's probably not matched.
Association statistics are used to look for an association (or correlation) between two sets of data (e.g. if this goes up does
that go up?). The null hypothesis states that there is no association between the sets. A scatter graph (or mosaic chart for
categoric data) of one factor against the other (without a line of best fit) indicates the association. If both factors increase
together then there is a positive correlation; if one factor decreases when the other increases then there is a negative
correlation; and if the scatter graph has apparently random points then there is no correlation:
HGS Biology
NCM/01/06
A2 statistics page 2
N o C o rre la tio n
variable 2
variable 2
variable 2
variab le 1
variab le 1
variab le 1
D ata
Q u an titativ e D ata
(n u m b ers)
n o rm ally
d istrib uted
Q u alitativ e D ata
(w o rd s)
n o t n orm ally
d istrib uted
o r o rd in a l
c an b e
ran k e d
c an n o t be
ran k e d
O rd in a l D a ta
N o m in a l D a ta
u se freq u en c y tests
Most quantitative measurements (e.g. length, mass, temperature, rates, counts) are normally-distributed, especially if you
have a large number of repeats. For normally-distributed data you can use the most powerful Parametric Tests.
Other quantitative measurements are not normally-distributed. These include arbitrary scales like "1-5", calculated data
and data sets with extreme outliers. In this case the parametric tests are invalid, so choose Non-Parametric Tests.
Some qualitative data can be ranked, so can be replaced by numerical ranks (e.g. big, medium, small become 1, 2, 3).
These can then be analysed using Non-Parametric Tests.
Finally, the data can simply be categories that cannot be ranked (e.g. colours, shapes, species). We can't do maths on
categoric data, but we can count the numbers in each category to give frequencies, and then compare these observed
frequencies with some expected frequencies using Frequency Tests.
HGS Biology
NCM/01/06
A2 statistics page 3
All the different statistical tests you will come across are summarised in this table. Don't panic, you don't need to learn this!
Parametric Tests
(for normal data)
Descriptive
Statistics
Comparative
Statistics
2 groups
2 groups
2 groups
Matched
Samples
2 groups
Chart
Association
Statistics
Box Plot
Unpaired t-Test
Mann-Whitney U-Test
Anova
Kruskal-Wallis Test
Paired t-Test
Wilcoxon Test
Matched Anova
Friedman Test
Scatter Graph
Independent
Samples
Median, Quartiles
Bar Chart
Chart
Frequency Tests
(for nominal data)
Mean, Standard
Deviation, 95% CI
Summarise Data
Non-Parametric Tests
(for ordinal data)
Scatter Graph
Mosaic Chart
Pearson Correlation
Spearman Correlation
Chi-Squared Test
of Association
Linear Regression
Chi-Squared Test
or G-Test
While planning your investigation, choose a suitable statistical test using Merlin's "Choose a
Test" or the table above.
Look up the test in this document. State the null hypothesis as precisely as you can for your
experiment; e.g. "There is no difference between the means of the plant heights in the two areas".
This statement is what the statistical test will actually test.
3. Obtain
Results
Carry out the investigation and obtain results. For hypothesis-testing we need as many replicate
measurements as possible, and as a guide, aim for at least 10 replicates and preferably 20 in each
set.
4. Present the
Data
Present your raw data in a neat results table. Use Merlin to calculate descriptive statistics, like
mean and 95% CI, and plot an appropriate graph.
5. Carry out the Type the Merlin formula for your chosen test into an empty cell e.g. =TTESTP(B3:B12,C3:C12).
Statistical Test This will return the P-value for that test. It's a good idea to format this cell as a percentage
(Format menu > Cells > Number tab > Percentage), so for example a P-value of 0.02 appears as
2%.
6. Make a
Conclusion
State whether you accept or reject the null hypothesis, and write a sentence explaining exactly
what that means in this case. For example if P was < 5% then you would reject the null
hypothesis and say that the plants in group A are significantly taller than the plants in group B. Or
if P was > 5% then you would accept the null hypothesis and say that as far as you can tell from
the data, there is no significant difference between the heights of the two groups of plants. The
wording of the conclusion is important, so use these examples as a guide and think carefully
about what you are saying. Note that if P > 5% we haven't proved the null hypothesis, but since
our data are consistent with it, we accept it.
There are lots of examples of conclusions on the next five pages. This is a statistics reference guide, which describes each
of the tests in detail.
HGS Biology
NCM/01/06
A2 statistics page 4
Unpaired t-Test
(t-test)
This test is used to compare two sets of data, and it
tests the null hypothesis that the two sets have the
same mean. The data must be normally-distributed and
there must at least 10 replicates (and preferably much
more). If P<5% then the null hypothesis is rejected
and there is a significant difference between the two
means.
The Merlin function is =TTESTU(range1, range2). In
this example the effect of two fertilisers on yield of
potatoes
is
compared.
The
formula
=TTESTU(B3:B12,C3:C12) is typed into cell B15
and formatted as a percentage. The P value is >5% so
we accept the null hypothesis and conclude that there
is no significant difference between the two fertilisers.
Paired t-Test
This test is used to compare two sets of paired
(matched) data, and it tests the null hypothesis that the
mean difference between the pairs is zero. The data
must be in pairs, they must be normally-distributed
and there must at least 10 replicates (and preferably
much more). If P<5% then the null hypothesis is
rejected and there is a significant difference between
the two sets.
The Merlin function is =TTESTP(range1, range2).
This example compares pulse rate before and after
eating a large meal. Because each individual had their
pulse measured before and after the meal then the data
are paired. The formula =TTESTP(B3:B12,C3:C12) is
typed into cell B15 and formatted as a percentage. The
P value is <5% so we reject the null hypothesis and
conclude that pulse rate is significantly higher after a
meal.
HGS Biology
NCM/01/06
A2 statistics page 5
Mann-Whitney U-Test
This test is used to compare two sets of data, and it
tests the null hypothesis that the two sets have the
same median. The data can be any form so long as
they can be ranked and there must at least 10
replicates (and preferably much more). If P<5% then
the null hypothesis is rejected and there is a significant
difference between the two medians.
The Merlin function is =UTEST (range1, range2).
This example compares the abundance of blown algae
(measured on a 1-5 score) on two different shores. The
formula =UTEST(B3:B12,C3:C12) is typed into cell
B13 and formatted as a percentage. The P value is
<5% (just!) so we reject the null hypothesis and
conclude that there is significantly more algae on the
sheltered shore.
HGS Biology
NCM/01/06
A2 statistics page 6
Kruskall-Wallace Test
This test is used to compare two or more sets of data,
and it tests the null hypothesis that the sets have the
same median. The data can be any form that can be
ranked and there must at least 10 replicates (and
preferably much more). If P<5% then the null
hypothesis is rejected and there is a significant
difference between at least one of the sets.
The Merlin function is =KWTEST(range), where each
column in the range is a different set. This example
compares decay rates of three species of leaf,
measured by % of leaf area remaining after 8 weeks
burial. The formula =KWTEST(B3:D11) is typed into
cell B12 and formatted as a percentage. The P value is
<5% so we reject the null hypothesis and conclude that
there is a significant difference between at least two of
the leaves. From the box plot, the beech leaves must
decay significantly more slowly than the other two
species.
Friedman Test
This test is used to compare two or more sets of
matched data, and it tests the null hypothesis that the
median difference between the sets is zero. The data
can be any form that can be ranked but must be
matched, and there must at least 10 replicates (and
preferably much more). If P<5% then the null
hypothesis is rejected and at least one of the sets is
significantly different.
The Merlin function is =FRIEDMAN(range), where
each column in the range is a different set. This
example compares the symptoms of patients (on a
score system) before and after treatment with a drug.
The formula =FRIEDMAN(B3:D12) is typed into cell
B13 and formatted as a percentage. The P value is
<5% so we reject the null hypothesis and conclude that
at least one of days is significantly different. From the
medians, there is a significant drop in symptoms after
treatment, so the drug works.
HGS Biology
NCM/01/06
A2 statistics page 7
Other times the expected frequencies can be calculated
by assuming that the frequencies in all the categories
should be the same. In this example the frequencies of
boys and girls born in a hospital over a period of time
are compared to an expected 1:1 ratio. The expected
frequencies can be calculated from the total number of
observations (445) using simple Excel formulae. The
formula =CHITEST(B2:B3,C2:C3) is typed into cell
C5 and formatted as a percentage. The P value is >5%
so we accept the null hypothesis and conclude that
there is no difference between male and female births.
G-Test
This test is also used for frequencies of categoric data, and it can be used whenever the chisquared test can be used. Many
statisticians prefer the G-test to the chisquared test. It has the same null hypothesis as the chisquared test. The Merlin
function is =GTEST(obsrange, exprange).
For the genetic cross example above GTEST gives the P-value 53.04%.
For the sex of baby example above GTEST gives the P-value 6.45%.
So in both cases the conclusion is the same.
HGS Biology
NCM/01/06
A2 statistics page 8
Linear Regression
This is used to describe a linear relationship between
two sets of data. It is used when you already know that
one variable causes the changes in the other variable
(i.e. there is a causal relationship). Regression fits a
straight line to the data, and gives the values of the
intercept and slope (or gradient) of that line (a and b in
the equation y = a + bx).
The Merlin function =REGRESS(xrange, yrange, flag)
returns values for the slope and intercept as well as
their 95% confidence intervals. The flag value
determines whether the intercept is fixed at zero.
REGRESS is an array function, so a square of 4 cells
is selected and the function is entered with ctrl-shiftEnter.
In this example the absorption of a yeast cell
suspension is plotted against its cell concentration
from
a
cell
counter.
The
formula
=REGRESS(A2:A12,B2:B12,0) was typed into cells
b15:c16 and entered as an array formula. The intercept
was fixed at zero because 0 cells have 0 absorbance.
The straight trendline was also plotted on the scatter
graph. The regression can then be used to make
quantitative predictions. For example, we could
predict that a sample with an absorbance of 1.37 has a
cell concentration of 9 x 107 cells cm-3.
HGS Biology
NCM/01/06
A2 statistics page 9
Excel Tips
Take time to tidy all results tables, as Excel's default formatting isn't very good e.g. line up titles with values.
Format all numbers to an appropriate number of decimal places (Format menu > Cells > Number tab > Number).
Format P-values as percentages (Format menu > Cells > Number tab > Percentage). This automatically multiplies the
P-value by 100 and adds the % sign to make small P values easier to read and understand.
Use Merlin for charts, even if Excel provides the same chart (e.g. a scatter graph). The format of Merlin charts is better
for scientific data. Even so, take time to tidy up all charts, adjusting the size, shape, colour, font size, etc. to make the
chart clear.
Never use an Excel line chart.
2.
3.
4.
5.
6.
HGS Biology
7.
8.
9.
NCM/01/06
A2 statistics page 10
Statistics Problems
6LWH
&RQGXFWLYLW\
'LYHUVLW\
LQGH[
'UXJ%
&XOWXUH
)XOOIDW
6HPL
8+7
QXPEHU
PLON
VNLPPHG
PLON
PLON
QRRI
ZRRGOLFH
GU\GDUN
GU\OLJKW
ZHWGDUN
ZHWOLJKW
5DWH
P0
DUELWUDU\XQLWV
HGS Biology
NCM/01/06
A2 statistics page 11
6. The flow rate of a river was measured at seven
stations one two different days.
6WDWLRQ
'D\
'D\
'HFLGXRXV
&RQLIHURXV
ZRRGODQG
ZRRGODQG
:LGWK
+HLJKW
PP
PP
7UHH
$UHDRIPRVVRQ
$UHDRIPRVVRQ
QRUWKVLGHRIWUHH
VRXWKVLGHRIWUHH
PP
PP
<HOORZZULQNOHGVHHGV
*UHHQURXQGVHHGV
*UHHQZULQNOHGVHHGV
\HOORZ
EOXH
IORZHUV
IORZHUV
IORZHUV
EHHWOHV
IOLHV
ZDVSV
HGS Biology
NCM/06/03