Professional Documents
Culture Documents
Hypothesis Testing
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.
𝜇𝑏𝑒𝑓𝑜𝑟𝑒 = 𝜇𝑎𝑓𝑡𝑒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.
d=2, sd=2.749
tc=2-02.74910=2.30
t(α,n-1)=t(0.05,10-1) =t0.05,9=1.833
Mr. Jerome L. Buhay
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
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?
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
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:
Given:
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
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?
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”.
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