4. OBJECTIVES
The learners are expected to:
a. Calculate the Standard Deviation of a
given set of data.
b. Calculate the analysis of Variance
(ANOVA) of a given set of data.
c. Calculate student t test of a given set
of data.
5. STANDARD DEVIATION
It is a special form of average deviation
from the mean.
It is the positive square root of the
arithmetic mean of the squared deviations
from the mean of the distribution.
It is considered as the most reliable
measure of variability.
It is affected by the individual values or
items in the distribution.
7. 1. Find the Mean.
2. Calculate the difference between each
score and the mean.
3. Square the difference between each
score and the mean.
4. Add up all the squares of the difference
between each score and the mean.
5. Divide the obtained sum by n – 1.
6. Extract the positive square root of the
obtained quotient.
8. How to Calculate the Standard
Deviation for Ungrouped Data
1. Add up all the squares of the difference
between each score and the mean.
2. Divide the obtained sum by n – 1.
3. Extract the positive square root of the
obtained quotient.
12. How to Calculate the Standard
Deviation for Grouped Data
1. Calculate the mean.
2. Get the deviations by finding the
difference of each midpoint from the
mean.
3. Square the deviations and find its
summation.
4. Substitute in the formula.
15. Characteristics of the Standard
Deviation
1. The standard deviation is affected by the
value of every observation.
2. The process of squaring the deviations
before adding avoids the algebraic
fallacy of disregarding the signs.
3. It has a definite mathematical meaning
and is perfectly adapted to algebraic
treatment.
16. Characteristics of the Standard
Deviation
4. It is, in general, less affected by
fluctuations of sampling than the other
measures of dispersion.
5. The standard deviation is the unit
customarily used in defining areas under
the normal curve of error.
6. It has, thus, great practical utility in
sampling and statistical inference.
18. VARIANCE
can be defined as the square of the
standard deviation.
In short, having obtained the value of the
standard deviation, you can already
determine the value of the variance.
It follows then that similar process will be
observed in calculating both standard
deviation and variance.
It is only the square root symbol that
makes standard deviation different from
variance.
20. How to Calculate the Variance
for Ungrouped Data
1. Find the Mean.
2. Calculate the difference between each
score and the mean.
3. Square the difference between each
score and the mean.
4. Add up all the squares of the difference
between each score and the mean.
5. Divide the obtained sum by n – 1.
25. How to Calculate the Variance
for Grouped Data
1. Calculate the mean.
2. Get the deviations by finding the
difference of each midpoint from the
mean.
3. Square the deviations and find its
summation.
4. Substitute in the formula.
29. STUDENT T TEST
• “Student” was W. S. Gossett.
• He published his test anonymously as “Student”
because he was working for the brewer’s
Guinness and had to keep the fact they were
studying statistics a secret.
• The test is used to compare samples from two
different batches.
• It is usually used with small (< 30) samples that
are normally distributed.
29
30. Types of student t test
I. Matched pairs
II. independent pairs
If there is some link between the data then use
the matched pairs test.
(eg a “before” and “after”)
If there is no link between the data then use the
independent pairs test.
30
31. QUESTION
• In an investigation to determine the effectiveness of
sequencing of fingerprints, 10 prints are taken
enhanced with DFO and then with ninhydrin. The
points of detail at each stage are recorded. Is there a
difference at the 95% confidence level?
31
8 12 11 6 9 11 7 8 10 9
10 15 12 6 13 14 9 9 15 12
DFO
DFO +
ninhydrin
32. t-test for matched pairs
1. Set up the null and alternative hypothesis:
H0 : there is no difference in the number of
minutae when using ninhydrin
Ha : there are more minutae observed after the
enhancement of ninhydrin.
This is a one-tail test.
We are testing at the 95% or 5% (0.05) level.
32
33. t-test for matched pairs
1. Set up the null and alternative hypothesis.
2. Calculate the difference between the pairs in the
sample.
33
8 12 11 6 9 11 7 8 10 9
10 15 12 6 13 14 9 9 15 12
2 3 1 0 4 3 2 1 5 3
DFO
DFO+
ninhydrin
Difference
(D)
TOTAL
24
34. t-test for matched pairs
1. Set up the null and alternative hypothesis.
2. Calculate the difference between the pairs in
the sample.
3. Calculate the mean of the differences
34
35. t-test for matched pairs
1. Set up the null and alternative hypothesis
2. Calculate the difference between the pairs in the
sample
3. Calculate the mean of the differences
4. Calculate the standard deviation of the difference
35
36. t-test for matched pairs
1. Set up the null and alternative hypothesis.
2. Calculate the difference between the pairs in the
sample.
3. Calculate the mean of the differences.
4. Calculate the standard deviation of the difference.
5. Calculate the standard error
36
37. t-test for matched pairs
1. Set up the null and alternative hypothesis.
2. Calculate the difference between the pairs in the
sample.
3. Calculate the mean of the differences.
4. Calculate the standard deviation of the difference.
5. Calculate the standard error.
6. Calculate the value of t
37
38. t-test for matched pairs
1. Set up the null and alternative hypothesis.
2. Calculate the difference between the pairs in the
sample.
3. Calculate the mean of the differences.
4. Calculate the standard deviation of the difference.
5. Calculate the standard error.
6. Calculate the value of t
7. Calculate the number of degrees of freedom
(DoF) and find the critical value
38
39. 7. Calculate the number of degrees of freedom
(DoF).
8. find the critical value
39
40. t-test for matched pairs
1. Set up the null and alternative hypothesis.
2. Calculate the difference between the pairs in the
sample.
3. Calculate the mean of the differences.
4. Calculate the standard deviation of the difference.
5. Calculate the standard error.
6. Calculate the value of t.
7. Calculate the number of degrees of freedom
(DoF).
8. find the critical value
40
42. t-test for matched pairs
1. Set up the null and alternative hypothesis.
2. Calculate the difference between the pairs in the
sample.
3. Calculate the mean of the differences.
4. Calculate the standard deviation of the difference.
5. Calculate the standard error.
6. Calculate the value of t
7. Calculate the number of degrees of freedom
(DoF).
8. find the critical value
9. Determine if there is a difference or not
42
43. 9. Determine if there is a difference or not.
t > tcritical (5.0 > 1.833)
So, the null hypothesis is rejected and the
alternative hypothesis is accepted.
The ninhydrin does make a positive difference
43
44. t-test independent samples
If there is no before and after relationship
between the samples then the independent
samples test is used.
44
45. EXAMPLE
• Some brown dog hairs were found on the clothing
of a victim at a crime scene involving a dog.
• The five of the hairs were measured: 46, 57, 54,
51, 38 μm.
• A suspect is the owner of a dog with similar brown
hairs.
• A sample of the hairs has been taken and their
widths measured: 31, 35, 50, 35, 36 μm.
• Is it possible that the hairs found on the victim
were left by the suspect’s dog? Test at the %5
level.
45
46. SOLUTION
• t-test independent samples
1. Calculate the mean and standard deviation for
the data sets
46
Dog A Dog B
46 31
57 35
54 50
51 35
38 36
total 246 187
mean 49.2 37.4
Standard
deviation
7.463 7.301
47. t-test independent samples
1. Calculate the mean and standard deviation for
the data sets.
2. Calculate the magnitude of the difference
between the two means.
49.2 – 37.4 = 11.8
47
48. t-test independent samples
1. Calculate the mean and standard deviation for the
data sets.
2. Calculate the magnitude of the difference between
the two means.
3. Calculate the standard error in the difference
48
49. t-test independent samples
1. Calculate the mean and standard deviation for the
data sets.
2. Calculate the magnitude of the difference
between the two means.
3. Calculate the standard error in the difference .
4. Calculate the value of t.
49
50. 4. Calculate the value of t.
t = difference between the means ÷ standard error
in the difference
• 11.8 ÷ 4.669 = 2.527 ≈ 2.53
50
51. t-test independent samples
1. Calculate the mean and standard deviation for
the data sets.
2. Calculate the magnitude of the difference
between the two means.
3. Calculate the standard error in the difference.
4. Calculate the value of t
5. Calculate the degrees of freedom
= n1 + n2 – 2
= 5 + 5 - 2 = 8
51
52. t-test independent samples
1. Calculate the mean and standard deviation for the
data sets.
2. Calculate the magnitude of the difference
between the two means.
3. Calculate the standard error in the difference.
4. Calculate the value of t.
5. Calculate the degrees of freedom.
6. Find the critical value for the particular
significance you are working to from the table
52
53. 6. Find the critical value for the particular significance
you are working to from the table.
At the 0.05 level tcrit = 2.306
53
54. 6. Find the critical value for the particular significance
you are working to and find the critical value from the
table
• If t < critical value then there is no significant
difference between the two sets of data.
• If t > critical value then there is a significant
difference between the two sets of data
• So, at 0.05 level there is a significant difference
between the two data sets ,So it could not come
from the same dog.
54
59. INTRODUCTION
• ANOVA means Analysis of Variance.
• It is used to separate the total variation in a set
of data into two or more components.
• The source of variation is identified so that one
can see its influence on the total variation.
• It is also used to compare means where there
are three or more.
• ANOVA is used to analyze the data from
experiments
59
60. There are several types of experiments and
techniques which utilize ANOVA.
These include :
One-way ANOVA
Two-way ANOVA
Multiple ANOVA
60
61. DATA
• For ANOVA work, the data are presented in a
data table. There must be at least three groups
of data although more are possible.
• Sample ANOVA data table:
61
62. STATISTICAL TEST
Test statistic and distribution
The ANOVA test statistic is the variance ratio,
V.R.
which is distributed as F with the appropriate
number of numerator degrees of freedom and
denominator degrees of freedom at the chosen
a level.
62
63. CALUCULATIONS
• Basic statistical calculations are made to
determine 𝑋, 𝑋2 and n for each group.
• Also required are N, the total number of
measurements and k, the total number of
groups.
• Then, an ANOVA table is made as shown below.
•
63
SOURCE df SS MS F
TOTAL N-1 (B) - -
GROUP K-1 (C) (E) (G)
ERROR N-K (D) (F)
64. • The ANOVA table has columns for:
degrees of freedom (df)
sums of squares (SS)
mean squares (MS)
variance ratio (F).
These values are found using a series of
calculations.
• For degrees of freedom, N and k are used in
the following formulas.
TOTAL df = N - 1
GROUP df = k - 1
ERROR df = N - k 64
65. DISCUSSION
The statistical decision in ANOVA is based on
whether the value of F exceeds the critical
value from the table of F values for the
appropriate numerator and denominator
degrees of freedom.
A large value of F indicates that the factor is
important in causing the variation.
We will see that it is very easy these days to
perform ANOVA calculations using an
appropriate calculator or computer software
program.
65
66. EXAMPLE (Sample one-way
ANOVA problem)
a) Data were obtained from goldfish breathing
experiments conducted in biology laboratory.
• The opercular breathing rates in counts per
minute were collected in groups of 8
measurements at different temperatures ranging
from 12°C to 27°C.
• Conclude weather the means are equal ?
66
67. b. Assumptions - It is assumed that there is
normal distribution of the data, that the data
represent independent random samples and that
there is a constant variance.
c. Hypotheses:
H0: all means are equal
HA: not all means are equal
67
68. [A] Calculate Correction Factor
• The formula used to calculate the correction
factor is:
• 15968016 / 48 = 332667
68
69. [B] Calculate Sum of Squares Total value (SS
Total)
• The value for SS Total is calculated using the
following formula.
SS Total = 𝒙 𝟐
-CF
69
70. C] Calculate Sum of Squares Group value (SS
Group)
For this calculation the formula is:
70
71. [D] Calculate Sum of Squares Error value (SS Error)
The formula for calculating SS Error value is:
SS Error = SS Total - SS Group
71
72. [E] Calculate Mean Square Group value (MS
Group)
The MS group is calculated as follows:
72
73. (F) Calculate Mean Square Error value (MS Error)
for calculating MS error value, formula is:
73
76. f. Discussion
• The 95% confidence level for F with 5 numerator
degrees of freedom and 42 denominator degrees
of freedom is about 2.45 as read from the F
tables.
• The actual value is 12.01 with a probability
(calculator value) of 2.98 x 10-7.
• This means that H0 is rejected.
g. Conclusions
• We conclude that not all the means of the groups
are equal.
76