Engineering Statistics Hypothesis Testing

Slides:



Advertisements
Similar presentations
Chapter 7 Hypothesis Testing
Advertisements

“Students” t-test.
Hypothesis Testing making decisions using sample data.
Hypothesis Testing A hypothesis is a claim or statement about a property of a population (in our case, about the mean or a proportion of the population)
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 9 Hypothesis Testing Developing Null and Alternative Hypotheses Developing Null and.
Tests of Hypotheses: Large Samples Chapter Rejection region Acceptance
CHAPTER 10 ESTIMATION AND HYPOTHESIS TESTING: TWO POPULATIONS Prem Mann, Introductory Statistics, 7/E Copyright © 2010 John Wiley & Sons. All right reserved.
Section 7-2 Hypothesis Testing for the Mean (n  30)
Confidence Intervals and Hypothesis Testing - II
Engineering Statistics Chapter 4 Hypothesis Testing 4C Testing on Proportions & Difference Between Proportions.
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc. Chap th Lesson Introduction to Hypothesis Testing.
Engineering Statistics Chapter 4 Hypothesis Testing 4B Testing on Variance & Proportion of Variances.
1 Introduction to Hypothesis Testing. 2 What is a Hypothesis? A hypothesis is a claim A hypothesis is a claim (assumption) about a population parameter:
© Nuffield Foundation 2012 Nuffield Free-Standing Mathematics Activity Successful HE applicants © Rudolf Stricker.
1 Chapter 9 Hypothesis Testing. 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known 
Chap 8-1 A Course In Business Statistics, 4th © 2006 Prentice-Hall, Inc. A Course In Business Statistics 4 th Edition Chapter 8 Introduction to Hypothesis.
Engineering Statistics Chapter 3 Distribution of Samples Distribution of sample statistics 3C - Proportions and Difference between Proportions.
Psych 230 Psychological Measurement and Statistics Pedro Wolf October 21, 2009.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
 What is Hypothesis Testing?  Testing for the population mean  One-tailed testing  Two-tailed testing  Tests Concerning Proportions  Types of Errors.
Chapter 10 One-Sample Test of Hypothesis. Example The Jamestown steel company manufactures and assembles desks and other office equipment at several plants.
Chapter Nine Hypothesis Testing.
HYPOTHESIS TESTING.
Ch06 Hypothesis Testing.
Hypothesis Tests l Chapter 7 l 7.1 Developing Null and Alternative
9.3 Hypothesis Tests for Population Proportions
One-Sample Tests of Hypothesis
Chapter 10: Comparing Two Populations or Groups
Testing the Difference Between Two Means
Chapter 7 Hypothesis Testing with One Sample.
The Chi-Squared Test Learning outcomes
Hypothesis Testing II: The Two-sample Case
Chapters 20, 21 Hypothesis Testing-- Determining if a Result is Different from Expected.
Chapter 10: Comparing Two Populations or Groups
اختبار الفرضيات اختبارالفرضيات المتعلقة بالوسط
Hypothesis Tests for a Population Mean,
One-Sample Tests of Hypothesis
Chapter 7 Hypothesis Testing with One Sample.
LESSON 20: HYPOTHESIS TESTING
Elementary Statistics
Hypothesis Tests for Proportions
15.1 Goodness-of-Fit Tests
Virtual University of Pakistan
Hypothesis Testing A hypothesis is a claim or statement about the value of either a single population parameter or about the values of several population.
NONPARAMETRIC METHODS
ESTIMATION AND HYPOTHESIS TESTING: TWO POPULATIONS
Testing Hypotheses about a Population Proportion
EQT 272 PROBABILITY AND STATISTICS ROHANA BINTI ABDUL HAMID
OMGT LECTURE 10: Elements of Hypothesis Testing
Chapter 10: Comparing Two Populations or Groups
One-Sample Tests of Hypothesis
Chapter 10: Comparing Two Populations or Groups
Comparing Two Proportions
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Comparing Two Proportions
Chapter 10: Comparing Two Populations or Groups
Comparing Two Proportions
Hypothesis Testing for Proportions
Chapter 10: Comparing Two Populations or Groups
The z-test for the Mean of a Normal Population
Chapter 10: Comparing Two Populations or Groups
Hypothesis Testing 1 Copyright by Winston S. Sirug, Ph.D.
Testing Hypotheses about a Population Proportion
Chapter 11 Lecture 2 Section: 11.3.
Presentation transcript:

Engineering Statistics Hypothesis Testing Testing on Proportions & Difference Between Proportions

Testing proportions In Ch 3C, we looked at how sample proportions distribute. We use the normal distribution and set p~N(, (1–)/n). When testing proportions of a sample, we want to find out if the proportion of a property is usual or abnormal. Another reason to test proportion is to see if the proportion has changed over a certain period. If so, a certain action may need to be taken.

Example 1 For example, a hotel usually provides two towels in a room, even when only a guest checks in. To maintain hygiene, both towels have to be washed after the guest checks out even if it appears as if only one towel is used. This would be a waste. Thus the management may want to find out the proportion of its single-occupant guests use two towels. If the proportion is low, it may be better to put only one towel in each room and put a note telling the guest he/she may ask for a second. This will mean savings on unnecessary washing.

How to carry out the test Let us assume that the management is willing to risk offending some guests if the proportion using two towels is less than 1/6. He puts a card in each room where a single guest checks in, asking the guest to state whether he/she agrees to have only one towel when he checks in. An explanation is given for such a move. After two weeks, the hotel gets 97 responses. If all the guests agree, then of course the hotel can go ahead with confidence that it is not going to lose any potential customers. But what if 8 guests disagree? This is only a little lower than 1/6. Dare he, on such a sample, introduce the practice?

Analysis As usual, we need to set a confidence level. Let us put it at 95%. Also, let us use p to represent the proportion who disagree. Then p~N(0.1667, 0.16670.8333/97) The steps are:

Test Procedure Null hypothesis: p = 0.1667; Alternative hypothesis: p < 0.1667. Test statistic: z=[p–0.1667]/(0.16670.8333/97). This is a one-tail test. At 95% confidence, =0.05, z0.05=1.6449. The test being on the left tail, we set the critical value as –1.6449. We shall accept the null hypothesis if zcalculated  –1.6449, and reject it otherwise. zcalculated = [8/97–0.1667]/(0.16670.8333/97). = –2.2257 < zcritical. So we reject the null hypothesis. This means the proportion who disagree is less than 1/6 and the hotel should probably introduce the new rule.

Example 2 The proportion of doctors who quit to go into private practice after compulsory service or scholarship binding is 72%. The Ministry of Health introduces a new scheme to persuade such doctors to stay in the government hospitals. After this, from a group of 120 doctors, 80 leave the government when they can. At 90% of confidence, test the hypothesis that the percentage has gone down.

Example 2 (Analysis) 80/120 = 66.67%. So it appears that the proportion has gone down below 72%. However, is this small reduction significant enough for the MoH to claim success of the scheme? This is where the test comes in. Solution: Let q represent the proportion of doctors quitting government services. Then q~N(0.72, 0.720.28/120). We are testing if q has gone down, so this is a one-tail test on the left.

Example 2 (Solution) Null hypothesis: q = 0.72; Alternative hypothesis: q<0.72. Test statistic: z=[q–0.72]/(0.720.28/120). This is a one-tail test. At 90% confidence, =0.1, z0.1=1.2816. The test being on the left tail, we set the critical value as –1.2816. We shall accept the null hypothesis if zcalculated  –1.2816, and reject it otherwise. zcalculated = [80/120–0.72]/(0.720.28/120). = –1.3012 < zcritical. This is sufficient to support the MoH’s claim that the scheme has made changes.

Example 3 An oil palm plantation has two types of plants, AA and BB in the ratio 2:3. The types are grown from seeds. There is no way to determine the type that will grow by looking at the seeds. As AA produces more fruits, steps are taken to increase the proportion for AA. A technician suggested using centrifuges to separate the seeds. This was adopted and it was found that the out of 50 plants, 26 turn out to be AA. At 95% of confidence, test the hypothesis the procedure has increased the proportion for AA. Solution: Let a represent the proportion for AA plants, then a~N(0.4, 0.40.6/50).

Example 3 (Solution) Null hypothesis: a = 0.4; Alternative hypothesis: a>0.4. Test statistic: z=[a–0.4]/(0.40.6/50). This is a one-tail test. At 95% confidence, =0.05, z0.05=1.6449. We shall accept the null hypothesis if zcalculated  1.6449, and reject it otherwise. zcalculated = [0.52–0.4]/(0.40.6/50). = 1.7321 > zcritical. Based on this, we reject the null hypothesis and agree that the procedure has made improvement in the ratio for AA.

Example 4 Climate experts believe that global warming has caused changes in rainfall pattern. One such change is in the frequency of raining days. The record for a region shows that during the inter-monsoon season, the proportion for rainy days is 0.22. During a study conducted over 122 days of inter-monsoon, 30 are rainy days. At 90% confidence, does this show the proportion for rainy days has changed? Solution: Let r represent the proportion for rainy days, then r~N(0.22, 0.220.78/122). The way the question is asked, we only want to know if the proportion has changed, which means we shall carry out a two-tail test.

Example 4 (Solution) Null hypothesis: r = 0.4; Alternative hypothesis: r  0.4. Test statistic: z=[r–0.22]/(0.220.78/122). This is a one-tail test. At 90% confidence, =0.1, /2=0.05, z0.05=1.6449. We shall accept the null hypothesis if –1.6449  zcalculated  1.6449, and reject it otherwise. zcalculated = [30/122–0.22]/(0.220.78/122). = 0.6906. The obtained z falls within the critical range and so we accept the null hypothesis. This indicates that the change is not significant, and the rainy days ratio hasn’t really changed.

Comparing two Proportions When the proportions of two different samples of sizes n1 and n2 from the same population with known proportion  are compared, we model the difference using p1–p2~N(0, (1–)/n1+ (1–)/n2) When comparing samples of sizes n1 and n2 from two populations with known proportions 1 and 2, the model is p1–p2~N(1–2, 1(1–1)/n1+ 2(1–2)/n2)

Comparing two Proportions However, if the proportions in the populations are not known, then we test if the proportions are different using p1–p2~N(0, p1(1–p1)/n1+ p2(1–p2)/n2) to model the difference. In all cases, the test will be the same as for testing the proportion of a sample. As can be expected, the test will be more reliable if the sample sizes are large. For small samples, we have to more cautious in interpreting the results.

Example 5 The proportion of families having below-poverty incomes at national level is 0.13. A survey on poverty is made in two villages X and Y. For 60 families in X, 8 families are identified as having below-poverty income; for 72 families in Y, the figure is 11. At confidence level of 90%, test the hypothesis Y has higher level of poor people. Solution: Using x and y to represent the proportion of poor families, we model the difference as y – x ~N(0, 0.130.87/60+ 0.130.87/72).

Example 5 (Solution) Null hypothesis: y – x = 0; Alternative hypothesis: y – x > 0. Test statistic: z=[y–x–0]/(0.130.87/60+ 0.130.87/72). Because our question is whether y is more than x, we run a one-tail test. At 90% confidence, =0.1, z0.1=1.2816. We shall accept the null hypothesis if zcalculated  1.2816, and reject it otherwise. zcalculated = [11/72–8/60]/(0.130.87/60+ 0.130.87/72). = 0.3308. The obtained z is less than the critical value. So we accept H0. This indicates that the proportion of poverty at Y is not higher than that at X.

Example 6 A researcher is convinced that the proportion of male undergraduates who plagiarize in thesis is higher than that of the female. A thorough check was done on 35 thesis of the men and 32 of the ladies. Among the men, 12 of them are confirmed to have copied substantial amount from other sources, while only 8 of the ladies do so. At 95% level of confidence, can you agree with the researcher? Solution: Using m and w to represent the proportion men and women plagiarizers, we model the result as follows: m – w ~N(0, 12/3523/35/35+ 8/3224/32/32).

Example 6 (Solution) Null hypothesis: m – w = 0; Alternative hypothesis: m – w > 0. Test statistic: z=[m–w–0]/(12/3523/35/35+ 8/3224/32/32). This is a one-tail test. At 95% confidence, =0.05, z0.1=1.6449. We shall accept the null hypothesis if zcalculated  1.6449, and reject it otherwise. zcalculated = [12/35–8/32]/(12/3523/35/35+ 8/3224/32/32) = 0.8374. The obtained z is less than the critical value. So we accept the null hypothesis. This indicates that the proportion of men who plagiarize is not more than that of the ladies.

Example 7 In order to increase the proportion of business customers who give more business to the bank, a bank manager introduced a special scheme for such customers. It was found that in the month after the scheme, 23 out of 80 new customers are business customers; during the previous month only 17 out of 90 were business customers. At 95% confidence level, can we agree that his scheme has succeeded? Solution: Let p1and p2 represent the proportions before and after the scheme. p2 – p1 ~ N(0, 23/8057/80/80+17/9073/90/90).

Example 7 (Solution) Null hypothesis: p2 – p1 = 0; Alternative hypothesis: p2 – p1 > 0. Test statistic: z=[p2–p1–0]/ (23/8057/80/80 + 17/9073/90/90). This is a one tail test. At 95% confidence, =0.05, z0.1=1.6449. We shall accept null hypothesis if zcalculated  1.6449, and reject it otherwise. zcalculated = [23/80 – 17/90] / (23/8057/80/80 + 17/9073/90/90) = 1.5103 < zcritical . Hence we accept the null hypothesis.