hypothesis testing. the 2 nd type of formal statistical inference our goal is to assess the evidence...

19
Hypothesis Testing

Upload: cody-briggs

Post on 04-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

Hypothesis Testing

Page 2: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

The 2nd type of formal statistical inference

• Our goal is to assess the evidence provided by data from a sample about some claim concerning the population.

• Remember: We are asking ourselves “What would happen if we repeated the sample or the experiment many times?”

Page 3: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

Basic Idea

• An outcome that would rarely happen if a claim were true is good evidence that the claim is not true.

Page 4: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

Step by Step

• Anyone who plays or watches sports has heard of the “home field advantage.” Teams tend to win more often when they play at home. Or do they?

• If there were no home field advantage, the home teams would win about half of all games played. In the 2003 major league baseball season, there were 2429 regular season games. It turns out that the home team won 1335 of the 2429 games, or 54.96% of the time. Could this deviation from 50% be explained just from natural sampling variability, or is this evidence to suggest that there really is a home field advantage, at least in professional baseball?

Page 5: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

1-Name the test

• I want to know whether the home team in professional baseball is more likely to win. The parameter of interest is the proportion of home team wins.

• I will use a 1 Proportion Z Test.

Page 6: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

2-Check Assumptions

• Lucky for us the assumptions for inference procedures do not change whether you are creating a confidence interval or performing a hypothesis test.

• Therefore, the assumptions are:• Independence• Randomization• 10% rule• Normal condition

Page 7: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

3-State hypotheses

• Hypothesis n.;• Pl. {Hypotheses}.• A suposition; a proposition or principle which is supposed or

taken for granted in order to draw a conclusion or inference for proof of the point in question; something not proved, but assumed for the purpose of argument. -- Webster’s Unabridged Dictionary

• We will have 2 hypotheses:• The null hypothesis: States the status quo - Ho

• The alternative hypothesis: States the suspected change - Ha

Page 8: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

3-State hypotheses

• Hypotheses are always written using parameters!

• Our hypotheses would look like this:• Ho: p = .5• Ha: p > .5

• (this is known as a one-sided or one-tailed test)

• We always operate as if the Ho is true!!!!!!!!

Page 9: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

4-Calculate a test statistic

• We took a sample so let’s think about the sampling distribution for our sample proportion.

• Center• Spread• Shape• Find z. Z = our value – mean• standard deviation

Page 10: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

5-Make a picture

Page 11: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

6-Find a p-value

• Go to the table and find the correct probability from your picture.

• What does this p-value mean? It is the probability that the event we have just witnessed could have happened by chance.

Page 12: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

7-Make a decision

• Our decision will be one of the following:• Reject the null hypothesis• Fail to reject the null hypothesis

• How do we decide? We use our p-value.• If p is small, then we have evidence against the null

hypothesis and would reject it.• If p is large, then we do not have evidence against the

null hypothesis and we do not reject it.

Page 13: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

7-Make a decision

• Remember: Our data is only lending support to the

hypothesis. Does this prove the hypothesis is true? No. Even if a hypothesis is true, we can never prove it. When a hypothesis is false, however, we might be able to recognize that. When data are glaringly inconsistent with the hypothesis, it becomes clear that the hypothesis cannot be right. Then we can reject it.

Page 14: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

7-Make a decision

• If the p-value is low enough, then what we have observed would be very unlikely were the null model true, and so we will reject the null hypothesis.

• Sometimes we need to know how low is low enough. We will use α to represent the significance level.

• Our rule: If the p-value is less than α, then reject the null hypothesis. If no significance level is given, then use .05.

Page 15: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

Statistically Significant

• If a predetermined alpha level is given, then when our p-value is less than alpha , we deem our results to be statistically significant.

Page 16: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

What would convince you?

• A renowned musicologist claims that she can distinguish between the works of Mozart and Haydn simply by hearing a randomly selected 20 seconds of music from any work by either composer. She gets 9 out of 10 correct. P-value = .011 (In other words, if you tried to just guess, you’d get at least 9 out of 10 correct only about 1% of the time.)

• On the other hand, imagine a student who bets that he can make a flipped coin land the way he wants just by thinking hard. To test him, we flip a fair coin 10 times and he gets 9 right. P-value = .011

Page 17: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

What would convince you?

• A researcher claims that the proportion of college students who hold part-time jobs now is higher than the proportion known to hold such jobs a decade ago. You might be willing to believe the claim and reject the null hypothesis with a p-value of .1 or 10%.

• However, suppose an engineer claims that the proportion of rivets holding the wing on an airplane that are likely to fail is below the proportion at which the wing would fall off. What p-value would be small enough to get you to fly on that plane?

Page 18: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

8-Conclusion in context

• You know that this is always the last step to any problem!

• Always begin by talking about the evidence.

Page 19: Hypothesis Testing. The 2 nd type of formal statistical inference Our goal is to assess the evidence provided by data from a sample about some claim concerning

Mrs. Brown’s Great 8

• 1. Name the test• 2. Check the assumptions• 3. State the hypotheses• 4. Calculate a test statistic• 5. Draw a picture• 6. Find the p-value• 7. Make a decision• 8. Write a conclusion