CHAPTER 10: HYPOTHESIS TESTING READING ASSIGNMENT Chapter 10 Statistical Techniques in Business and Economics. Lind, Marchal and Wathen 14th Edition, McGraw Hill 1.
Introduction What is “Hypothesis Testing?”
Basic idea is to deal with “believability” To judge if the “observed difference” between a value of the sample statistic and the hypothesized value of the population parameter is statistically significant.
Observed difference may be due to Chance or Existence of substantial difference. 1.1
Composing Hypothesis Begin ‘hypothesis testing’ by making a tentative assumption about a population parameter the null hypothesis Ho . If the observed sample data indicate that the tentative assumption is false, something else MUST be true. the alternative hypothesis HA. Null (H0)
the tentative assumption being studied
Alternative (HA)
the opposite of null
H0 and HA are competing statements. Only one would be supported by the observed sample data. Hypothesis Formats A hypothesis test about a population parameter must take on one of the following formats:
vs. H : 0 A
H0: 0 vs . H : 0 A
H0: 0 vs . H : 0 A
2-tailed
left-tailed
right-tailed
H 0 : 0
-
Note 0 represents the hypothesized value of the parameter.
-
the equal sign “=” appears in the null hypothesis (H0).
Last update: 09/10/2015
Page 1
of 12
Hypothesis Testing
Example 1 A battery manufacturer wants to produce batteries with mean life of 500 hours. If the life is shorter, he will lose customers; if the life is longer, production cost will be high. A sample of bulbs is taken to see if the mean life meets the requirement of 500 hours. Compose H0 and HA.
Example 2 A sales manager asks his salesperson to keep their daily travelling expenses within $100. A sample of daily expenses was taken to see if the expense limit was kept. Compose null and alternative hypothesis.
Example 3 The manager of a local branch of a commercial bank believes that over the past few years the bank has been catering to a different clientele and that the average amount withdrawn from its ATMs is less than $500. Compose the hypotheses.
Last update: 09/10/2015
Page 2
of 12
Hypothesis Testing
1.2
Uncertainty - Type I and Type II Errors Based on the sample statistic, you will have to make a decision on whether to be in favour of the assumption made in the null hypothesis or to reject the null hypothesis. No matter which decision is made, you should be prepared that you may have made a wrong decision. The wrong decision will result in errors in your decision. There are two possible errors related to the decision you made: Actual Situation
In favor of H0
H0 is true
H0 is false
Type II error
Type I error
Conclusion Reject H0
= Probability of Type I error = P(reject H0 | H0 is true) = level of significance = Probability of Type II error = P(in favour of H0 |H0 is false) Relationship between and - There is an inverse relationship between and : High Low ; Low How -
When performing a hypothesis testing, it is necessary to decide before hand whether or is more important.
Choosing between a high or a low , depends on the consequence of the errors. -
Severe consequence to have wrongly rejected H0 : minimize the chance of rejecting H0 . i.e. minimize P(Type I error) prefer a low , therefore will result in high Server consequence to have wrongly concluded H0: - minimize the chance of favouring H0 . i.e. minimize P(Type II error). - prefer a low that is, we will choose a high .
Last update: 09/10/2015
Page 3
of 12
Hypothesis Testing
Example 4 A hypothesis test is performed to test if a bridge will safely withstand at least 50 tons of traffic. (a) Would you rather commit a Type I or a Type II error? (b) Should you use a high or low significance level? Set up the Hypotheses Ho: 50 tons
HA : < 50 tons
Type I error: Rejecting H0 | H0 True Rejecting H0 The bridge cannot withstand at least 50 tons of traffic. Action: _
spend money to reinforce the bridge
Actual situation The bridge can withstand 50 tons of traffic. Consequence Spend money on reinforcing the structure of the bridge when such expenditure is not necessary. Type II error: Conclude H0 |H0 False Favouring H0 The bridge can withstand at least 50 tons of traffic. Action
do nothing to the bridge
Actual situation: The bridge cannot withstand 50 tons of traffic. Consequence Do nothing to the structure of the bridge and it may lead to the collapse of the bridge and you are sued for negligence.
The consequence of Type II is more severed. Thus we will minimize the probability of Type II error. We will determine on a high , low .
Last update: 09/10/2015
Page 4
of 12
Hypothesis Testing
1.3
Decision Rule Decision Rule deals with choosing between the null hypothesis or the alternative hypothesis to make conclusion about the population parameter. There are two approaches: the Critical Region Approach. the p-value Approach Critical Region Approach With this approach, we find a critical value that divides the sampling distribution into a Critical region (Rejection region) and an Acceptance region. If the sample test statistic falls beyond this critical value and therefore falls within the Rejection region, the null hypothesis will be rejected. Critical Value (CV) a value that is in terms of Z or t value(s) it represents a point beyond which, the total area under the sampling distribution is . the critical value is determined by the sampling distribution of the statistic and the level of significance () Sampling Distribution of the statistic - Normal Distribution - t distribution Level of Significance () - The probability that the null hypothesis is rejected when Ho is true. i.e. it represents the Probability of Type I error. - Indicates the size of the rejection region - Indicates the unlikely values of the sample statistic if Ho is true - Determined by the tester Critical Region The area under the sampling distribution for = o that consists all values of the sample statistic with which Ho is rejected. It is the tail area(s) beyond the critical value(s). There could be one or two critical regions depending on the Hypotheses (onetailed or two-tailed). H 0 : 0 vs . H : 0 A
2-tailed
Last update: 09/10/2015
H0 : 0 vs . H : 0 A
left-tailed
Page 5
of 12
H0 : 0 vs .
H : 0 A
right-tailed
Hypothesis Testing
Test Statistics It is an observed difference between a sample statistic value and the hypothesized population parameter value, in terms of standard error. X o Zo X Making a Decision: If the Test statistic falls out of critical region In favour of H0 If the Test statistic falls within critical region Reject H0 . 2
Procedures for Hypothesis Testing Step 1
Compose H0 and HA .
Step 2
Organize basic information, select the level of significance.
Step 3
Select the Test statistic.
Step 4
Formulate the decision rule - Identify type of test (1 or 2-tailed) and . - Determine critical value and critical region.
Step 5
Calculate Test Statistic
Step 6
Decision – “reject” or “in favour of” H0 . Make Conclusion and interpretation.
3
Hypothesis Testing about Population Parameter
3.1
Known or Large Sample Sampling Distribution: approximately a normal distribution. Why: (1) the underlying population is normally distributed with known . OR (2) the central limit theorem applies: n 30. x
X is normal with x = and X Test statistic x ~ N(0, 1)
Last update: 09/10/2015
Page 6
n.
of 12
Hypothesis Testing
Example 5 A hospital uses a certain drug with a mean packaged dose of 100 cm 3 and standard deviation of 3 cm3. A random sample of 36 doses is selected and the mean dosage is 101 cm3. Test if the dosage is too large at = 0.01. Step 1: Compose H0 and HA
Step 2: Organize basic information and select Level of Significance = 0.01 n = 36, = 3 , x = 101 Step 3: Select the Test Statistic Sampling Distribution Step 4: Formulate Decision Rule Find Critical Value and Critical Region ________ -tailed test, = 0.01 Critical Value = ___________
0
Reject / In Favour of Ho if __________________________ Step 5: Calculate Test Statistic x
n
3 36 Z
Test Statistic
0.5 x 101 100 2 x 0 .5
Step 6: Decision and Conclusion Test statistic falls __________________ the critical region. ___________________________ H0 . The data seem to suggest that the dosage ________________________ at a = 0.01 level of significance.
Last update: 09/10/2015
Page 7
of 12
Hypothesis Testing
Example 6 A credit manager at a large electronic store claims that the average balance for the store’s charge account is $575. An auditor selects a random sample of 33 customers and found the average balance is $518.5 and standard deviation is $181. If the manager’s claim is not supported by the data, the auditor would examine all charge accounts. At = 0.05, what action should the auditor take? Step 1: Compose H0 and HA
Step 2: Organize basic information and select Level of Significance x = $518.5, s = $181
n = 33,
Step 3: Select Test Statistic Sampling Distribution 0 Step 4: Formulate Decision Rule Two-tailed test, = 0.05 Critical Value = _ 1.96_ Reject Ho if TS < -1.96 or TS > 1.96 Step 5: Compute Test Statistic sx
s n
181 33
31.51
Z Test Statistic =
x 518.5 575 1.79 sx 31.5
Step 6: Decision and Conclusion Test statistic falls ____________ of the critical region. ___________________________ of H0 . Conclusion The data seem to support / not support the manager’s claim at a = 0.05 level of significance. The auditor has to / does not have to check all charge accounts.
Last update: 09/10/2015
Page 8
of 12
Hypothesis Testing
3.2
Unknown and Small Sample Sampling Distribution: t - distribution Why: (1) the underlying population is normally distributed is symmetric (2) the population standard deviation is unknown and n < 30. X is approximated by t with x = and X Test statistic s x ~ t n 1
ˆ x s x
s n.
Example 7 A new director at a local gym has been told by his predecessor that on average, a member has been in the club for 8.7 years. Examining a random sample of 15 membership files, he finds the mean membership length to be 7.2 years with a standard deviation of 2.5 years. Assume that the length of the membership in this local gym is approximately normal. Does this sample result suggest that the actual average membership length in this gym may be less than 8.7 years at the 0.05 level of significance?
0
Conclusion The data seem to suggest that the mean membership length is _____________________
Last update: 09/10/2015
Page 9
of 12
Hypothesis Testing
_______________________8.7 years at = 0.05.Example 8 A lecturer at NP conducted a test. He gauges that the average score of the test is 90 after he finished marking. To test his hypothesis at a 0.1 significance level, the lecturer reviews 20 test results, and the mean is 84, the standard deviation is 11. What conclusion can he draw?
0
Conclusion The data seem to suggest that the test average is ____________________________ from the lecturer’s guess at = 0.01. FEBRUARY 2011 EXAMINATION QUESTION 5 The mean length of time required to perform a certain job on a factory floor has been established at 20.5 days, with a standard deviation of 5 days. A random sample of 16 employees is taught a new method to perform this job. After the training, the average time these 16 employees take to perform the task is 17.5 days, with a similar standard deviation of 5 days. Assume that the time required to perform the task is normally distributed. (a) Formulate the appropriate null and alternate hypotheses to test whether the new method is faster than the old. (b) Using 0.01 as the level of significance, what is the critical value for the test and the decision rule? (c) Do these results provide sufficient evidence to indicate that the new method is faster than the old? Show your detailed analysis in arriving at your conclusions.
Last update: 09/10/2015
Page 10
of 12
Hypothesis Testing
Standard Normal Distribution 0 Z
Z
.00
.01
.02
.03
.04
.05
.06
.07
.08
.09
0.0
.0000
.0040
.0080
.0120
.0160
.0199
.0239
.0279
.0319
.0359
0.1
.0398
.0438
.0478
.0517
.0557
.0596
.0636
.0675
.0714
.0753
0.2
.0793
.0832
.0871
.0910
.0948
.0987
.1026
.1064
.1103
.1141
0.3
.1179
.1217
.1255
.1293
.1331
.1368
.1406
.1443
.1480
.1517
0.4
.1554
.1591
.1628
.1664
.1700
.1736
.1772
.1808
.1844
.1879
0.5
.1915
.1950
.1985
.2019
.2054
.2088
.2123
.2157
.2190
.2224
0.6
.2257
.2291
.2324
.2357
.2389
.2422
.2454
.2486
.2517
.2549
0.7
.2580
.2611
.2642
.2673
.2704
.2734
.2764
.2794
.2823
.2852
0.8
.2881
.2910
.2939
.2967
.2995
.3023
.3051
.3078
.3106
.3133
0.9
.3159
.3186
.3212
.3238
.3264
.3289
.3315
.3340
.3365
.3389
1.0
.3413
.3438
.3461
.3485
.3508
.3531
.3554
.3577
.3599
.3621
1.1
.3643
.3665
.3686
.3708
.3729
.3749
.3770
.3790
.3810
.3830
1.2
.3849
.3869
.3888
.3907
.3925
.3944
.3962
.3980
.3997
.4015
1.3
.4032
.4049
.4066
.4082
.4099
.4115
.4131
.4147
.4162
.4177
1.4
.4192
.4207
.4222
.4236
.4251
.4265
.4279
.4292
.4306
.4319
1.5
.4332
.4345
.4357
.4370
.4382
.4394
.4406
.4418
.4429
.4441
1.6
.4452
.4463
.4474
.4484
.4495
.4505
.4515
.4525
.4535
.4545
1.7
.4554
.4564
.4573
.4582
.4591
.4599
.4608
.4616
.4625
.4633
1.8
.4641
.4649
.4656
.4664
.4671
.4678
.4686
.4693
.4699
.4706
1.9
.4713
.4719
.4726
.4732
.4738
.4744
.4750
.4756
.4761
.4767
2.0
.4772
.4778
.4783
.4788
.4793
.4798
.4803
.4808
.4812
.4817
2.1
.4821
.4826
.4830
.4834
.4838
.4842
.4846
.4850
.4854
.4857
2.2
.4861
.4864
.4868
.4871
.4875
.4878
.4881
.4884
.4887
.4890
2.3
.4893
.4896
.4898
.4901
.4904
.4906
.4909
.4911
.4913
.4916
2.4
.4918
.4920
.4922
.4925
.4927
.4929
.4931
.4932
.4934
.4936
2.5
.4938
.4940
.4941
.4943
.4945
.4946
.4948
.4949
.4951
.4952
2.6
.4953
.4955
.4956
.4957
.4959
.4960
.4961
.4962
.4963
.4964
2.7
.4965
.4966
.4967
.4968
.4969
.4970
.4971
.4972
.4973
.4974
2.8
.4974
.4975
.4976
.4977
.4977
.4978
.4979
.4979
.4980
.4981
2.9
.4981
.4982
.4982
.4983
.4984
.4984
.4985
.4985
.4986
.4986
3.0
.4987
.4987
.4987
.4988
.4988
.4989
.4989
.4989
.4990
.4990
3.1
.4990
.4991
.4991
.4991
.4992
.4992
.4992
.4992
.4993
.4993
3.2
.4993
.4993
.4994
.4994
.4994
.4994
.4994
.4995
.4995
.4995
3.3
.4995
.4995
.4995
.4996
.4996
.4996
.4996
.4996
.4996
.4997
3.4
.4997
.4997
.4997
.4997
.4997
.4997
.4997
.4997
.4997
.4998
3.5
.4998
.4998
.4998
.4998
.4998
.4998
.4998
.4998
.4998
.4998
3.6
.4998
.4998
.4999
.4999
.4999
.4999
.4999
.4999
.4999
.4999
3.7
.4999
.4999
.4999
.4999
.4999
.4999
.4999
.4999
.4999
.4999
3.8
.4999
.4999
.4999
.4999
.4999
.4999
.4999
.4999
.4999
.4999
3.9
.5000
.5000
.5000
.5000
.5000
.5000
.5000
.5000
.5000
.5000
Last update: 09/10/2015
Page 11
of 12
Hypothesis Testing
Two-tailed test
Left-tailed test
Right-tailed test 1-
Student's t Distribution
degrees of freedom
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 40 60 120
Last update: 09/10/2015
0.80 0.10 0.20 3.078 1.886 1.638 1.533 1.476 1.440 1.415 1.397 1.383 1.372 1.363 1.356 1.350 1.345 1.341 1.337 1.333 1.330 1.328 1.325 1.323 1.321 1.319 1.318 1.316 1.315 1.314 1.313 1.311 1.310 1.303 1.296 1.289 1.282
Confidence Level ( 1 - ) 0.90 0.95 0.98 0.99 Level of Significance for One-Tailed Test ( ) 0.05 0.025 0.01 0.005 Level of Significance for Two-Tailed Test ( ) 0.10 0.05 0.02 0.01 6.314 12.706 31.821 63.657 2.920 4.303 6.965 9.925 2.353 3.182 4.541 5.841 2.132 2.776 3.747 4.604 2.015 2.571 3.365 4.032 1.943 2.447 3.143 3.707 1.895 2.365 2.998 3.499 1.860 2.306 2.896 3.355 1.833 2.262 2.821 3.250 1.812 2.228 2.764 3.169 1.796 2.201 2.718 3.106 1.782 2.179 2.681 3.055 1.771 2.160 2.650 3.012 1.761 2.145 2.624 2.977 1.753 2.131 2.602 2.947 1.746 2.210 2.583 2.921 1.740 2.110 2.567 2.898 1.734 2.101 2.552 2.878 1.729 2.093 2.539 2.861 1.725 2.086 2.528 2.845 1.721 2.080 2.518 2.831 1.717 2.074 2.508 2.819 1.714 2.069 2.500 2.807 1.711 2.064 2.492 2.797 1.708 2.060 2.485 2.787 1.706 2.056 2.479 2.799 1.703 2.052 2.473 2.771 1.701 2.048 2.467 2.763 1.699 2.045 2.462 2.756 1.697 2.042 2.457 2.750 1.684 2.021 2.423 2.704 1.671 2.000 2.390 2.660 1.658 1.980 2.358 2.617 1.645 1.96 2.326 2.576
Page 12
of 12
0.999 0.0005 0.001 636.619 31.599 12.924 8.610 6.869 5.959 5.408 5.041 4.781 4.587 4.437 4.318 4.221 4.140 4.073 4.015 3.965 3.922 3.883 3.850 3.819 3.792 3.768 3.745 3.725 3.707 3.690 3.674 3.659 3.646 3.551 3.460 3.373 3.291
Hypothesis Testing