2. Hypothesis Testing for Quantitative data
Quantitative type of measurements such as haemoglobin level,
serum Zinc level and blood pressure etc., are generally
summarized in terms of means.
There are situations for comparison of means in hypothesis
testing. One such testing could be comparison of a computed
mean, for example mean haemoglobin level with a prespecified
standard or proportion mean value.
The other could be comparison of means in two independent
groups such as comparison of mean haemoglobin levels in a
random sample of well nourished and under nourished groups.
3. Inference on Quantitative Data for Comparison of Two Means
Does the data
follow a
Gaussian
distribution?
Unpaired Paired Unpaired Paired
Yes No
Student’s t-
Test for
unpaired data
Student’s t-
Test for
paired data
Wilcoxon
rank sum
test
Wilcoxon
signed rank test
4. Comparison of mean with a pre-specified value
(One sample t-test):
Consider a hypothetical example of haemoglobin levels in 15 HIV positive
neonates. The sample (n=15), has the levels of Hb in g/dl are 12.6, 15.4, 11.5, 12.4,
13.2, 13.8, 12.8, 14.4, 16.2, 14.8, 15.1, 3.5, 12.9, 16.0, 14.9. The mean and SD of
the above series of observations is 13.9 and 1.41 respectively.
The null hypothesis under test is that the average of Hb level of HIV positive
neonates is the same 15.9g/dl as is normal neonates.
The alternative hypothesis is Hb level is less than 15.9 g/dl. Since the value is
expected to be lower in HIV positive neonates. The value of t is computed as:
t=[ x
̅ -µ] / SE (x
̅ )
t = (13.9-15.9)/ (1.41/√15) or -5.49 or 5.49 (after ignoring sign)
Here the critical value of t at 14 degree of freedom is 2.62 at 1% level for one
tailed test. The calculated value of t is more than critical value at 1% and
hypothesis is rejected with P<0.01. This is interpreted as the mean Hb level in HIV
positive neonates is significantly (P<0.01) lower than that of the level in normal
neonates.
5. Comparison of two Independent means (Two sample
independent t-test):
To compare mean systolic blood pressure levels in type 1 diabetic children in comparison
to control group. The sample of children in each group is 25.
The null hypothesis Ho: There is no difference in mean sys BP levels between cases and
control groups.
The mean and SD of observed in these groups are as follows.
Systolic Bp
(x)
Diabetes Group
(n1=25)
Control Group
(n2=25)
Mean 112.66 116.8
SD 9.69 7.04
The t -test criterion to test whether the means are different can be calculated by using the
following formula:
t = (x
̅ 1 – x
̅ 2) / SE (x
̅ 1 – x
̅ 2) or
Where,
6. x
̅ 1, x
̅ 2 are mean sysBP and Sx1, Sx2 are standard deviations of
observations in case and control groups respectively.
Sx1x2 is the pooled standard deviation. The degrees of freedom are
n1+n2-2.
Students’t value by using the above formula is
t = (112.656-116.264)/8.467×√(1/25+1/25) where Sx1x2 = 8.467
= -3.608/2.3948
t = -1.502 or 1.502 (after ignoring sign)
The calculated value of t= 1. 502. Compare this value with critical
value of 2.01 using t-tables (table-23) at 48df. The calculated value
is less than the table value. Thus the null hypothesis of equality of
means is not rejected. The result is not significant (p>0.05) at 5%
level.
7. Comparison of means in paired setup (paired t- test):
Consider a clinical trial on asthmatic children where the interest is to
compare force expiratory volume in one second (FEV1) which measures
pulmonary impairment in an intervention. The values of FEV1 on 15
patients before and after intervention for the purpose of illustration are
given below:
Before
Intervention
40.5 82.4 90.3 82.4 86.9 75.8 45 76.1 91.2 88.3 120.2 72.5 79.3 75.3 84.5
After
Intervention
45.1 83.5 92.4 83.1 88.3 78.2 55.8 75.2 90.9 88.9 110.3 73.7 75.9 71.2 90.5
Difference -4.6 -1.1 -2.1 -0.7 -1.4 -2.4 -11 0.9 0.3 -0.6 9.9 -1.2 3.4 4.1 -6
The null hypothesis:
Ho: There is no significance difference between values of FEV1 before and after
intervention periods.
8. The test of significance in this case becomes one sample t-test as
the test is applied on mean of differences.
Mean of differences = -0.82
S.D difference = 4.67
Then, t= -(0.82)/4.67×√(15) = -0.679 or 0.679 (Ignoring sign)
From student’s-t tables critical value at 14 df is 2.145 for two tailed
test.
After ignoring the sign the calculated value (0.679) is much less
than the critical value and hence null is not rejected.
This is interpreted as mean FEV1 before is not significantly
(P>0.05) different after intervention.
9. ANOVA (Analysis of Variance)
• Analysis of Variance (ANOVA) is a collection
of statistical models used to analyse the
differences between group means or variances.
• Compares multiple groups at one time
• Developed by R.A.Fischer
11. One way ANOVA
Compares two or more unmatched groups when
data are categorized in one factor
Ex:
1. Comparing a control group with three
different doses of aspirin
2. Comparing the productivity of three or more
employees based on
• working hours in a company
12. Two way ANOVA
• Used to determine the effect of two nominal
predictor variables on a continuous outcome
variable.
• It analyses the effect of the independent
variables on the expected outcome along with
their relationship to the outcome itself.
Ex: Comparing the employee productivity based
on the working hours and working conditions.
13. Assumptions of ANOVA:
• The samples are independent and selected
randomly.
• Parent population from which samples are
taken is of normal distribution.
• Various treatment and environmental effects
are additive in nature.
• The experimental errors are distributed
normally with mean zero and variance σ2.
14. • It again depends on experimental designs
• Null hypothesis:
• Hο = All population means are same
• If the computed Fc is greater than F critical
value, we are likely to reject the null
hypothesis.
• If the computed Fc is lesser than the F critical
value , then the null hypothesis is accepted.
15. ANOVA Table
Sources of
Variation
Sum of
squares
(SS)
Degrees of
freedom
(d.f)
Mean squares
(MS)
𝒔𝒖𝒎 𝒐𝒇 𝒔𝒒𝒖𝒂
𝒓𝒆𝒔/
𝒅̅𝒆𝒈𝒓𝒆𝒆𝒔 𝒐𝒇 𝒇
𝒓𝒆𝒆𝒅̅𝒐𝒎
F - Ratio
Between
samples
or groups
(Treatments)
Treatment
sum of
squares (
TrSS)
(k-1) 𝑇𝑟𝑆𝑆/ (𝑘 − 1) 𝑇𝑟𝑀𝑆/𝐸𝑀𝑆
Within
samples or
groups (
Errors )
Error sum of
squares (ESS)
(n-k) 𝐸𝑆𝑆/(𝑛 − 𝑘)
Total Total sum of
squares (TSS)
(n-1)
16. S.No. Type of group Parametric test
1. Comparison of two paired groups Paired t-test
2. Comparison of two unpaired groups Unpaired two sample t-test
3. Comparison of population and sample
drawn from the same population
One sample t-test
4. Comparison of three or more matched
groups but varied in two factors
Two way ANOVA
5. Comparison of three or more matched
groups but varied in one factor
One way ANOVA
6. Correlation between two variables Pearson Correlation
17. ANOVA F-test (one way analysis):
This method compares means in three or more groups.
The total variance in all groups combined is broken into
between group variation and within group variation.
A test criterion of ratio of these two components of variation
is used to find whether the group means are different or not.
This procedure is mathematically complex and statistical
packages can be used for computational purposes.