Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 20 Testing hypotheses about proportions

Similar presentations


Presentation on theme: "Chapter 20 Testing hypotheses about proportions"— Presentation transcript:

1 Chapter 20 Testing hypotheses about proportions
Math2200

2 Example: Ingot Ingot: Huge pieces of metal
Cracking is a serious problem for metal manufactures 20% of the ingots have cracks The plant engineers try to reduce the crack rate by making some changes in the casting process 400 ingots have been cast and only 17% of them have cracked Real improvement or sampling variation? Has the cracking rate really decreased or was 17% just due to luck

3 Null vs Alternative A hypothesis proposes a model.
Our starting hypothesis is called the null hypothesis. The null hypothesis, that we denote by H0, specifies a population model parameter of interest and proposes a value for that parameter. We usually write down the null hypothesis in the form H0: parameter = hypothesized value. We are more concerned if the error occurs when the null hypothesis is true. The alternative hypothesis, which we denote by HA, contains the value of the parameter that we consider plausible when we reject the null hypothesis.

4 Ingot (cont’) H0: p=0.2 (cracking rate is still 20%)
HA: p<0.2 (cracking rate has decreased) If the observed cracking proportion is much lower than 0.2, we will reject the null hypothesis. But how low?

5 Ingot (cont’) Data: 17 out of 400 ingots have cracks
Sample size is big enough Independence is reasonable We can use normal model to approximate the distribution of the sample proportion Under the null hypothesis,

6 Ingot (cont’) Model of the sample proportion under the null hypothesis
Normal with mean p=0.2 and SD=0.02 How likely to observe a sample proportion is equal to or less than 0.17? Z-score Using a standard normal table or a calculator, the probability is 0.067

7 Hypothesis testing Hypothesis testing Think about jury trials
Prove something is correct (difficult) Recognize something is wrong (relatively easy) Think about jury trials The starting hypothesis: the defendant is innocent We retain the hypothesis until the facts make it unlikely beyond a reasonable doubt ‘not guilty’ only means not enough evidence to prove guilty. It does NOT say the defendant is innocent.

8 Hypothesis testing (cont’)
The same logic used in jury trials is used in statistical tests of hypotheses: We begin by assuming that a hypothesis is true. Next we consider whether the data are consistent with the hypothesis. If they are, all we can do is retain the hypothesis we started with. If they are not, then like a jury, we ask whether they are beyond a reasonable doubt. If the data seem consistent with what we would expect from natural sampling variability, we will retain the null hypothesis. If the probability of seeing results like our data is really low, we reject the hypothesis. The same logic used in jury trials is used in statistical tests of hypotheses: We begin by assuming that a hypothesis is true. Next we consider whether the data are consistent with the hypothesis. If they are, all we can do is retain the hypothesis we started with. If they are not, then like a jury, we ask whether they are beyond a reasonable doubt. If the data seem consistent with what we would expect from natural sampling variability, we will retain the null hypothesis. If the probability of seeing results like our data is really low, we reject the hypothesis.

9 What to Do with an “Innocent” Defendant
If the evidence is not strong enough to reject the presumption of innocent, the jury returns with a verdict of “not guilty.” The jury does not say that the defendant is innocent. All it says is that there is not enough evidence to convict, to reject innocence. The defendant may, in fact, be innocent, but the jury has no way to be sure. Said statistically, we will fail to reject the null hypothesis. We never declare the null hypothesis to be true, because we simply do not know whether it’s true or not. Sometimes in this case we say that the null hypothesis has been retained.

10 What to Do with an “Innocent” Defendant (cont.)
In a trial, the burden of proof is on the prosecution. In a hypothesis test, the burden of proof is on the unusual claim. The null hypothesis is the ordinary state of affairs, so it’s the alternative to the null hypothesis that we consider unusual (and for which we must marshal evidence).

11 P-value The probability that the observed statistic value and even more extreme values could occur if the null hypothesis is true. Always report the P-value with the conclusion.

12 Ingot P-value is 0.067. 6.7% rare enough?
‘Beyond a reasonable doubt’? Usually, P-value less than 0.05 is regarded as ‘small’ We fail to reject the null hypothesis. That is, we fail to conclude that the technical change in the production process reduces the cracking rate. Sometimes, cutoff values of 0.1 or 0.01 are also used Always report p-values so that people using different cutoff values can have their own conclusions P-value is Then you have to decide whether an event that would happen 6.7% of the time by chance is strong enough evidence. ‘Beyond a reasonable doubt’? Usually, P-value less than 0.05 is regarded as ‘small’ We fail to reject the null hypothesis. That is, we fail to conclude that the technical change in the production process reduces the cracking rate. Sometimes, cutoff values of 0.1 or 0.01 are also used Always report p-values so that people using different cutoff values can have their own conclusions

13 The Reasoning of Hypothesis Testing
There are four basic parts to a hypothesis test: Hypotheses Model Mechanics Conclusion Let’s look at these parts in detail…

14 The Reasoning of Hypothesis Testing (cont.)
Hypotheses The null hypothesis: To perform a hypothesis test, we must first translate our question of interest into a statement about model parameters. In general, we have H0: parameter = hypothesized value. The alternative hypothesis: The alternative hypothesis, HA, contains the values of the parameter we consider plausible if we reject the null.

15 The Reasoning of Hypothesis Testing (cont.)
Model To plan a statistical hypothesis test, specify the model you will use to test the null hypothesis and the parameter of interest. All models require assumptions, so state the assumptions and check any corresponding conditions. Model To plan a statistical hypothesis test, specify the model you will use to test the null hypothesis and the parameter of interest. All models require assumptions, so state the assumptions and check any corresponding conditions. Your plan should end with a statement like Because the conditions are satisfied, I can model the sampling distribution of the proportion with a Normal model. Watch out, though. It might be the case that your model step ends with “Because the conditions are not satisfied, I can’t proceed with the text.” If that’s the case, stop and reconsider.

16 The Reasoning of Hypothesis Testing (cont.)
Model Each test we discuss in the book has a name that you should include in your report. The test about proportions is called a one-proportion z-test.

17 One-Proportion z-Test
The conditions for the one-proportion z-test are the same as for the one proportion z-interval. We test the hypothesis H0: p = p0 using the statistic where When the conditions are met and the null hypothesis is true, this statistic follows the standard Normal model, so we can use that model to obtain a P-value.

18 The Reasoning of Hypothesis Testing (cont.)
Mechanics calculate of our test statistic from the data. Different tests have different formulas and different test statistics. Usually handled by a statistics program or calculator. The ultimate goal of the calculation is to obtain a P-value. Under “mechanics” we place the actual calculation of our test statistic from the data. Different tests will have different formulas and different test statistics. Usually, the mechanics are handled by a statistics program or calculator, but it’s good to know the formulas. The ultimate goal of the calculation is to obtain a P-value. The P-value is the probability that the observed statistic value and even more extreme values could occur if the null model were correct. If the P-value is small enough, we’ll reject the null hypothesis. Note: The P-value is a conditional probability—it’s the probability that the observed results could have happened if the null hypothesis is true.

19 The Reasoning of Hypothesis Testing (cont.)
Conclusion The conclusion in a hypothesis test is always a statement about the null hypothesis. The conclusion must state either that we reject or that we fail to reject the null hypothesis. The conclusion should be stated in context.

20 Alternative hypotheses
There are three possible alternative hypotheses: HA: parameter < hypothesized value HA: parameter ≠ hypothesized value HA: parameter > hypothesized value

21 Alternative hypotheses (cont.)
HA: parameter ≠ value is known as a two-sided alternative because we are equally interested in deviations on either side of the null hypothesis value. For two-sided alternatives, the P-value is the probability of deviating in either direction from the null hypothesis value. We’ll use this alternative hypotheses if we are interested in whether the new casting process either increases or decreases the cracking rate.

22 Alternative hypotheses (cont.)
The other two alternative hypotheses are called one-sided alternatives. A one-sided alternative focuses on deviations from the null hypothesis value in only one direction. Thus, the P-value for one-sided alternatives is the probability of deviating only in the direction of the alternative away from the null hypothesis value.

23 P-Values and Decisions: What to Tell About a Hypothesis Test
How small should the P-value be in order for you to reject the null hypothesis? Our decision criterion is context-dependent. Another factor in choosing a P-value is the importance of the issue being tested. How small should the P-value be in order for you to reject the null hypothesis? It turns out that our decision criterion is context-dependent. When we’re screening for a disease and want to be sure we treat all those who are sick, we may be willing to reject the null hypothesis of no disease with a fairly large P-value. A longstanding hypothesis, believed by many to be true, needs stronger evidence (and a correspondingly small P-value) to reject it. Another factor in choosing a P-value is the importance of the issue being tested.

24 P-Values and Decisions (cont.)
Your conclusion about any null hypothesis should be accompanied by the P-value of the test. If possible, it should also include a confidence interval for the parameter of interest. Don’t just declare the null hypothesis rejected or not rejected. Report the P-value to show the strength of the evidence against the hypothesis. This will let each reader decide whether or not to reject the null hypothesis.

25 Example: Baby gender Some culture value male children more highly than female children. In 1993 in one hospital, 313 (56.9%) of the 550 live births that year were boys Baseline for this region is 51.7% male live births Is the sample proportion of 56.9% evidence of a higher proportion of male births?

26 Baby gender (cont’) H0 : p=0.517 versus HA : p>0.517
Checking assumptions Independence Random sampling 10% condition Success/failure condition The sample proportion has a normal model when the above conditions are satisfied

27 Baby gender (cont’) One-proportion z-test
The model under the null hypothesis is normal with mean and sd Z-score is 2.44 One-sided alternative P-value is

28 TI-83 STAT TESTS 5:1-PropZTest Enter observed value of x (counts)
Specify the sample size n Choose from One-tail lower tail (one-sided alternative) Two-tail (two-sided alternative) One-tail upper tail (one-sided alternative)

29 Baby gender (cont’) Conclusion
If the true proportion of male babies were still at 51.7%, an observed proportion of 56.9% male babies would occur at random only about 7 times in This suggests that the birth ratio of boys to girls is not equal to its natural level, but rather has increased.

30 What Can Go Wrong? Don’t base your null hypothesis or alternative hypothesis on what you see in the data. You are not allowed to look at the data first and then adjust your null or alternative hypotheses.

31 What Can Go Wrong? (cont.)
Don’t make your null hypothesis what you want to show to be true. You can reject the null hypothesis, but you can never “accept” or “prove” the null. Don’t forget to check the conditions. We need randomization, independence, and a sample that is large enough to justify the use of the Normal model.

32 What have we learned? We can use what we see in a random sample to test a particular hypothesis about the world. Testing a hypothesis involves proposing a model, and seeing whether the data we observe are consistent with that model or so unusual that we must reject it. We do this by finding a P-value—the probability that data like ours could have occurred if the model is correct.

33 What have we learned? (cont.)
We’ve learned the process of hypothesis testing, from developing the hypotheses to stating our conclusion in the context of the original question.


Download ppt "Chapter 20 Testing hypotheses about proportions"

Similar presentations


Ads by Google