Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 36

Module 4 | Hypothesis Testing

Module 4

TESTING
HYPOTHESIS
4.4. HYPOTHESIS TESTING FOR THE MEANS OF TWO POPULATION
The figure below can be used as guide in testing the means of two populations.
 

Figure 1. Guide in testing the means of two populations


 
In testing the means of two populations, one can decide whether to use dependent or independent samples.
Dependent samples should be used if there is only one set of respondents but will undergo two different measurements,
usually done before and after an intervention. The mean values will be tested between the two measurements. On the
other hand, independent samples should be used if there are two sets of respondents to be tested. Next step is to decide
whether large or small samples. If n is at least 30 then considered large, otherwise, small samples. If small samples, it
should also be considered whether to use equal or unequal variances. The difference between the equal and unequal
variances is not explicitly define in vast readings and literature. The conservative choice is unequal variances, meaning
that the data sets are not pooled. However, if one suspects that the variances are equal, then equal variances are assumed.
Either way, there is only a slight difference in the result.
FORMULA FOR TEST IN THE MEANS OF TWO POPULATIONS
4.4.1 Dependent T-test
 Also called the paired t-test
 It intends to test whether there is a significant difference between the means from the same group.
 Mostly used in comparing pre-test and post-test results
 It is used to test the null hypothesis:

𝜇𝑏𝑒𝑓𝑜𝑟𝑒 = 𝜇𝑎𝑓𝑡𝑒r
EXAMPLES
Example 1. A study was conducted to investigate some effects of physical training. At 0.05 level of significance, test the claim
that the mean pre-training weight equals the mean post-training weight. The weights are in kilograms. What do you conclude
about the effect of training weight?

Pre-training weight:
99 57 62 69 74 77 59 92 70 85
Post-training weight:
94 57 62 69 66 76 58 88 70 84
Solution:
a. Null hypothesis: The training is not effective, that is the mean of pre-training weight is equal to the mean of post-training
weight.
Alternative hypothesis: The training is effective, that is the mean of pre-training weight is greater the mean of post-training
weight.

b. Test Statistic: t-test for dependent samples


c. Decision rule: Reject the null hypothesis if t-computed > t-critical value, otherwise fail to reject the null. Or, reject the null
hypothesis if p-value < 0.05.
e. Computation:
Get the differences of each sample data:

Pre-training Post-training Differences (


weight weight
99 94 5
57 57 0
62 62 0
69 69 0
74 66 8
77 76 1
59 58 1
92 88 4
70 70 0
85 84 1

Compute for mean differences and standard deviation:

d=2, sd=2.749

Using the formula:


Where:

tc=2-02.74910=2.30
t(α,n-1)=t(0.05,10-1) =t0.05,9=1.833
Mr. Jerome L. Buhay

BY USING EXCEL, FOLLOW THE STEPS BELOW:


• Encode the data in excel as illustrated:

MODULE 4
Hypothesis Testing
• In the data tab, select data analysis: Mr. Jerome L. Buhay

MODULE 4
Hypothesis Testing

• In the data analysis, select “t-test paired sample for means”, then click “ok”.
Mr. Jerome L. Buhay

• In the dialog box, highlight the data for pre-training weight for “variable 1 range”, then
highlight the post-training weight data for “variable 2 range” ,check the “labels”, select the
location where you want to display the output. In this case, cell D1 was selected. The new
worksheet can also be selected, and the result will display in the new worksheet in excel.
Them click “ok”.

MODULE 4
Hypothesis Testing
Mr. Jerome L. Buhay

• The result will display as follows:

MODULE 4
Hypothesis Testing
f. Decision/Conclusion: Since the t-statistic value (2.19) is greater than the tabulated (one-tail: 1.86), the
null hypothesis was rejected. Also, the probability value for one-tail (p-value:0.03) is less than 0.05.
Thus, there is a significant difference between pre-training weight and post-training weight. The mean
for pre-training weight is 73.22, is significantly greater than 71.11 for post-training weight. This implies
that the training is effective.
4.4.2. Z-test for independent samples
 The samples from each population must be independent of one another.
 The populations from which the samples are taken must be normally distributed and the population variances are
known,
 the sample sizes must be large i.e. n1≥30 and n2≥30.

Example 2: Two methods of teaching statistics are being tried by a professor. A class of 40 students is taught by the
method A and a class of 36 is taught by method B. The two classes are given the same final examination. The mean scores
are 78 and 74, respectively. Using a 0.05 significance level, can we conclude that the average final examination scores
produced by the two methods are different if the population standard for each is 5?

Given: Method Sample Size Mean Standard


Deviation

A 40 78 5
B 36 74 5
Solution:
a. Null hypothesis: The average final examination scores produced by the two methods are the same.
Alternative hypothesis: The average final examination scores produced by the two methods are different.
b.
c. Test Statistic: z-test
d. Decision rule: Reject the null hypothesis if z-computed >z-critical value, otherwise fail to reject the null.
Or, reject the null hypothesis if p-value < 0.05.
e. Computation:
Using the formula:

where

For the critical value:


f. Decision/Conclusion: Since the z-computed (3.48) is greater than the critical value (1.96),
then the null hypothesis was rejected. Thus, there is a significant difference in the average
final examination scores produced by the two methods of teaching Statistics. Looking at the
mean values, method A produced higher average final exam score as compared to method B.
4.4.3 T-test for independent samples Also called the two-sample t-test for independent samples

 It intends to test whether there is a significant difference between the means of two unrelated groups
 The populations from which the samples are taken must be normally distributed and the population variances are known,
 It is used to test the null hypothesis: 𝜇 1 = 𝜇 2
4.4.3.1 Assuming equal variances ()

Example 3. In a study of abstract reasoning, a sample group of male and female students scored as shown below.
Assuming that the samples are random, would further testing of similar groups of male and female students give virtually
the same result?

Given:

Sex Sample size Mean Standard Deviation


Male 95 29.21 11.56
Female 83 30.92 7.81
Solution:
a. Null hypothesis: Further testing of similar groups of male and female students will give the same result.
Alternative hypothesis: Further testing of similar groups of male and female students will give different result.
b.
c. Test Statistic: t-test assuming equal variances
d. Decision rule: Reject the null hypothesis if t-computed >t-critical value, otherwise fail to reject the null. Or, reject the null hypothesis if p-value <
0.05.
e. Computation:
Using the formula:
Compute first the pooled variance since the variances are assumed to be equal.
f. Decision/Conclusion: Since 1.14 < 1.96, the null hypothesis cannot be rejected. Thus, further
testing of similar groups of male and female students will give the same result.
4.4.3.2 Assuming Unequal variances ()
Example 4. The Gleanson Supermarket’s manager experiments with two methods of checking out customers. One
method requires that the cashier manually key each price into ther register, and the other method uses a scanner that
automatically registers prices. The time in minutes are given below for sample of goods checked out. At 0.02 level,
test the claim that the two methods have the same mean.

Given:

Methods Sample size Mean Variance


Manual 16 157.6 225
Scanning 10 112.4 56

Solution:
a. Null hypothesis: The two methods of checking out goods has the same means.
Alternative hypothesis: The two methods of checking out goods has different means.
b.
c. Test Statistic: t-test assuming unequal variances
d. Decision rule: Reject the null hypothesis if t-computed >t-critical value, otherwise fail to reject the null. Or,
reject the null hypothesis if p-value < 0.05.
e. Computation:
Using the formula:

=10.19

The critical value:

f. Decision/Conclusion: Since 10.19>2.821, the null hypothesis was rejected. Thus, there is a significant difference in the
average time of checking out goods between the two methods. The mean values show that manual method takes longer time
as compared to scanning.
Example 5. Two production lines are making thermostats to be used in toaster ovens. Samples are selected from each
production line, the thermostats are set at 350°, and then the actual temperature in the toaster oven is measured. The results of
the sampling are given below. At 0.05 level of significance, can it be concluded that the two production lines differ in terms
of temperature?

X 347.2 351.6 352.4 346.1 348.9 356.6 354.9 350.2    

Y 326.4 338.9 355.4 351.6 350.2 356.9 352.4 349.6 351.2 344.2

Solution:
a. Null hypothesis: The two production lines have the same temperature.
b. Alternative hypothesis: The two production lines differ in temperature.
c.
d. Test Statistic: t-test assuming equal variances
e. Decision rule: Reject the null hypothesis if t-computed >t-critical value, otherwise fail to reject the null. Or, reject the null
hypothesis if p-value < 0.05.
e. Computation:
Using excel: Follow the steps in example 1.
•In the data analysis dialogue box, select “t-test assuming equal variances” then click “ok”.

•The result will display as follows:


Mr. Jerome L. Buhay

M O D U L E 4 H y p o t h e s i s Te s t i n g

PRACTICE EXERCISE
Practice Exercise 4.4
Do a complete hypothesis testing in the following problems:

1. A classroom teacher wishes to compare the performance of students in statistics using two methods of teaching.  Two independent samples of
size 16 were randomly selected. The following data have been obtained. Is there a significant difference between the performance of students in
the two methods of teaching statistics? Use 0.05 level of significance.

Method A 82 81 86 75 77 83 85 77
Method B 76 90 89 87 84 79 88 78

2. Over a long period of time, ten patients are selected at random and each is given two different treatments for arthritis. Test the hypothesis that
the two treatments have the same effect in treating arthritis. The results of standard tests are as follows:

Patient 1 2 3 4 5 6 7 8 9 10
Treatment1 47 38 50 33 47 23 40 42 15 36
Treatment2 52 35 52 35 46 27 45 41 17 41
3. The following data have been gathered by an industrial engineer who is comparing the time (in seconds) taken by an operator
to complete a task using two different methods. Test an appropriate hypothesis and decide which method is best.

Operator 1 2 3 4 5 6 7 8 9 10
Method A 45 88 40 32 29 34 59 55 62 50
Method B 39 71 42 27 28 30 50 60 51 48

4. Two new methods of producing automobile tires have been proposed. The manufacturer believes that there will be no
appreciable difference in the lifetimes of the tires produced by these two methods. The data show the lifetimes of the tires in unit
of 1000 miles. Are the methods equivalent?

Method
1 66.4 61.6 60.5 59.1 63.6 61.4 62.5 64.4 60.7
Method
2 58.2 60.4 55.2 62 57.3 58.7 56.1    
SUPPLEMENTAL VIDEO IN t-test
Two sample t-test in excel

https://youtu.be/_WNUfgZipww
ANSWERS TO PRACTICE EXERCISE 4.4
1. Solution:
a. Null hypothesis: There is no significant difference in the performance of students between the two methods of teaching Statistics.
Alternative hypothesis: There is a significant difference in the performance of students between the two methods of teaching Statistics.
b.
c. Test Statistic: t-test assuming equal variances
d. Decision rule: Reject the null hypothesis if t-computed >t-critical value, otherwise fail to reject the null. Or, reject the null hypothesis if p-value
< 0.05.
e. Computation:
f. Decision/Conclusion: Since the t-statistic (-1.298) is less than t-critical for two-tail (2.145), the null hypothesis cannot be
rejected. Also, the p-value for two-tail (0.215) is greater than 0.05. Thus, there is no significant difference in the performance of
students between the two methods of teaching Statistics.
ANSWERS TO PRACTICE EXERCISE 4.4
2. Solution:
a. Null hypothesis: The two treatments have the same effect in treating arthritis.
Alternative hypothesis: The two treatments have different effect in treating arthritis.
b.
c. Test Statistic: t-test for dependent samples
d. Decision rule: Reject the null hypothesis if t-computed >t-critical value, otherwise fail to reject the null. Or, reject the null
hypothesis if p-value < 0.05.
e. Computation:
f. Decision/Conclusion: Since the t-statistic (-2.21) is less than t-critical for two-tail (2.26), the null hypothesis cannot be
rejected. Also, the p-value for two-tail (0.054) is greater than 0.05. Thus, the two treatments have the same effect in
treating arthritis.
ANSWERS TO PRACTICE EXERCISE 4.4
3. Solution:
a. Null hypothesis: The two methods have the same time to complete a task.
Alternative hypothesis: The two methods have different time to complete a task.
b.
c. Test Statistic: t-test for dependent samples
d. Decision rule: Reject the null hypothesis if t-computed >t-critical value, otherwise fail to reject the null. Or, reject the null
hypothesis if p-value < 0.05.
e. Computation:
f. Decision/Conclusion: Since the t-statistic (2.36) is greater than t-critical for two-tail (2.26), the null hypothesis was
rejected. Also, the p-value for two-tail (0.04) is less than 0.05. Thus, the two methods have different time to complete a
task.
ANSWERS TO PRACTICE EXERCISE 4.4
4. Solution:
a. Null hypothesis: The two methods produced the same lifetime of tires.
Alternative hypothesis: The two methods produced different lifetime of tires.
b.
c. Test Statistic: t-test assuming equal variances.
d. Decision rule: Reject the null hypothesis if t-computed >t-critical value, otherwise fail to reject the null. Or, reject the null
hypothesis if p-value < 0.05.
e. Computation:
f. Decision/Conclusion: Since the t-statistic (3.43) is greater than t-critical for two-tail (2.14), the null hypothesis was rejected.
Also, the p-value for two-tail (0.004) is less than 0.05. Thus, the two methods produced different lifetime of tires.
 
 

References:
Anderson DR, Sweeney DJ. 2018. Statistics for Business and Economics. Boston: MA: Cengage Learning.
Anderson DR, Sweeney DJ. 2016. Essentials of Modern Business Statistics with Microsoft Excel. Boston:
MA: Cengage Learning.
Anderson DR, Stamford CT, Sweeney DJ, Williams TA. 2015. Modern Business Statistics with Microsoft
Office Excel. Cengage Learning.
Reyes, C. and Saren, L. ELEMENTARY STATISTICS TEXT/WORKBOOK. National Bookstore,
Mandaluyong City
Walpole, R. PROBABILITY AND STATISTICS. NY: Macmillan Publishing Co. Inc
 

You might also like