Mm13 Content Module 8
Mm13 Content Module 8
Mm13 Content Module 8
T- test
Topic: t - Test
I. INTRODUCTION:
This module will give you an in-depth understanding on using t-test as statistical tool for
determining the significant difference between two means.
II. OBJECTIVES:
The t test is one type of inferential statistics. It is used to determine whether there is a significant
difference between the means of two groups. With all inferential statistics, we assume the dependent
variable fits a normal distribution. When we assume a normal distribution exists, we can identify
the probability of a particular outcome. We specify the level of probability (alpha level, level of significance, p)
we are willing to accept before we collect data (p < .05 is a common value that is used).
Before you proceed to the main lesson, test yourself in this activity.
Differentiate t-test from z – test. Write your answer below in at most 5 sentences.
ADVANCED STATISTICS Page 2 of 15
T- test
GREAT!!!
You may now proceed to the main lesson.
Based on the preliminary activities, what did you notice about it?
________________________________________________________
CONGRATULATIONS!
You may now proceed to the lesson.
T-test
When the difference between two population averages is being investigated, a t test is used. In other
words, a t test is used when we wish to compare two means (the scores must be measured on an interval or
ratio measurement scale).
The test statistic that a t test produces is a t-value. Conceptually, t-values are an extension of z-
scores. In a way, the t-value represents how many standard units the means of the two groups are apart.
With a t test, the researcher wants to state with some degree of confidence that the obtained
difference between the means of the sample groups is too great to be a chance event and that some
difference also exists in the population from which the sample was drawn.
FIVE FACTORS THAT CONTRIBUTE TO WHETHER THE DIFFERENCE BETWEEN TWO GROUPS’
MEANS CAN BE CONSIDERED SIGNIFICANT:
1. How large is the difference between the means of the two groups? Other factors being equal, the
greater the difference between the two means, the greater the likelihood that a statistically significant
mean difference exists. If the means of the two groups are far apart, we can be fairly confident that
there is a real difference between them.
2. How much overlap is there between the groups? This is a function of the variation within the groups.
Other factors being equal, the smaller the variances of the two groups under consideration, the
greater the likelihood that a statistically significant mean difference exists. We can be more confident
that two groups differ when the scores within each group are close together.
3. How many subjects are in the two samples? The size of the sample is extremely important in
determining the significance of the difference between means. With increased sample size, means
tend to become more stable representations of group performance. If the difference we find remains
ADVANCED STATISTICS Page 3 of 15
T- test
constant as we collect more and more data, we become more confident that we can trust the
difference we are finding.
4. What alpha level is being used to test the mean difference (how confident do you want to be about
your statement that there is a mean difference). A larger alpha level requires less difference between
the means. It is much harder to find differences between groups when you are only willing to have
your results occur by chance 1 out of a 100 times (p < .01) as compared to 5 out of 100 times (p <
.05).
5. Is a directional (one-tailed) or non-directional (two-tailed) hypothesis being tested? Other factors
being equal, smaller mean differences result in statistical significance with a directional hypothesis.
For our purposes we will use non-directional (two-tailed) hypotheses.
1. The samples have been randomly drawn from their respective populations
2. The scores in the population are normally distributed
3. The scores in the populations have the same variance (s1=s2)
Note: We use a different calculation for the standard error if they are not.
Pair-difference t test (a.k.a. t-test for dependent groups, correlated t test) df= n (number of
pairs) -1
This is concerned with the difference between the average scores of a single sample of
individuals who are assessed at two different times (such as before treatment and after treatment).
It can also compare average scores of samples of individuals who are paired in some way (such as
siblings, mothers, daughters, persons who are matched in terms of a particular characteristics).
ADVANCED STATISTICS Page 4 of 15
T- test
t test for Independent Samples (with two options)
This is concerned with the difference between the averages of two populations. Basically,
the procedure compares the averages of two samples that were selected independently of each
other, and asks whether those sample averages differ enough to believe that the populations from
which they were selected also have different averages. An example would be comparing math
achievement scores of an experimental group with a control group.
Note: Used when both samples have the same number of subject or when s1=s2
(Levene or F-max tests have p > .05).
Note: Used when the samples have different numbers of subjects and they have
different variances — s1<>s2 (Levene or F-max tests have p < .05).
Type I error — reject a null hypothesis that is really true (with tests of difference this means that you
say there was a difference between the groups when there really was not a difference). The
probability of making a Type I error is the alpha level you choose. If you set your probability (alpha
level) at p < 05, then there is a 5% chance that you will make a Type I error. You can reduce the
chance of making a Type I error by setting a smaller alpha level (p < .01). The problem with this is
that as you lower the chance of making a Type I error, you increase the chance of making a Type II
error.
Type II error — fail to reject a null hypothesis that is false (with tests of differences this means that
you say there was no difference between the groups when there really was one)
HYPOTHESES
Research Question:
Is there a (statistically) significant difference between males and females with respect to math
achievement?
H0: There is no (statistically) significant difference between males and females with respect to math
achievement.
ADVANCED STATISTICS Page 5 of 15
T- test
HA: There is a (statistically) significant difference between males and females with respect to math
achievement.
2. Directional(one-tailed)
Research Question: Do males score significantly higher than females with respect to math
achievement?
H0: Males do not score significantly higher than females with respect to math achievement.
HA: Males score significantly higher than females with respect to math achievement. The basic idea
for calculating a t-test is to find the difference between the means of the two groups and divide it by
the STANDARD ERROR (OF THE DIFFERENCE) — which is the standard deviation of the
distribution of differences. Just for your information: A CONFIDENCE INTERVAL for a two-tailed t-
test is calculated by multiplying the CRITICAL VALUE times the STANDARD ERROR and adding
and subtracting that to and from the difference of the two means. EFFECT SIZE is used to calculate
practical difference. If you have several thousand subjects, it is very easy to find a statistically
significant difference. Whether that difference is practical or meaningful is another questions. This is
where effect size becomes important. With studies involving group differences, effect size is the
difference of the two means divided by the standard deviation of the control group (or the average
standard deviation of both groups if you do not have a control group). Generally, effect size is only
important if you have statistical significance. An effect size of .2 is considered small, .5 is considered
medium, and .8 is considered large.
One sample t test is a statistical procedure that is used to know the mean difference between the
sample and the known value of the population mean. A random sample from a population will be drawn. The
sample mean will be compared with the population mean and make a statistical decision as to whether or
not the sample mean is different from the population. The sample size should be less than 30.
The critical values of t –test were summarized in a table known as Student’s t Distribution Table.
Examples:
1. For a study involving one population and a sample size of 18 (assuming you have a t-distribution), what row
of the t-table will you use to find the right-tail (“greater than”) probability affiliated with the study results?
Answer: df = 17
The study involving one population and a sample size of 18 has n – 1 = 18 – 1 = 17 degrees of freedom.
ADVANCED STATISTICS Page 6 of 15
T- test
2. For a study involving a paired design with a
total of 44 observations, with the results
assuming a t-distribution, what row of the
table will you use to find the probability
affiliated with the study results?
Answer: df = 21
A matched-pairs design with 44 total
observations has 22 pairs. The degrees of
freedom is one less than the number of
pairs: n – 1 = 22 – 1 = 21.
2. Set up the level of significance, calculate the degrees of freedom (df = n – 1) and determione the critical
value of t.
3. Calculate the sample mean and sample standard deviation for one sample t test by usng the formula:
∑𝑥 ∑(𝑥−𝑥̅ )
𝑥̅ = and 𝑠=√
𝑛 𝑛−1
Where: 𝑥̅ = sample mean
s = sample standard deviation
n = number of observations
ADVANCED STATISTICS Page 7 of 15
T- test
4. Calculate the value of the one sample t test, by using the formula:
𝑥̅ −𝜇
𝑡= 𝑠
√𝑛
Where:
t = one sample t-test
𝑥̅ = sample mean
𝜇 = population mean
s = sample standard deviation
n = number of observations in the sample
Example:
One of the undersecretary of the DOLE claims that an average salary of a private school teacher is 18000
pesos. A sample of 19 private school teacher’s salary has a mean of 17350 pesos and a standard deviation
of 1230 pesos. Is there enough evidence to reject the undersecretary’s claim at 𝛼 = 0.01?
Solution:
Given: 𝑥̅ = 17350 𝜇 = 18000 s = 1230 n = 19
Step 6: Conclusion:
Do not reject the null hypothesis at 𝛼 = 0.01, since -2.303 > -.2878
There is enough evidence that the claim of the DOLE undersecretary is TRUE.
Formula:
A. Variances are assumed to be unequal. B. Variances are assumed to be unequal.
(𝑥̅1 − 𝑥̅2 ) − (𝜇1 − 𝜇2 ) (𝑥̅1 − 𝑥̅ 2 ) − (𝜇1 − 𝜇2 )
𝑡= 𝑡=
(𝑠 )2 (𝑠 )2
√ 1 − 2 )2 )2
𝑛 1 𝑛 2 √(𝑛1 − 1)(𝑠1 + (𝑛1 − 1)(𝑠1 √ 1 + 1
𝑛1 + 𝑛2 − 2 𝑛1 𝑛2
Where:
t = t test for two independent samples
𝑥̅1 , 𝑥̅2 = the mean values of the sample group 1 and 2
(𝑠1 ) , (𝑠1 )2 = the variances of the sample group 1 and 2
2
̅ − 𝜇𝐷
𝐷 ∑𝐷 (∑ 𝐷)2
𝑡= ̅=
𝐷 2
𝑠𝐷 𝑛 √∑ 𝐷 − 𝑛
𝑠𝐷 =
√𝑛 𝑛−1
Example:The manangement of a furniture shop designed an incentive plan for sales people. To evaluate
the innovative incentive plan 10 sales people were selected at random, and their weekly incomes before
and after the ioncentive plan were recorded.
Salesperson 1 2 3 4 5 6 7 8 9 10
Before 2000 3000 2500 3100 1900 1750 2300 3210 2340 1870
After 3500 4120 3800 4200 1820 1600 3400 1900 2340 3290
Was there a significant increase in the typical salesperson’s weekly income due to the innovative
incentive plan? Use 0.05 as significance level.
Solution:
Step 1: State the H0 and H1 and identify the claim.
H0: 𝜇1 ≤ 0
H0: 𝜇1 > 𝜇2 (claim)
Step 2: The level of significance is 𝛼 = 0.05 and df = 𝑛 − 1 = 10 – 1 = 9
Step 3: The t critical value is 1.833 (one-tailed test, since it is directional (>) based on Student’s t
Distribution Table. The critical value 1.833 is the intersection of 9(leftmost column) and 0.05(first
row) in the table )
Step 4: Compute the one-sample t-test
Before we can compute for the t value, we need to find the differences.
Salespersons Before(x1) After (x2) D = (𝑥̅1 − 𝑥̅2 ) D2 = (𝑥̅1 − 𝑥̅2 )2
1 2000 3500 1500 2250000
2 3000 4120 1120 1254400
3 2500 3800 1300 1690000
4 3100 4200 1100 1210000
5 1900 1820 -80 6400
6 1750 1600 -150 22500
7 2300 3400 1100 1210
8 3210 1900 -1310 1716100
9 2340 2340 0 0
10 1870 3290 1420 2016400
Sum 6000 11375800
2 (∑ 𝐷)2 (600)2
√∑ 𝐷 − 𝑛 =√ 11375800 − 10 = 929.50
𝑠𝐷 =
𝑛−1 9
Determine the test value.
̅ − 𝜇𝐷
𝐷 600 − 0
𝑡= 𝑠𝐷 = 929.50 = 2.041
√𝑛 √10
Step 5: Decision Rule:
If tcomputed ≥ tcritical, reject Ho
2.041 > 1.833
Step 6: Conclusion:
Reject the null hypothesis at 𝛼 = 0.05, since 2.041 > 1.833
There is enough evidence to support the claim that the income after the insentive plan is greater
than the income before the incentive plan.
Activity:
Run a hypothesis testing using t test on the following problems:
1. A survey of NCR find the average commute time of employees on one way is 30 minutes. The
people of Makati feels that their city is better and wants to publicize it. They randomly select 28
commuters and finds the average is 35 minutes with a standard deviation of 6 minutes.
At 𝛼 = 0.05 are they correct?
2. Given the sample of n1 = 18 from a population with s1 = 13.5, and an independent sample of n2 =
28 from another population with s2 = 11.8, what is the value of the t test statistic for testing
H0: 𝜇1 = 𝜇2 at 𝛼 = 0.01 if ̅̅̅
𝑥1 = 64.2 ̅̅̅
𝑥2 = 69.1.
We had just finished the discussion on the hypothesis testing using the t test.. Let’s move on to the
next higher level of activity/ies or exercise/s that demonstrate your potential skills/knowledge of what you have
learned.
ADVANCED STATISTICS Page 12 of 15
T- test
2. The Mathematical Anxiety Rating Scale (MARS) measures an individual’s level of mathematical
anxiety on a scale from 25(no anxiety) to 100 (highest anxiety). A group of researchers
administered the MARS to 50 students. One of the objectives of the study was to determine if there
is a difference between levels of mathematical anxiety experienced by male and female computer
science students.
Gender 𝑥̅ s n
Male 34.8 10.6 24
Female 47.2 12.4 26
At 𝛼 = 0.05 level of significance, is there enough evidence that there is a significant difference in
the mean of mathematical anxiety experienced by male and female students?
3. The school director wants to determine if the GPA of education students decreases during the last
semester of their junior years. A sample of 10 students were selected. Their GPAs for the first and
second semester of their junior year are:
1st sem 90 88 93 96 86 85 92 84 97 92
2nd Sem 89 90 94 95 90 86 85 82 90 88
VI. GENERALIZATION
Develop a graphic organizer which summarizes the important facts about t test. Place your final output below:
CONGRATULATIONS!
You have come to an end of Module 8.
OOPS! Don’t forget that you have still an assignment to do.
Here it is….
ADVANCED STATISTICS Page 14 of 15
T- test
VII. ASSIGNMENT
2. The economist wants to compare the hourly rates charged by automobile mechanics in two major cities
in Metro Manila. He randomly selects auto repair facilities from both cities and records their hourly rates (in
pesos). The data is as follow:
City of Manila 190 140 130 212 205 168 135 180
Quezon City 179 150 120 156 175 160 180 200
Is there sufficient evidence to indicate a difference in the mean hourly rates from these two cities at
𝛼 = 0.10
3. As an improving employees working habits, eight employees were randomly selected to attend a seminar-
workshop on the importance of work. The table shows the number of workload done per week before and
after the seminar-workshop. At 0.05, did attending the seminar-workshop increases the performance level
of the employees?
Before 10 12 8 7 11 10 13 9
After 9 14 11 12 15 13 12 14
After your long journey of reading and accomplishing the module, let us now
challenge your mind by answering the evaluation part of this module.
ADVANCED STATISTICS Page 15 of 15
T- test
VIII. EVALUATION