Presentation is loading. Please wait.

Presentation is loading. Please wait.

STT 315 This lecture is based on Chapter 6. Acknowledgement: Author is thankful to Dr. Ashok Sinha, Dr. Jennifer Kaplan and Dr. Parthanil Roy for allowing.

Similar presentations


Presentation on theme: "STT 315 This lecture is based on Chapter 6. Acknowledgement: Author is thankful to Dr. Ashok Sinha, Dr. Jennifer Kaplan and Dr. Parthanil Roy for allowing."— Presentation transcript:

1 STT 315 This lecture is based on Chapter 6. Acknowledgement: Author is thankful to Dr. Ashok Sinha, Dr. Jennifer Kaplan and Dr. Parthanil Roy for allowing him to use/edit some of their slides.

2 Within the context of the problem, students will be able to:  Perform a one-sample z-test for proportion.  Perform one-sample z-test and t-test for mean.  Verify the conditions for performing the tests.  Identify Type I and Type II errors.  Understand the concept of p-value.  Interpret the results of the test within the context of the problem. Hypothesis Tests: Goal 2

3 Example 1 A congressman claims that only 12% of drivers talk on their cell phone. Standing at a bus stop someone noticed 4 out of 10 drivers on a cell phone. Is this an evidence that the congressman is wrong? But before answering that question, we must reflect on “Is the sample size large enough to come to any conclusion about proportion?” No, because np = 1.2, and n(1-p) = 8.8, both of which are less than 9. So we must have a larger sample. 3

4 Example 1 What minimum sample size is required that meets the “large enough” condition? About 76, because it gives np = 9.12 expected successes and n(1-p) = 66.88 expected failures, both larger than 9. Suppose 19 out of 100 drivers were found to be on cell phones. Is this an evidence that the congressman is wrong? Let us assume that the congressman’s assumption is correct, and find how likely it is to have 19% or more drivers to be on cell phone, when sample size is 100. 4

5 Example 1 5

6 Few questions We are making our conclusion on the basis of a sample. Is there any possibility of making an error? How much reliable is our conclusion? In other words, what is the probability of making an error? We are saying that 0.016 (1.6%) is not very likely. What value(s) should we consider as likely, and what as unlikely? 6

7 Some terminologies parameterA hypothesis is a claim/conjecture about some parameter of the population distribution. In the driving example, congressman’s claim that p = 0.12, is a hypothesis. We shall have two competing hypotheses:  H 0, the null hypothesis,  H a, the alternative hypothesis. In testing of hypotheses we try to retain the null hypothesis unless sample provides strong evidence against it, in which case we conclude in favor of alternative hypothesis. 7

8 In a hypothesis test we have two possible errors: We find evidence to reject the null hypothesis but it turns out that the null hypothesis is true: Type I error. We do not find evidence to reject the null hypothesis but the null hypothesis turns out to be false: Type II error. Errors in testing 8

9 A.A Type I error B.A Type II error In the cell phone drivers example, when we had 19 people in the sample who were talking on their cell phones, we found evidence to reject the null hypothesis. If the actual percent of drivers who talk on cell phones is 12%, we have made 9

10 A.A Type I error B.A Type II error In the cell phone drivers example, when we had 14 people in the sample who were talking on their cell phones, we did not find evidence to reject the null hypothesis. If the actual percent of drivers who talk on cell phones is not 12%, we have made 10

11 Few Remarks Errors of Type I and II are NOT mistakes. They happen due to sampling variability. It is the same reason that some confidence intervals do not contain the population value, because the conclusions we make based on hypothesis tests are probabilistic. Except in some special cases, we are bound to make both type of errors. Our attempt is to minimize the probability of making these errors. Unfortunately, often is the case that trying to reduce one error increases the chance of other error. 11

12 Which error is more crucial? This is not an easy question. In order to answer this question, let us think of a different problem. Suppose you are a jury member and you have to decide whether someone is guilty or not. Which error is more crucial? Type I error. The person is innocent The person is guilty Jury declares the person to be guilty Type I error Jury declares the person to be not guilty Type II error 12

13 Example A drug company tests the null hypothesis that a new drug does not work better than a placebo. What is a Type I error in this case? A.The tests show the new drug works better than the placebo, but it really does not. B.The tests show the new drug does not work better than the placebo, but it really does. 13

14 A drug company tests the null hypothesis that a new drug does not work better than a placebo. Which error would be worse to make? A.The tests show the new drug works better than the placebo, but it really does not. (Type I error) B.The tests show the new drug does not work better than the placebo, but it really does. (Type II error) Example 14

15 The Testing Procedure Since Type I error is more crucial, we always make sure that the probability of Type I error is not too high (say, under 5%) and then we try to minimize Type II error. Such a test is said to have a level of significance 5% and it is called a level-0.05 test. So level of significance (usually denoted by the Greek letter α) is the maximum permissible probability of Type I error. The popular choices of values of α are 1%, 5% and 10%. Given the sample we compute the probability of Type I error, which is also known as observed level of significance or p-value. If “p-value is less than level of significance”, we reject H 0.If “p-value is less than level of significance”, we reject H 0. AlternativelyAlternatively, we compute the rejection region corresponding to α, and find the value of the test-statistic from the sample. We reject H 0 if the value of test-statistic falls in the rejection region.We reject H 0 if the value of test-statistic falls in the rejection region. 15

16 The Testing Procedure Given a statistical problem we shall first decide what are the suitable null and alternative hypotheses. Mind that the hypotheses are decided before the data are collected; that means –the sampled data should not influence what the null and/or alternative hypotheses are. –but on the basis of sample we shall decide which of the hypotheses to be rejected. We decide about the level of significance (α). We compute the test-statistic and the rejection region and see if the test-statistic falls in the rejection region. Additionally, we compute p-value and if p-value < α, we reject H 0. 16

17 On the question of choosing an  level - rules of thumb for p-values Popular choices for  are 0.01, 0.05 and 0.10. A p-value below 0.01 is very unusual and provides strong evidence to reject the null hypothesis. A p-value between 0.01 and 0.05 is pretty unusual and provides moderate evidence to reject the null hypothesis. A p-value between 0.05 and 0.10 is unusual and provides some evidence to reject the null hypothesis. In some social sciences, a p-value between 0.10 and 0.25 is considered unusual and evidence to reject the null hypothesis. 17

18 Test for population proportion 18

19 19 Alternative hypothesis Rejection region One-sided test (right) One-sided test (left) Two-sided test

20 Remark 20

21 Example 1 Let us test the problem of Example 1 (calling on cell-phone while driving) at 5% level of significance. Here we consider H 0 : p = 0.12, H a : p > 0.12. In our sample 19 of 100 drivers were on cell-phone. We shall use TI 83/84 Plus to compute p-value. Press [STAT]. Select [TESTS]. Choose 5: 1-PropZTest…. Input the following: o p 0 : 0.12 o x: 19 o n: 100 o prop: > p 0 Choose Calculate and press [ENTER]. 21

22 Test of 1-proportion with TI 83/84 Plus Let us test the problem of Example 1 (calling on cell-phone while driving) at 5% level of significance. Here we consider H 0 : p = 0.12, H a : p > 0.12. In our sample 19 of 100 drivers were on cell-phone. The TI 83/84 Plus output gives us: Alternative hypothesis (H a ) Value of test-statistic p-value Value of sample proportion Sample size Since p-value = 0.016 and α = 0.05, we reject H 0 at 5% level of significance, because p-value < α. Note that we would not have rejected H 0 if α = 0.01. 22

23 Test of 1-proportion with TI 83/84 Plus Let us test the problem of Example 1 (calling on cell-phone while driving) at 5% level of significance. Here we consider H 0 : p = 0.12, H a : p > 0.12. In our sample 19 of 100 drivers were on cell-phone. The TI 83/84 Plus output gives us: Alternative hypothesis (H a ) Value of test-statistic p-value Value of sample proportion Sample size 23

24 Example 2 24

25 Example 3 25

26 Tests for population mean 26

27 27

28 28

29 29 Alternative hypothesis Rejection region One-sided test (right) One-sided test (left) Two-sided test

30 30 Facebook Example

31 31 Facebook Example In Facebook Example: H 0 : µ = 130, H a : µ ≠ 130. In our sample n = 82, mean = 616.95, std. dev. = 447.05. Let us test at 5% level of significance (i.e. α = 0.05). The TI 83/84 Plus output gives us: Alternative hypothesis (H a ) Test statistic p-value Sample mean Sample size 31

32 32

33 33 Alternative hypothesis Rejection region One-sided test (right) One-sided test (left) Two-sided test

34 Example 4 34

35 35 Alternative hypothesis Rejection region One-sided test (right) One-sided test (left) Two-sided test

36 36 Example 5 Alternative hypothesis (H a ) Test statistic p-value Sample mean Sample standard deviation Sample size 36

37 Remark 37


Download ppt "STT 315 This lecture is based on Chapter 6. Acknowledgement: Author is thankful to Dr. Ashok Sinha, Dr. Jennifer Kaplan and Dr. Parthanil Roy for allowing."

Similar presentations


Ads by Google