CEA_ECE069_SAS-16-2
CEA_ECE069_SAS-16-2
1) Introduction (2 mins)
⮚ A t-test is a statistical test used to determine if there is a significant difference between the means of
two groups.
B. MAIN LESSON
⮚ t -Test Assumptions
● The sample is collected from a representative of randomly selected portion of the total population.
● The data is normally distributed.
● Population means is known.
Types of t – test
⮚ One Sample t – test. This test the mean of a single group against a known population.
⮚ Independent Sample t – test. This test compares the mean for two groups of sample.
⮚ A Paired Sample t – test. This test compares the means of the same group at different times.
⮚ The One Sample t - Test is commonly used to test the statistical difference between a sample mean
and a known or hypothesized value of the mean in the population.
⮚ t-statistic.
where x = sample mean
x
t s = sample standard deviation
s µ = population mean
n n = sample size
Example. Test the hypothesis at α = 0.05 that taking a vitamin capsule makes an individual smarter. Average
IQ of an individual is 100. To test the hypothesis 12 engineering students take a the same vitamin capsule
for one year and then an IQ test was given to these students. The results are 116, 111, 101, 120, 99, 94,
106, 115, 107, 101, 110, and 92.
Further using the p - approach, at t = 2.35 and at degrees of freedom = 11, the p value is between
1% and 2.5%, hence lesser than the level of significance, α = 0.05 ( or 5 % ), so we reject the
null hypothesis.
⮚ This test compares the mean for two groups of sample that are independently selected from each
other.
⮚ There are two types of independent sample t - test.
● Equal Variance ( Pooled variance t – test) with degrees of freedom, df = n1 + n2 – 2.
● Unequal Variance (Separate variance t – test) with degrees of freedom,
𝑠2 𝑠2
( 1 + 2 )2
𝑛1 𝑛2
𝐷𝑒𝑔𝑟𝑒𝑒𝑠 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚 = 2
𝑠 𝑠2
( 1 )2 ( 2 )2
𝑛1 𝑛2
𝑛1 − 1 + 𝑛2 − 1
⮚ The t - statistic
where :
( x1 x 2 ) Do
t x1 and x2 = mean of sample 1 and sample 2
(n1 1) s1 (n2 1) s2 1 1
2 2
s1 and s2 = variance of sample 1 and sample 2
n1 and n2 = size of sample 1 and sample 2
n1 n2 2 n1 n2 Do = - (a number that is deduced
from the statement of the situation).
Example. An experiment was performed to compare the abrasive wear of two materials. Ten pieces of
material 1 ( group 1) and ten pieces of material 2 (group 2) were tested. The test on material 1 gave an
average wear of 85 units with a sample standard deviation of 4, and the test on material 2 gave an average
wear of 81 with a sample standard deviation of 5. Can we conclude at 0.05 level of significance that abrasive
wear of material 1 is greater than that of material 2 ? Assume the populations are normally distributed and
with equal variances.
Step 4. The calculated or the observed value of the t – statistic (1.96 ) is greater than the critical value of
the t- statistic (at α = 0.05 and degrees of freedom = 18, 1.34), or we may say that the observed value
of the t – statistic is at the rejection region. Hence, we reject the null hypothesis in favor of the
alternative hypothesis. This suggests that the abrasive wear of material 1 is greater than the
abrasive wear of material 2.
Further, at t = 1.96 and at degrees of freedom = 18, the p value is between 5% and 2.5%, hence
lesser than the level of significance, α = 0.05 ( or 5 % ), so we reject the null hypothesis.
Example. Assume that we are taking a diagonal measurement of bill boards purchased by a company.
Group 1 of samples includes 20 bill boards, while group 2 includes 10 billboards.
Statistical Data : Group 1 : mean diagonal measurement = 21.6 inches ; variance = 17.1
Group 2 : mean diagonal measurement = 19.4 inches ; variance = 1.4
Can we conclude that the mean of group 1 is greater than group 2.
Step 1. State the Null Hypothesis and the Alternative Hypothesis
Null Hypothesis : Ho : µ1 = µ2
Alternative Hypothesis : H1 : µ1 > µ2 ( One tail test )
Step 2. At level of significance, α = 0.05, and
2
s12 s2 2
2
17.1 1.4
Degrees of freedom = n1 n2
20 10
24
2 2 2 2 2 2
s1 s2 17.1 1 .4
n n 20 10
1 2
n1 1 n2 1 20 1 10 1
Further using the p approach, at t = 2.194 and at degrees of freedom = 24, the p value is between
2.5% and 1.0%, hence lesser than the level of significance, α = 0.05 ( or 5 % ), so we reject the
null hypothesis.
Paired t - Test
⮚ A paired t-test is used when we are interested in the difference between two variables for the
same subject. Often the two variables are separated by time or something other than time.
⮚ Compares the means of two related groups of samples.
⮚ The t –statistic with degrees of freedom df = n-1
t
D
n D 2 D
2
Compare the fuel economy of the two cars , where the cars in each pair is operated using different
types of gasoline ( Type 1 gasoline & Type 2 gasoline)
t
D
1.3
2.6
nD D 9 (0.41) (1.3) 2
2 2
n 1 9 1
Step 4. The calculated or the observed value of the t – statistic (2.6 ) is greater than the critical value of the
t- statistic (at α = 0.05 and degrees of freedom = 8, 1.86), or we may say that the observed value of
the t – statistic is at the rejection region. Hence, we reject the null hypothesis in favor of the
alternative hypothesis. This suggests that the Type 1 gasoline is more economical fuel than the
Type 2 gasoline.
Further ( using the p-value approach), at t = 2.6 and at degrees of freedom = 8, the p value is
between 2.5% and 1.0%, hence lesser than the level of significance, α = 0.05 ( or 5 % ), so we
reject the null hypothesis.
2. Activity 3: Skill-building Activities (with answer key) (18 mins + 2 mins checking) .
The table gave the observations of the control group and the treatment group. Use paired t-test to at 0.05
level of significance to determine if there is a significant difference between the mean of the two groups.
Sample Control Treatment
No. Group Group
1 3 20
2 3 13
3 3 13
4 12 20
5 15 29
6 16 32
7 17 23
8 19 20
9 23 25
10 24 15
11 32 30
Answer Sheet:
2. In testing the differences between the means of two independent populations, the null hypothesis
is . . .
a. H o : 1 2 1 b. H o : 1 2 0 c. H o : 1 2 0 d. H o : 1 2 1
4. A one sample t – test was conducted to test the IQ of engineering students. The observe
t – statistic in the study with 15 samples at 0.05 level of significance is 2.0. What is the p – value
of this study?
a. within a value of 0.05 and 0.025.
b. greater than 0.05.
c less than 0.025.
d. none of the above
5. Two different alloys are being considered for making lead-free solder used in the wave soldering
process for printed circuit boards. A crucial characteristic of solder is its melting point, which is
known to follow a Normal distribution. A study was conducted using a random sample of 21 pieces
of solder made from each of the two alloys. In each sample, the temperature at which each of the
21 pieces melted was determined. The mean and standard deviation of the sample for Alloy 1 were
x1 = 218.9ºC and s1 = 2.7ºC; for Alloy 2 the results were x2 = 215.5ºC and s2 = 3.6ºC. If we were
to test H0: µ1 = µ2 against Ha: µ1 ≠ µ2. In this study what is the degrees of freedom equal to?
a. 21 b. 20 c. 40 d. 42
C. LESSON WRAP-UP
1) Activity 6: Thinking about Learning (5 mins)
You are done with the session! Let's track your progress.
Period 1 Period 2 Period 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
⮚ The t test is the commonly used statistical test to test the means of two groups of sample.
⮚ You can also use the data menu of Microsoft excel to find the critical value of t and the observe
value of t.
⮚ Let us use Microsoft excel to find the critical value of t and the observed t for the data in activity 3
above.
The table gave the observations of the control group and the treatment group. Use paired t-test to
at 0.05 level of significance to determine the significance of the mean of the two groups.
Sample Control Treatmen
No. Group t Group
1 3 20
2 3 13
3 3 13
4 12 20
5 15 29
6 16 32
7 17 23
8 19 20
9 23 25
10 24 15
11 32 30
Steps:
● Enter the control group and the treatment group columns in excel.
● Click Data, then Data Analysis , the t-test: Paired Two Sample for Means, then press OK.
● Input Variable 1 Range, then Variable 2 Range, enter Alpha, click New Worksheet Ply, then OK.
KEY TO CORRECTION
Activity #3
Follow the steps in hypothesis testing.
t
D
73
2.73
n D 2 D 11 (1,131) ( 73) 2
2
n 1 11 1
Control Treatment
Sample Group Group D
No.
1 3 20 -17 289
2 3 13 -10 100
3 3 13 -10 100
4 12 20 -8 64
5 15 29 -14 196
6 16 32 -16 256
7 17 23 -6 36
8 19 20 -1 1
9 23 25 -2 4
10 24 15 9 81
11 32 30 2 4
Step 4. The calculated or the observed value of the t – statistic (- 2.73 or 2.73 since two tailed test is
conducted) is greater than the critical value of the t- statistic (at α = 0.05 and degrees of freedom =
10, 2.228), or we may say that the observed value of the t – statistic is at the rejection region.
Hence, we reject the null hypothesis in favor of the alternative hypothesis. This suggests that the
control group and the treatment group do not have equal mean.
Further (using the p-value approach), at t = 2.73 and at degrees of freedom = 10, the p value is
between 2.5% and 1.0%, hence lesser than the level of significance, α = 0.05 (or 5 %), so we reject
the null hypothesis.