Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Two Sample t Test

The document provides an overview of the two-sample t-test, which is used to compare the means of two independent groups when the outcome is a continuous variable. It outlines the assumptions necessary for the test, the null and alternative hypotheses, and the interpretation of p-values and confidence intervals. Additionally, it mentions the Mann-Whitney U test as an alternative when assumptions for the t-test are not met.

Uploaded by

keroadel512
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Two Sample t Test

The document provides an overview of the two-sample t-test, which is used to compare the means of two independent groups when the outcome is a continuous variable. It outlines the assumptions necessary for the test, the null and alternative hypotheses, and the interpretation of p-values and confidence intervals. Additionally, it mentions the Mann-Whitney U test as an alternative when assumptions for the t-test are not met.

Uploaded by

keroadel512
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Two-sample t-test

Dr/Doaa Mohamed Mahmoud


Assistant professor of Public Health and
Community Medicine
ILOS
By the end of this session the students will be
able to:
 Identify the concept of the independent two-sample
(parametric or non-parametric test)
 Interpret p value and 95% confidence intervals
 Report the results in a table
Two-sample t-test
Two-sample t-tests are classically used when the outcome
is a continuous variable and when the explanatory
variable is binary.
 Two independent (unrelated) groups
 Two dependent (related) groups (paired
data)
➢ The variable may be measured on each individual in two
circumstances.
➢ The individuals in each sample may be different, but they
are linked to each other in some way.
Two independent (unrelated) groups
Two independent (unrelated) groups
 Two-sample t-tests are classically used when the outcome is
a continuous variable and when the explanatory variable
is binary.
 This test is also known as a Student’s t-test or an
independent samples t-test.
 A two-sample t-test is a parametric test used to estimate
whether the mean value of a normally distributed outcome
variable is significantly different between two groups of
participants.
Two independent (unrelated) groups
 We have samples from two independent (unrelated)
groups of individuals and one numerical variable of
interest in whether the mean or distribution of the
variable is the same in the two groups.
 Rejecting the null hypothesis of a two-sample t-test
indicates that the difference in the means of the two
groups is large and is not due to either chance or
sampling variation.
Two independent (unrelated) groups
Example
this test would be used to assess whether mean height is
significantly different between a group of males and a
group of females.
Rejecting the null hypothesis of a two-sample t-test indicates
that the difference in the means of the two groups is large
and is not due to either chance or sampling variation.
Two independent (unrelated) groups
1. In the population, the variable is normally distributed
and the variances of the two groups are the same. In
addition, we have reasonable sample sizes so that we
can check the assumptions of normality and equal
variances.
➢ This test is also known as a Student’s t test or an
independent samples t-test.
Two independent (unrelated) groups
Define the null and alternative hypotheses under
study
 Ho: the population means in the two groups are equal
 H1: the population means in the two groups are not equal.

We consider the difference in the means of the two groups.


Under the null hypothesis that the population means in the
two groups are the same, this difference will equal zero.

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

You might also like