Presentation is loading. Please wait.

Presentation is loading. Please wait.

Note 12 of 5E Statistics with Economics and Business Applications Chapter 8 Test of Hypotheses for Means and Proportions Null and alternative hypotheses,

Similar presentations


Presentation on theme: "Note 12 of 5E Statistics with Economics and Business Applications Chapter 8 Test of Hypotheses for Means and Proportions Null and alternative hypotheses,"— Presentation transcript:

1 Note 12 of 5E Statistics with Economics and Business Applications Chapter 8 Test of Hypotheses for Means and Proportions Null and alternative hypotheses, test statistic, type I and II errors, significance level, p-value

2 Note 12 of 5E Review Review I. What’s in last lecture? Small-Sample Estimation of a Population Mean Chapter 7 II. What's in the next two lectures? Hypotheses tests for means and proportions Read Chapter 8

3 Note 12 of 5E Introduction Setting up and testing hypotheses is an essential part of statistical inference. In order to formulate such a test, usually some theory has been put forward, either because it is believed to be true or because it is to be used as a basis for argument, but has not been proved. Hypothesis testing refers to the process of using statistical analysis to determine if the differences between observed and hypothesized values are due to random chance or to true differences in the samples. –Statistical tests separate significant effects from mere luck or random chance. –All hypothesis tests have unavoidable, but quantifiable, risks of making the wrong conclusion.

4 Note 12 of 5EIntroduction Suppose that a pharmaceutical company is concerned that the mean potency  of an antibiotic meet the minimum government potency standards. They need to decide between two possibilities: – The mean potency  does not exceed the required minimum potency. – The mean potency  exceeds the required minimum potency. test of hypothesis. This is an example of a test of hypothesis.

5 Note 12 of 5EIntroduction Similar to a courtroom trial. In trying a person for a crime, the jury needs to decide between one of two possibilities: – The person is guilty. – The person is innocent. To begin with, the person is assumed innocent. The prosecutor presents evidence, trying to convince the jury to reject the original assumption of innocence, and conclude that the person is guilty.

6 Note 12 of 5E Five Steps of a Statistical Test A statistical test of hypothesis consist of five steps A statistical test of hypothesis consist of five steps 1.Specify statistical hypothesis which include a null hypothesis H 0 and a alternative hypothesis H a 2.Identify and calculate test statistic 3.Identify distribution and find p-value 4.Make a decision to reject or not to reject the null hypothesis 5.State conclusion

7 Note 12 of 5E Null and Alternative Hypothesis The null hypothesis, H 0 : –The hypothesis we wish to falsify –Assumed to be true until we can prove otherwise. The alternative hypothesis, H a : –The hypothesis we wish to prove to be true Court trial:Pharmaceuticals: H 0 : innocent H 0 :  does not exceeds required potency H a : guilty H a :  exceeds required potency Court trial:Pharmaceuticals: H 0 : innocent H 0 :  does not exceeds required potency H a : guilty H a :  exceeds required potency

8 Note 12 of 5E Examples of Hypotheses You would like to determine if the diameters of the ball bearings you produce have a mean of 6.5 cm. H 0 :  =  6.5 H a :  6.5 (Two-sided or two tailed alternative)

9 Note 12 of 5E Do the “16 ounce” cans of peaches meet the claim on the label (on the average)? Notice, the real concern would be selling the consumer less than 16 ounces of peaches. H 0 :  H a :  < 16 One-sided or one-tailed alternative Examples of Hypotheses

10 Note 12 of 5E Comments on Setting up Hypothesis The null hypothesis must contain the equal sign. This is absolutely necessary because the distribution of test statistic requires the null hypothesis to be assumed to be true and the value attached to the equal sign is then the value assumed to be true. The alternate hypothesis should be what you are really attempting to show to be true. This is not always possible. There are two possible decisions: reject or fail to reject the null hypothesis. Note we say “fail to reject” or “not to reject” rather than “accept” the null hypothesis.

11 Note 12 of 5E Two Types of Errors There are two types of errors which can occur in a statistical test: Type I error: reject the null hypothesis when it is true Type II error: fail to reject the null hypothesis when it is false Actual Fact Jury’s Decision GuiltyInnocent GuiltyCorrectError InnocentErrorCorrect Actual Fact Your Decision H 0 trueH 0 false Fail to reject H 0 CorrectType II Error Reject H 0 Type I ErrorCorrect

12 Note 12 of 5E Error Analogy Consider a medical test where the hypotheses are equivalent to H 0 : the patient has a specific disease H a : the patient doesn’t have the disease Then, Type I error is equivalent to a false negative (I.e., Saying the patient does not have the disease when in fact, he does.) Type II error is equivalent to a false positive (I.e., Saying the patient has the disease when, in fact, he does not.)

13 Note 12 of 5E Two Types of Errors We want to keep the both α and β as small as possible. The value of  is controlled by the experimenter and is called the significance level. Generally, with everything else held constant, decreasing one type of error causes the other to increase. Define:  = P(Type I error) = P(reject H 0 when H 0 is true)  P(Type II error) = P(fail to reject H 0 when H 0 is false)

14 Note 12 of 5E Balance Between  and  The only way to decrease both types of error simultaneously is to increase the sample size. No matter what decision is reached, there is always the risk of one of these errors. Balance: identify the largest significance level  as the maximum tolerable risk you want to have of making a type I error. Employ a test procedure that makes type II error  as small as possible while maintaining type I error smaller than the given significance level .

15 Note 12 of 5E Test Statistic A test statistic is a quantity calculated from sample of data. Its value is used to decide whether or not the null hypothesis should be rejected. The choice of a test statistic will depend on the assumed probability model and the hypotheses under question. We will learn specific test statistics later. We then find sampling distribution of the test statistic and calculate the probability of rejecting the null hypothesis (type I error) if it is in fact true. This probability is called the p-value

16 Note 12 of 5EP-value The p-value is a measure of inconsistency between the hypothesized value under the null hypothesis and the observed sample. The p-value is the probability, assuming that H 0 is true, of obtaining a test statistic value at least as inconsistent with H 0 as what actually resulted. It measures whether the test statistic is likely or unlikely, assuming H 0 is true. Small p-values suggest that the null hypothesis is unlikely to be true. The smaller it is, the more convincing is the rejection of the null hypothesis. It indicates the strength of evidence for rejecting the null hypothesis H 0

17 Note 12 of 5E Decision A decision as to whether H 0 should be rejected results from comparing the p-value to the chosen significance level  : –H 0 should be rejected if p-value   –H 0 should not be rejected if p-value >  When p-value>α, state “fail to reject H 0 ” or “not to reject” rather than “accepting H 0 ”. Write “there is insufficient evidence to reject H 0 ”. Another way to make decision is to use critical value and rejection region, which will not be covered in this class.

18 Note 12 of 5E Five Steps of a Statistical Test A statistical test of hypothesis consist of five steps A statistical test of hypothesis consist of five steps 1.Specify the null hypothesis H 0 and alternative hypothesis H a in terms of population parameters 2.Identify and calculate test statistic 3.Identify distribution and find p-value 4.Compare p-value with the given significance level and decide if to reject the null hypothesis 5.State conclusion

19 Note 12 of 5E Large Sample Test for Population Mean Step 1: Specify the null and alternative hypothesis –H 0 :  =   versus H a :      two-sided test) –H 0 :  =   versus H a :  >   (one-sided test) –H 0 :  =   versus H a :  <    one-sided test) Step 2: Test statistic for large sample (n≥30)

20 Note 12 of 5E Intuition of the Test Statistic If H 0 is true, the value of should be close to  0, and z will be close to 0. If H 0 is false, will be much larger or smaller than  0, and z will be much larger or smaller than 0, indicating that we should reject H 0. Thus H a :     H a :  >   H a :  <   z is much larger or smaller than 0 provides evidence against H 0 z is much larger than 0 provides evidence against H 0 z is much smaller than 0 provides evidence against H 0 How much larger (or smaller) is large (small) enough?

21 Note 12 of 5E Large Sample Test for Population Mean Step 3: When n is large, the sampling distribution of z will be approximately standard normal under H 0. Compute sample statistic z is defined for any possible sample. Thus it is a random variable which can take many different values and the sampling distribution tells us the chance of each value. z* is computed from the given data, thus a fixed number.

22 Note 12 of 5E Large Sample Test for Population Mean – H a :  <    one-sided test) – H a :  >   (one-sided test) – H a :     (two-sided test) P(z>|z*|), P(z>z*) and P(z<z*) can be found from the normal table

23 Note 12 of 5E Example The daily yield for a chemical plant has averaged 880 tons for several years. The quality control manager wants to know if this average has changed. She randomly selects 50 days and records an average yield of 871 tons with a standard deviation of 21 tons. Conduct the test using α=.05.

24 Note 12 of 5EExample Decision: since p-value<α, we reject the hypothesis that μ=880. Conclusion: the average yield has changed and the change is statistically significant at level.05. In fact, the p-value tells us more: the null hypothesis is very unlikely to be true. If the significance level is set to be any value greater or equal to.0024, we would still reject the null hypothesis. Thus, another interpretation of the p-value is the smallest level of significance at which H 0 would be rejected, and p-value is also called the observed significance level.

25 Note 12 of 5E Example A homeowner randomly samples 64 homes similar to her own and finds that the average selling price is $252,000 with a standard deviation of $15,000. Is this sufficient evidence to conclude that the average selling price is greater than $250,000? Use  =.01.

26 Note 12 of 5EExample Decision: since the p-value is greater than  =.01, H 0 is not rejected. Conclusion: there is insufficient evidence to indicate that the average selling price is greater than $250,000.

27 Note 12 of 5E Small Sample Test for Population Mean Step 1: Specify the null and alternative hypothesis –H 0 :  =   versus H a :      two-sided test) –H 0 :  =   versus H a :  >   (one-sided test) –H 0 :  =   versus H a :  <    one-sided test) Step 2: Test statistic for small sample Step 3: When samples are from a normal population, under H 0, the sampling distribution of t has a Student’s t distribution with n-1 degrees of freedom

28 Note 12 of 5E Small Sample Test for Population Mean Step 3: Find p-value. Compute sample statistic – H a :      two-sided test) – H a :  >   (one-sided test) – H a :  <   (one-sided test) P(t>|t*|), P(t>t*) and P(t<t*) can be found from the t table

29 Note 12 of 5EExample A sprinkler system is designed so that the average time for the sprinklers to activate after being turned on is no more than 15 seconds. A test of 5 systems gave the following times: 17, 31, 12, 17, 13, 25 Is the system working as specified? Test using  =.05.

30 Note 12 of 5E Example Data: Data: 17, 31, 12, 17, 13, 25 First, calculate the sample mean and standard deviation.

31 Note 12 of 5E Approximating the p-value Since the sample size is small, we need to assume a normal population and use t distribution. We can only approximate the p-value for the test using Table 4. Since the observed value of t* = 1.38 is smaller than t.10 = 1.476, p-value >.10.

32 Note 12 of 5EExample Decision: since the p-value is greater than.1, than it is greater than  =.05, H 0 is not rejected. Conclusion: there is insufficient evidence to indicate that the average activation time is greater than 15 seconds. Exact p-values can be calculated by computers.

33 Note 12 of 5E Large Sample Test for Difference Between Two Population Means

34 Note 12 of 5E Large Sample Test for Difference Between Two Population Means Step 1: Specify the null and alternative hypothesis –H 0 :      D 0  versus H a :       D   two-sided test) –H 0 :      D 0  versus H a :       D  (one-sided test) –H 0 :      D 0  versus H a :       D   one-sided test) where D 0 is some specified difference that you wish to test. D 0 =0 when testing no difference.

35 Note 12 of 5E Large Sample Test for Difference Between Two Population Means Step 2: Test statistic for large sample sizes when n 1 ≥30 and n 2 ≥30 Step 3: Under H 0, the sampling distribution of z is approximately standard normal

36 Note 12 of 5E Large Sample Test for Difference Between Two Population Means Step 3: Find p-value. Compute – H a :       D   two-sided test) – H a :       D  (one-sided test) – H a :       D  (one-sided test)

37 Note 12 of 5E Example Is there a difference in the average daily intakes of dairy products for men versus women? Use  =.05. Avg Daily IntakesMenWomen Sample size50 Sample mean756762 Sample Std Dev3530

38 Note 12 of 5EExample Decision: since the p-value is greater than  =.05, H 0 is not rejected. Conclusion: there is insufficient evidence to indicate that men and women have different average daily intakes.

39 Note 12 of 5E Small Sample Testing the Difference between Two Population Means Note that both population are normally distributed with the same variances

40 Note 12 of 5E Small Sample Testing the Difference between Two Population Means Step 1: Specify the null and alternative hypothesis –H 0 :      D 0  versus H a :       D   two-sided test) –H 0 :      D 0  versus H a :       D  (one-sided test) –H 0 :      D 0  versus H a :       D   one-sided test) where D 0 is some specified difference that you wish to test. D 0 =0 when testing no difference.

41 Note 12 of 5E Small Sample Testing the Difference between Two Population Means Step 2: Test statistic for small sample sizes Step 3: Under H 0, the sampling distribution of t has a Student’s t distribution with n 1 +n 2 -2 degrees of freedom

42 Note 12 of 5E Small Sample Testing the Difference between Two Population Means Step 3: Find p-value. Compute – H a :       D   two-sided test) – H a :       D  (one-sided test) – H a :       D  (one-sided test)

43 Note 12 of 5E Example Two training procedures are compared by measuring the time that it takes trainees to assemble a device. A different group of trainees are taught using each method. Is there a difference in the two methods? Use  =.01. Time to Assemble Method 1Method 2 Sample size1012 Sample mean3531 Sample Std Dev 4.94.5

44 Note 12 of 5EExample Time to Assemble Method 1Method 2 Sample size1012 Sample mean3531 Sample Std Dev 4.94.5

45 Note 12 of 5EExample Decision: since the p- value is greater than  =.01, H 0 is not rejected. Conclusion: there is insufficient evidence to indicate a difference in the population means. Decision: since the p- value is greater than  =.01, H 0 is not rejected. Conclusion: there is insufficient evidence to indicate a difference in the population means. df = n 1 + n 2 – 2 = 10 + 12 – 2 = 20

46 Note 12 of 5E The Paired-Difference Test matched-pairspaired-difference test We have assumed that samples from two populations are independent. Sometimes the assumption of independent samples is intentionally violated, resulting in a matched-pairs or paired-difference test. By designing the experiment in this way, we can eliminate unwanted variability in the experiment Denote data as Pair 1 2 … n Population 1 x 11 x 12 … x 1n Population 2 x 21 x 22 … x 2n Differenced 1 = x 11 - x 21 d 2 =x 12 - x 22 … d n =x 1n - x 2n

47 Note 12 of 5E The Paired-Difference Test Step 1: Specify the null and alternative hypothesis –H 0 :      D 0  versus H a :       D   two-sided test) –H 0 :      D 0  versus H a :       D  (one-sided test) –H 0 :      D 0  versus H a :       D   one-sided test) where D 0 is some specified difference that you wish to test. D 0 =0 when testing no difference.

48 Note 12 of 5E The Paired-Difference Test Step 2: Test statistic for small sample sizes Step 3: Under H 0, the sampling distribution of t has a Student’s t distribution with n-1 degrees of freedom

49 Note 12 of 5E The Paired-Difference Test Step 3: Find p-value. Compute – H a :       D   two-sided test) – H a :       D  (one-sided test) – H a :       D  (one-sided test)

50 Note 12 of 5E Paired t Test Example A weight reduction center advertises that participants in its program lose an average of at least 5 pounds during the first week of the participation. Because of numerous complaints, the state’s consumer protection agency doubts this claim. To test the claim at the 0.05 level of significance, 12 participants were randomly selected. Their initial weights and their weights after 1 week in the program appear on the next slide. Set up and perform an appropriate hypothesis test.

51 Note 12 of 5E Paired Sample Example continued

52 Note 12 of 5E Paired Sample Example continued Each member serves as his/her own pair. weight changes=initial weight–weight after one week

53 Note 12 of 5E Paired Sample Example continued Decision: since the p-value is smaller than  =.05, H 0 is rejected. Conclusion: there is strong evidence that the mean weight loss is less than 5 pounds for those who took the program for one week. Decision: since the p-value is smaller than  =.05, H 0 is rejected. Conclusion: there is strong evidence that the mean weight loss is less than 5 pounds for those who took the program for one week.

54 Note 12 of 5E Key Concepts I. A statistical test of hypothesis consist of five steps 1.Specify the null hypothesis H 0 and alternative hypothesis H a in terms of population parameters 2.Identify and calculate test statistic 3.Identify distribution and find p-value 4.Compare p-value with the given significance level and decide if to reject the null hypothesis 5.State conclusion

55 Note 12 of 5E Key Concepts II. Errors and Statistical Significance 1. Type I error: reject the null hypothesis when it is true 2. Type II error: fail to reject the null hypothesis when it is false 3.The significance level  = P(type I error)  =P(type II error) 5.The p-value is the probability of observing a test statistic as extreme as or more than the one observed; also, the smallest value of  for which H 0 can be rejected 6.When the p-value is less than the significance level , the null hypothesis is rejected

56 Note 12 of 5E Key Concepts III.Test for a population mean H 0 : µ=µ 0 Sample size? Ha: µ≠µ0 p-value= 2P(z>|z*|) Ha: µ>µ0 p-value= P(z>z*) Ha: µ<µ0 p-value= P(z<z*) Ha: µ≠µ0 p-value= 2P(t>|t*|) Ha: µ>µ0 p-value= 2P(t>t*) Ha: µ≠µ0 p-value= P(t<t*) largesmall

57 Note 12 of 5E Key Concepts IV. Test for Difference Between Two Population Mean H 0 : µ 1 -µ 2 =D 0 Sample size? Ha: µ1-µ 2 ≠D0 p-value= 2P(z>|z*|) Ha: µ1-µ 2 >D0 p-value= P(z>z*) Ha: µ1-µ 2 <D0 p-value= P(z<z*) Ha:µ1-µ 2 ≠D0 p-value= 2P(t>|t*|) Ha: µ1-µ 2 >D0 p-value= 2P(t>t*) Ha: µ1-µ 2 <D0 p-value= P(t<t*) largesmall

58 Note 12 of 5E Key Concepts V. The Paired-Difference Test – H a :       D   two-sided test) – H a :       D  (one-sided test) – H a :       D  (one-sided test)


Download ppt "Note 12 of 5E Statistics with Economics and Business Applications Chapter 8 Test of Hypotheses for Means and Proportions Null and alternative hypotheses,"

Similar presentations


Ads by Google