EDA 8 T Test
EDA 8 T Test
DATA ANALYSIS
2ND SEMESTER SY 2023-2024
TOPIC 8
TOPIC 8 –
t-Test
STEPS IN HYPOTHESIS TESTING
Since we are
ENGR. ALEX M. BALUBAL, MEE, CSEE
ultimately
concerned with the ഥ 𝑑 − 𝝁𝑑
𝑿
difference between
Paired
n–1 𝒕 =
t-Test
two measures in 𝑆𝑑
one sample, the ൘
paired t-test 𝒏
reduces to the one
sample t-test.
TOPIC 8 –
EXAMPLE OF ONE-SAMPLE MEAN t-TEST
t-Test
Sol’n1:
1. Formulate the Null Hypothesis and
Alternative Hypothesis
• Ha: The mean compressive strength of the
ഥ > 𝟒𝟎 𝐌𝐏𝐚.
concrete exceeds 40 MPa, 𝐗
• Ho: The mean compressive strength of the
concrete mixture does not exceed 40 Mpa,
ഥ ≤ 𝟒𝟎 𝐌𝐏𝐚.
𝐗
2. Set the Level of Significance (α)
ENGR. ALEX M. BALUBAL, MEE, CSEE
• α = 0.01
3. Determine the Appropriate Test Statistic to
be Used
• t-test for one sample mean is to be used.
TOPIC 8 –
EXAMPLE OF ONE-SAMPLE MEAN t-TEST
t-Test
16 0 0.6901 0.8647 1.0711 1.3368 1.7459 2.1199 2.5835 2.9208 3.6862 4.0150
Excel Formula
17 0 0.6892 0.8633 1.0690 1.3334 1.7396 2.1098 2.5669 2.8982 3.6458 3.9651
18 0 0.6884 0.8620 1.0672 1.3304 1.7341 2.1009 2.5524 2.8784 3.6105 3.9216 = -T.INV(0.01,19)
19 0 0.6876 0.8610 1.0655 1.3277 1.7291 2.0930 2.5395 2.8609 3.5794 3.8834 2.539483
20 0 0.6870 0.8600 1.0640 1.3253 1.7247 2.0860 2.5280 2.8453 3.5518 3.8495
21 0 0.6864 0.8591 1.0627 1.3232 1.7207 2.0796 2.5176 2.8314 3.5272 3.8193
22 0 0.6858 0.8583 1.0614 1.3212 1.7171 2.0739 2.5083 2.8188 3.5050 3.7921
23 0 0.6853 0.8575 1.0603 1.3195 1.7139 2.0687 2.4999 2.8073 3.4850 3.7676
24 0 0.6848 0.8569 1.0593 1.3178 1.7109 2.0639 2.4922 2.7969 3.4668 3.7454
ENGR. ALEX M. BALUBAL, MEE, CSEE 25 0 0.6844 0.8562 1.0584 1.3163 1.7081 2.0595 2.4851 2.7874 3.4502 3.7251
26 0 0.6840 0.8557 1.0575 1.3150 1.7056 2.0555 2.4786 2.7787 3.4350 3.7066
27 0 0.6837 0.8551 1.0567 1.3137 1.7033 2.0518 2.4727 2.7707 3.4210 3.6896
28 0 0.6834 0.8546 1.0560 1.3125 1.7011 2.0484 2.4671 2.7633 3.4082 3.6739
29 0 0.6830 0.8542 1.0553 1.3114 1.6991 2.0452 2.4620 2.7564 3.3962 3.6594
30 0 0.6828 0.8538 1.0547 1.3104 1.6973 2.0423 2.4573 2.7500 3.3852 3.6460
40 0 0.6807 0.8507 1.0500 1.3031 1.6839 2.0211 2.4233 2.7045 3.3069 3.5510
60 0 0.6786 0.8477 1.0455 1.2958 1.6706 2.0003 2.3901 2.6603 3.2317 3.4602
80 0 0.6776 0.8461 1.0432 1.2922 1.6641 1.9901 2.3739 2.6387 3.1953 3.4163
100 0 0.6770 0.8452 1.0418 1.2901 1.6602 1.9840 2.3642 2.6259 3.1737 3.3905
1000 0 0.6747 0.8420 1.0370 1.2824 1.6464 1.9623 2.3301 2.5808 3.0984 3.3003
10000 0 0.6745 0.8417 1.0365 1.2816 1.6450 1.9602 2.3267 2.5763 3.0910 3.2915
Confidence Level 50% 60% 70% 80% 90% 95% 98% 99% 99.8% 99.9%
TOPIC 8 –
EXAMPLE OF ONE-SAMPLE MEAN t-TEST
t-Test
Prob2.
A civil engineering firm is comparing two different types of
concrete mixtures for their compressive strength. They
collected number of samples from each type of mixture and
perform compressive strength tests. The results are as
follows:
Sample 1 (Type A):
• Sample size = 25
• Sample mean = 38.7 MPa
• Sample standard deviation = 3.243 MPa
Sample 2 (Type B):
• Sample size = 30
ENGR. ALEX M. BALUBAL, MEE, CSEE
• Sample mean = 35.3 MPa
• Sample standard deviation = 2.101 MPa
Conduct a hypothesis test at a significance level of 0.05 to
determine whether there is a significant difference in the
mean compressive strength between the two types of
concrete mixtures.
TOPIC 8 –
EXAMPLE OF TWO-SAMPLE MEAN t-TEST
t-Test
Sol’n2:
1. Formulate the Null Hypothesis and
Alternative Hypothesis
•Ha: There is a significant difference in the mean
compressive strengths between the two types
of concrete mixtures, 𝑿ഥ1≠𝑿 ഥ 2.
•Ho: There is no significant difference in the
mean compressive strengths between the two
types of concrete mixtures, 𝑿 ഥ1=𝑿 ഥ 2.
ENGR. ALEX M. BALUBAL, MEE, CSEE
2. Set the Level of Significance (α)
• α = 0.05
3. Determine the Appropriate Test Statistic to
be Used
• t-test for two sample means is to be used.
TOPIC 8 –
EXAMPLE OF TWO-SAMPLE MEAN t-TEST
t-Test
𝑛1 −1 𝑆1 2 + 𝑛2 −1 𝑆2 2
• 𝑺𝒑 =
𝑛1 + 𝑛2 −2
ഥ −𝑿
𝑿 ഥ 3𝟖.𝟕−3𝟓.𝟑
• 𝒕 = 1
1
2
1
= = 𝟒. 𝟔𝟖𝟔
ENGR. ALEX M. BALUBAL, MEE, CSEE 1 1
𝑺𝒑
+
𝑛1 𝑛2 2 6𝟕𝟗
+
. 2𝟓 3𝟎
16 0 0.6901 0.8647 1.0711 1.3368 1.7459 2.1199 2.5835 2.9208 3.6862 4.0150
17 0 0.6892 0.8633 1.0690 1.3334 1.7396 2.1098 2.5669 2.8982 3.6458 3.9651
18 0 0.6884 0.8620 1.0672 1.3304 1.7341 2.1009 2.5524 2.8784 3.6105 3.9216
19 0 0.6876 0.8610 1.0655 1.3277 1.7291 2.0930 2.5395 2.8609 3.5794 3.8834
20 0 0.6870 0.8600 1.0640 1.3253 1.7247 2.0860 2.5280 2.8453 3.5518 3.8495
21 0 0.6864 0.8591 1.0627 1.3232 1.7207 2.0796 2.5176 2.8314 3.5272 3.8193
22 0 0.6858 0.8583 1.0614 1.3212 1.7171 2.0739 2.5083 2.8188 3.5050 3.7921
23 0 0.6853 0.8575 1.0603 1.3195 1.7139 2.0687 2.4999 2.8073 3.4850 3.7676
24 0 0.6848 0.8569 1.0593 1.3178 1.7109 2.0639 2.4922 2.7969 3.4668 3.7454
ENGR. ALEX M. BALUBAL, MEE, CSEE 25 0 0.6844 0.8562 1.0584 1.3163 1.7081 2.0595 2.4851 2.7874 3.4502 3.7251
26 0 0.6840 0.8557 1.0575 1.3150 1.7056 2.0555 2.4786 2.7787 3.4350 3.7066
27 0 0.6837 0.8551 1.0567 1.3137 1.7033 2.0518 2.4727 2.7707 3.4210 3.6896
28 0 0.6834 0.8546 1.0560 1.3125 1.7011 2.0484 2.4671 2.7633 3.4082 3.6739
29 0 0.6830 0.8542 1.0553 1.3114 1.6991 2.0452 2.4620 2.7564 3.3962 3.6594 Excel Formula
30 0 0.6828 0.8538 1.0547 1.3104 1.6973 2.0423 2.4573 2.7500 3.3852 3.6460
=T.INV.2T(0.05,53)
40 0 0.6807 0.8507 1.0500 1.3031 1.6839 2.0211 2.4233 2.7045 3.3069 3.5510
60 0 0.6786 0.8477 1.0455 1.2958 1.6706 2.0003 2.3901 2.6603 3.2317 3.4602 2.005746
80 0 0.6776 0.8461 1.0432 1.2922 1.6641 1.9901 2.3739 2.6387 3.1953 3.4163
100 0 0.6770 0.8452 1.0418 1.2901 1.6602 1.9840 2.3642 2.6259 3.1737 3.3905
1000 0 0.6747 0.8420 1.0370 1.2824 1.6464 1.9623 2.3301 2.5808 3.0984 3.3003
10000 0 0.6745 0.8417 1.0365 1.2816 1.6450 1.9602 2.3267 2.5763 3.0910 3.2915
Confidence Level 50% 60% 70% 80% 90% 95% 98% 99% 99.8% 99.9%
TOPIC 8 –
EXAMPLE OF TWO-SAMPLE MEAN t-TEST
t-Test
6. Interpret Results
• There is a significant difference in the mean
compressive strengths between the two
types of concrete mixtures.
ENGR. ALEX M. BALUBAL, MEE, CSEE • The mean compressive strength of Type A
mixture is significantly higher than that of
Type B mixture.
TOPIC 8 –
EXAMPLE OF PAIRED t-TEST
t-Test
improvement in students’ 14
15
19
18
26
18
16 20 24
Sol’n3:
1. Formulate the Null Hypothesis and
Alternative Hypothesis
•Ha: There is a significant difference between the test
scores before and after, 𝑿ഥ1≠𝑿 ഥ 2 or 𝑿
ഥ1−𝑿
ഥ2≠0
•Ho: There is no significant difference between the test
scores before and after, 𝑿ഥ1=𝑿 ഥ 2 or 𝑿
ഥ1−𝑿
ഥ2=0
2. Set the Level of Significance (α)
• α = 5% = 0.05
ENGR. ALEX M. BALUBAL, MEE, CSEE
3. Determine the Appropriate Test Statistic to
be Used
• Paired t-test is to be used.
TOPIC 8 –
EXAMPLE OF PAIRED t-TEST
t-Test
16 0 0.6901 0.8647 1.0711 1.3368 1.7459 2.1199 2.5835 2.9208 3.6862 4.0150
17 0 0.6892 0.8633 1.0690 1.3334 1.7396 2.1098 2.5669 2.8982 3.6458 3.9651 Excel Formula
18 0 0.6884 0.8620 1.0672 1.3304 1.7341 2.1009 2.5524 2.8784 3.6105 3.9216 =T.INV.2T(0.05,19)
19 0 0.6876 0.8610 1.0655 1.3277 1.7291 2.0930 2.5395 2.8609 3.5794 3.8834
20 0 0.6870 0.8600 1.0640 1.3253 1.7247 2.0860 2.5280 2.8453 3.5518 3.8495
2.09302405440831
21 0 0.6864 0.8591 1.0627 1.3232 1.7207 2.0796 2.5176 2.8314 3.5272 3.8193
22 0 0.6858 0.8583 1.0614 1.3212 1.7171 2.0739 2.5083 2.8188 3.5050 3.7921
23 0 0.6853 0.8575 1.0603 1.3195 1.7139 2.0687 2.4999 2.8073 3.4850 3.7676
24 0 0.6848 0.8569 1.0593 1.3178 1.7109 2.0639 2.4922 2.7969 3.4668 3.7454
ENGR. ALEX M. BALUBAL, MEE, CSEE
25 0 0.6844 0.8562 1.0584 1.3163 1.7081 2.0595 2.4851 2.7874 3.4502 3.7251
26 0 0.6840 0.8557 1.0575 1.3150 1.7056 2.0555 2.4786 2.7787 3.4350 3.7066
27 0 0.6837 0.8551 1.0567 1.3137 1.7033 2.0518 2.4727 2.7707 3.4210 3.6896
28 0 0.6834 0.8546 1.0560 1.3125 1.7011 2.0484 2.4671 2.7633 3.4082 3.6739
29 0 0.6830 0.8542 1.0553 1.3114 1.6991 2.0452 2.4620 2.7564 3.3962 3.6594
30 0 0.6828 0.8538 1.0547 1.3104 1.6973 2.0423 2.4573 2.7500 3.3852 3.6460
40 0 0.6807 0.8507 1.0500 1.3031 1.6839 2.0211 2.4233 2.7045 3.3069 3.5510
60 0 0.6786 0.8477 1.0455 1.2958 1.6706 2.0003 2.3901 2.6603 3.2317 3.4602
80 0 0.6776 0.8461 1.0432 1.2922 1.6641 1.9901 2.3739 2.6387 3.1953 3.4163
100 0 0.6770 0.8452 1.0418 1.2901 1.6602 1.9840 2.3642 2.6259 3.1737 3.3905
1000 0 0.6747 0.8420 1.0370 1.2824 1.6464 1.9623 2.3301 2.5808 3.0984 3.3003
10000 0 0.6745 0.8417 1.0365 1.2816 1.6450 1.9602 2.3267 2.5763 3.0910 3.2915
Confidence Level 50% 60% 70% 80% 90% 95% 98% 99% 99.8% 99.9%
TOPIC 8 –
EXAMPLE OF PAIRED t-TEST
t-Test
Q&A
See you in the
next topic:
CHI SQUARE
TOPIC 9
Wagner, William (2017). Using IBM SPSS Statistics for Research
Methods and Social Science Statistics, 6th Edition. Sage
Publication, Los Angeles, USA.
REFERENCES