2. ā¢Compare magnitude of a
problem between groups
ā¢ Identify risk factors
ā¢Evaluate efficacy of interventions
(test hypothesis)
ā Experiments
ā¢ Programs evaluation
3. ā¢ Levels of comparison
ā Two independent groups (parameters)
ā Two related parameters
ā Several independent groups
(parameters)
4. Comparison of means (using
t-test)
ā¢ There are different types of t-tests:
a) One sample t-test:
a)Used to test hypothesis about
single population mean
b)Independent samples t-
test(independent means t-test):
ā¢used to compare the mean scores of two
different populations, for example experiment
and control groups in experimental studies
ā¢different participants are assigned to
each condition
(this is sometimes called the
independent- measures
5. c) Paired sample t-test (dependent means t-tes
āUsed to compare the mean scores
for the same group of people on two
different occasions.
āthe test is used when there are
two experimental conditions
āthe same participants take part in
both conditions of the experiment
ā the test is sometimes referred to as
the
matched pairs
6. ā¢ Assumptions of t-test:
ā The data are normally distributed.
āIn the dependent t-test this, means
that the sampling distribution of the
differences between scores should be
normal, not the scores themselves.
āData are measured at least on an
interval scale.
ā The independent samples t-test also
assumes:
ā¢Variances in these populations are roughly
equal (homogeneity of variance).
ā¢Scores are independent (because they come
from different people).
7. Performing t-tests using SPSS
(Examples) a)Testing the
hypothesized mean for a single
population (t-test):
Example
a) Researchers collected birth weight
data from a randomly selected sample
of 50 newborns. The mean birth weight
and standard were deviations were 3.1
and 0.57 kg respectively. Test the
hypothesis that the population birth
weight is not different from
3.5 kg at Ī±=0.05
ā Perform the test manually (do your
self)
b) Using SPSS software and a data file
ādata for exercise 50ā, test this same
hypothesis at the same level of
confidence.
8. Analyze ācompare means āone sample T- tes
quantitative variable into the ātest variablesā field āTy
hypothesized mean in the ātest valueā
field
āOk
The output from this
analysis are given below:
9. b)Two independent groups (two independent
samples t- test):
Example: Using a data file āCREGā,
test the hypothesis that the mean birth weight of male and femal
not different at Ī±=0.05. Analyze ā compare means āindep
samples T-test ādrag the quantitative variable into th
variablesā field ā move the qualitative variable into th
āgrouping variableā field āOk
The dialog sample box and outputs are
provided in the tables below
10. Reporting the result of Independent t-
test
ā¢ Mean birth weight of male and female
newborns were compared using two
independent samples t-test. We found
that the mean(Ā±SD) birth weight of
male,[3.070 (Ā±0.560) kg] and
female,[3.142 (Ā±581)kg] was not
significant different at Ī±=0.05
t(df) = -0.442(48), p =0.66.
11. c) Paired sample T-
Test:
ā¢ Is a type of t-test applied in condition of :
ā Self-paired (before and after)
ā Matching alike groups ( by age or sex for
instance)
āMeasurements are taken at two distinct points
in time
āThe difference between two observations
are used rather
than individual observations.
ā¢ Advantages:
ā Controls erroneous factors
ā Biological variability is illuminated
ā Makes comparison more precisely
12. Example: Using a data file āCREGā,
test the hypothesis that the mean
Fasting blood sugar (FBS) before and
after exercising in Gym for one month
among office holding
workers is not different at Ī±=0.05.
Calculate the effect size.
Solution:
ā¢Check assumptions (normality of
the differences)
ā¢To do so, first compute the
differences between
base line FBS and the value after Gym
exercise of one month
ā¢Then, visualize the data and test
using Shapiro
13. Analyze ā compare means āpaired
samples Ttest āmove the two
quantitative variable that you are
interested in comparing for each
subject into the box
āpaired variablesāā then, click Ok.
The output generated from this
procedure is shown in the following two
tables
14. Reporting the result of paired
t- test
The mean difference of FBS before and
after exercise, mean(Ā±SD) was [ =
=11.14 (Ā±10.86). This difference was
significant with t(df) = 7.25(49) , p
<0.001. The effect of exercise on the
FBS, Effect size=0.62% was observed,
which is very high.
15. Analysis of Variance
(ANOVA)
Introduction
A method of testing the hypothesis of
unequal means for more than two groups
without increasing the Type-I error rate of
the groups or
ā¢ Statistical technique for comparing means
for multiple (usually ļ³ 2) independent
populations without increasing their Type-I
error rate
16. Purpose of
ANOVA
The purpose of ANOVA is to test
whether an independent variable has an
effect on a dependent variable without
increasing the Type-I error rate,
whereā¦
ļ¼the dependent variable is
Interval/ratio level (continuous), and
ļ¼ the independent variable is
nominal,ordinal, or interval level
17. One Way
ANOVA
āTakes into account only one sources
of variation/factor while comparing
means or variances.
āANOVA is used to test statistical hypotheses
that propose differences between group
means.
āto test whether an independent variable has
an effect on a dependent variable without
increasing the type-I error rate, whereā¦
āthe dependent variable is Interval/ratio
level (continuous), and
āthe independent variable is nominal,
ordinal, or interval level
18. Why One Way
ANOVA?
ā¢When the group to be compared are
more than two, using ātā test is
unreliable:
ā tedious (kC2 comparisons) .
āGreater probability of making a type 1
error rejecting H0 when it is true.
ā When a single ātā test is performed at a
confidence level of 95%, we are willing to
accept type 1 error of 5% = 1 in 20
āIf we do 20 ātā tests on random data - expect
that 1 will be significantly different.
Example:
āComparing three groups using t-test might
cause a type 1 error of at least 14.3%.
20. i)The sum of squares due to differences
between the group means (SSB).
ii)The sum of squares due to differences
between the observations within each group
(SSW). This is also called the residual sum of
squares.
SST = SSB + SSW
SST = Total sum of squared deviations of
each observation about grand mean
SSB = Total sum of squared deviations of
group means about grand mean
SSW = Total sum of squared deviations of
each observation about group mean
21. ā¢ Properties of F test:
āIf F is close to 1, the two variances are likely
to be equal
āThe larger the value of āFā the greater the
chance that the two variances are not the
same
ā Does not identify the group or groups that
differ.
āIs robust (provides dependable results even
when there are violations of the assumptions).
āViolations are more critical when sample sizes
are small or ānās are not equal
āIf there are real differences, the between
groups variation will be larger.
ā If violations canāt be controlled or you think
that
there may be an increased chance of a type 1
error use p = 0.01
22. Relationship Between t
and F
ā¢ F = t2
ā¢āFā and ātā are based on the same
mathematical
model and t is just a special case of
ANOVA.
ā¢It is ok to use F test when comparing
2 means
23. Assumptions in
ANOVA
ā¢All populations from which the samples were drawn
are normally distributed. One of the following tests is
used to check for normality:
āKolmogorovāSmirnov test,
āQQ plot
āShapiro-Wilk test
ā¢Each of the populations has the same variance (all
variances are equal). Check one the following tests to
confirm homogeneity of the variances:
āRule of thumb: ratio of largest to smallest sample SD
must be less than 2:1
āLevene's test
āBartlett's test
24. ā¢The set of observations of data are independent
and
drawn randomly from population.
ā¢Results of ANOVA are approximates rather than
exact.
ā¢Data are parametric.
ā¢Variables required for one way ANOVA:
ā Two variables:
ā¢One categorical independent variable with three or
more distinct categories. This could be continuous
variable categorized into three or more groups
ā¢One continuous dependent variable
25. Running One way AOVA using
SPSS
i)In the MENU, click on
āAnalyze=> Compare Means =>One Way
ANOVA=>drag the quantitative
variable into ādependent listā and the factor
into āFactorā=> Option=> descriptive, fixed and
random effects => homogeneity of
variances=> continue=>
Ok.
ii)Examine the output and do the post hoc
test if ANOVA test is significant to identify which
group is different.
26. Exampl
e
Assume that that 25 patients with blisters were randomly assigned into 2
treatments and a placebo group. Treatments: Treatment A, Treatment B,
Placebo
Average number of days until blisters was healed after starting the
treatment was measured and compared
Data
ā¢ A: 5,6,6,7,7,8,9,10
ā¢ B: 7,7,8,9,9,10,10,11
ā¢ P: 7,9,9,10,10,10,11,12,13
[means]:
[7.25]
[8.875]
[10.11]
1)Compare the three groups using appropriate
graphs
2)Describe the data using numerical
summaries
3)Is there a significant difference among
these
means at Ī±=0.05? Test the hypothesis
using:
a)manual methods
b) SPSS Software
27. Solutions:
1) First show graphical displays to
visualize the comparison
ā¢ Side-by-side box plots (Graph>Legacy>Box
plots)
Box and whisker comparing average days
required for the three groups to remove
blisters
28. 2)Numerical Summary of the
result
3) Test the Hypothesis
a)Manual Methods
1)Describe the data:
ā Done in the previous table
2) Check Assumption
ā¢ Each group is approximately normal
ācheck this by looking at histograms and/or
normal quantile plots, or use assumptions
ā can handle some non-normality, but not
severe
outliers
29. ā¢Standard deviations of each group
are approximately equal
āRule of thumb: ratio of largest to smallest
sample standard deviation must be less than
2:1, or
ā Twice the smallest SD is greater than the
largest
SD.
3) State the hypotheses:
ā¢ H0: The mean # of the three treatment are
equal.
ā¢Ha: Not all the treatment mean # of days
are equal.
4) Calculate the test statistic
30. DF (numerator)= K-1= 3-
1= 2
MSb= 34.72/2 =17.36
Fc = MSb/MSw= 17.36/2.69 = 6.45
5)Decision and conclusion:
ā Since Fc= 6.45 > FT =3.44, we reject
the Ho
āAt least one of the means is
significantly different.
See the summary in the following
table
31. 3 (b) Use the SPSS to test the same
hypothesis done manually
Standard Deviation
Check
Compare largest and smallest standard
deviations:
ā¢ largest: 1.764
ā¢ smallest: 1.458
ā¢ 1.458 x 2 = 2.916 > 1.764
One way ANOVA Output
32. ā¢ Interpretation of the output
ā The mean number of days blister was
remove was removed from the three
group was statistically significant
difference, F(2,22)=6.45, P.Value =
0.006.
33. 3.2.4. Multiple Comparison
ā¢ ANOVA does not provide any information on which
population or populations differed from the other.
ā¢ Multiple-comparison procedures are used to provide
information on this point.
ā¢ All are essentially based on the t-test but include appropriate
corrections for the fact that we are comparing more than
one
pair of means.
ā¢ There are long list of multiple comparison: but the most
frequently used ones are:
ā Bonferroniās t-method
ā Tukeyās HSD (Honestly Significant Difference)
ā Cheffeās Procedure;
34.
35.
36. Application of ANOVA (Summary)
ā¢ Applicable to quantitative variables
ā¢ Number of groups to be compared is more than two.
ā¢ More appropriate when randomized experimental design is
employed.
ā¢ But, can also be used for observational designs and surveys.
ā¢ When ANOVA is significant and Ho is rejected, then it is
important to do a post hoc test( pair-wise comparison).
It divides āĪ±ā by the number of comparisons, k (Ī±/k,).
ā¢ When assumptions required for ANOVA are not met, a nonparametric
test equivalent to ANOVA (Kruskal Wallis test) is performed.