Two Sample t Test
Two Sample t Test
N.B : Our two samples are of size n1, and n2. Their means are
X1 and X2 standard deviations are s1 and s2
Two independent (unrelated) groups
2. if the assumptions are not satisfied either:
Transform the data to achieve approximate normality
and/ or equal variances, or
Use a non-parametric test such as The Mann-
Whitney U test.
➢ Define the null and alternative hypotheses
under study
H0: the mean difference in the population equals zero
H1: the mean difference in the population does not equal
zero
Two independent (unrelated) groups
The Mann-Whitney U test
The test is based on the sum of the ranks of the
values in each of the two groups; these should be
comparable after allowing for differences in
sample size if the groups have similar
distributions.
Assumptions for using a two-sample t-
test
The assumptions that must be satisfied to conduct a two-sample
t-test are:
the groups must be independent, that is each participant
must be in one group only
the measurements must be independent, that is a
participant’s measurement can be included in their group
once only
the outcome variable must be on a continuous scale
the outcome variable must be normally distributed in each
group
Confidence intervals
Confidence intervals are invaluable statistics for estimating
the precision around a summary statistic such as a mean value
and for estimating the magnitude of the difference between
two groups. For mean values, the 95% confidence interval is
calculated as follows:
Confidence interval (CI) = Mean ± (1.96 × SE) where SE =
standard error.
To calculate the 99% confidence interval, the critical value of
2.57 instead of 1.96 would be used in the calculation.
This would give a wider confidence interval that would
indicate the range in which the true population mean lies with
more certainty.
Confidence intervals
a zero value for mean difference would indicate
no difference between groups. Thus, a 95%
confidence interval around the mean difference
that contains the value of zero, as it does for birth
length, suggests that the two groups are not
significantly different.
Confidence intervals