200 likes | 289 Views
Please turn off cell phones, pagers, etc. The lecture will begin shortly. Lecture 23. This lecture will cover some background material that will help us to understand Chapter 13. 1. Inferences about proportions. 2. Hypothesis testing. 3. Test for independence in a 2×2 table.
E N D
Please turn off cell phones, pagers, etc. The lecture will begin shortly.
Lecture 23 This lecture will cover some background material that will help us to understand Chapter 13. 1. Inferences about proportions 2. Hypothesis testing 3. Test for independence in a 2×2 table
1. Inferences about proportions Suppose that we examine data from a sample and discover something interesting. For example: • One baseball player has a higher batting average than another in the first three weeks of the season • Those who consume alcohol in small to moderate amounts have lower rate of heart disease than those who do not • Amount of television watched by school children is negatively correlated with grades These observations may be true for our sample. But are they true for the whole population?
Statistical inference We know what the value of a statistic (mean, correlation coefficient, proportion, relative risk, odds ratio) is in our sample. But we do not know what it is in the full population. Statistical inference is to make meaningful statements about the population based on what we observe in a sample. In other words, statistical inference is to generalize from our sample to the whole population. Inference requires us to know something about sampling error and sampling variation.
Sampling error A quantity computed from a sample (mean, correlation coefficient, relative risk, odds ratio, etc.) is not identical to the quantity that we would get from the entire population. For example, if our sample shows a relative risk of 1.2, that does not mean that the relative risk in the population is 1.2. If the sample is truly representative (i.e., randomly drawn from) the population, then the relative risk in the population should be close to the sample value of RR=1.2. But how close will it be? The difference between a quantity estimated from a sample and the quantity that we would get if we could use the entire sample is called sampling error.
16 100 Example Scores on the Stanford-Binet IQ test are normally distributed in the population with mean 100 and standard deviation 16. If we give this test to a sample of n = 100 subjects, the mean score in our sample could be exactly 100. But more likely, it will be something like 98.7, 100.4, 101.2 or 99.3. If the sample mean is… then the sampling error is… 98.7 98.7 – 100 = – 1.3 100.4 100.4 – 100 = 0.4 101.2 101.2 – 100 = 1.2 99.3 99.3 – 100 = – 0.7
How can we draw inferences? Most of the time, we do not know what the sampling error is, because the population mean (or the population correlation coefficient, relative risk, odds ratio, etc.) is unknown. We know what the value is in our sample. But we do not know what it is in the full population. So how can we draw inferences? To draw inferences about a population from a single sample, we must know something about sampling variation. That is, we need to know how large the sampling errors tend to be in samples as large as ours.
Inferences about proportions Early in the semester (Lectures 4-5), we learned the margin of error for a percentage from a simple random sample: If the number of units in the sample is n, then the margin of error for a percentage is approximately 100 / sqrt( n ). Based on this, we could compute the range of likely values for the percentage in the population. The range of likely values goes from sample percentage – margin of error to sample percentage + margin of error
Legal abortion for any reason Yes No Total Men 215 269 484 Women 172 244 416 Total 387 513 900 Let’s apply this method to data from 2×2 tables to make some inferences about various populations. Example “Should it be possible for a pregnant woman to obtain a legal abortion if the woman wants it for any reason?” The subjects in this study are essentially a simple random sample of American adults. We can use it to draw inferences about the full population of adults. We can also use it to draw inferences about adult men and adult women.
Legal abortion for any reason Yes No Total Men 215 269 484 Women 172 244 416 Total 387 513 900 All adults: Estimated rate of support is 387 / 900 = 0.43 = 43% The margin of error is 100 / sqrt(900) = 100 / 30 = 3.3 % So we are quite sure that the rate of support in the population lies between 43 – 3.3 = 39.7% and 43 + 3.3 = 46.3%.
Legal abortion for any reason Yes No Total Men 215 269 484 Women 172 244 416 Total 387 513 900 Adult men: Estimated rate of support is 215 / 484 = 0.43 = 44.4% The margin of error is 100 / sqrt(484) = 100 / 22 = 4.5 % So we are quite sure that the rate of support among men lies between 44.4 – 4.5 = 39.9% and 44.4 + 4.5 = 48.9%.
Legal abortion for any reason Yes No Total Men 215 269 484 Women 172 244 416 Total 387 513 900 Adult women: Estimated rate of support is 172 / 416 = 0.413 = 41.3% The margin of error is 100 / sqrt(416) = 100 / 20.4 = 4.9 % So we are quite sure that the rate of support among women lies between 41.3 – 4.9 = 36.4% and 41.3 + 4.9 = 46.2%.
Est. % Range Men 44.4 39.9 48.9 Women 41.3 36.4 46.2 Adults 43.0 39.7 46.3 Create a table of estimates and ranges: Notice that none of the three ranges covers 50%. From this sample, we may safely conclude that adults who support legalized abortion “for any reason” are a minority of adults. We may also conclude that supporting legalized abortion “for any reason” is a minority view among men, and it is also a minority view among women.
Est. % Range Men 44.4 39.9 48.9 Women 41.3 36.4 46.2 Adults 43.0 39.7 46.3 Is there a difference between men and women? Notice that the rate of support is higher among men than among women. The difference in percentages is 44.4 – 41.3 = 2.1%. The relative risk is 44.4 / 41.3 = 1.07. The odds ratio (which we can find from the 2×2 table) is 1.13.
Est. % Range Men 44.4 39.9 48.9 Women 41.3 36.4 46.2 Adults 43.0 39.7 46.3 Is it safe for us to conclude that support of legalized abortion “for any reason” is higher among men than among women in the population? One way to decide is to compute a range of likely values for the difference in percentages, for the relative risk, or for the odds ratio. Formulas for these ranges do exist, but they are a bit complicated. Instead, we will answer this question by a different approach called hypothesis testing.
2. Hypothesis testing Hypothesis testing helps us to decide whether an interesting effect that we see in a sample also holds in the population. To perform a hypothesis test, we need to formulate a null hypothesis and an alternative hypothesis. The null hypothesis is that the interesting effect that we see in the sample is not real (i.e., that it does not hold in the population). The alternative hypothesis is that the interesting effect is real (i.e., that it does hold in the population). If the evidence against the null hypothesis is strong, then we reject the null and accept the alternative.
Example Without realizing it, we have already been performing simple hypothesis tests about population proportions. From the opinion poll, we concluded that adults who favor legalized abortion “for any reason” are in the minority. In effect, we set up the following null hypothesis: The rate of support of legalized abortion in the adult population is exactly 50%. We didn’t set up this null hypothesis because we thought that it was true. Rather, we set it up as a “straw man,” to see if we could disprove it with evidence from the data.
The alternative hypothesis was: The rate of support of legalized abortion in the adult population is not 50%, but something higher or something lower. From the sample, we computed the estimated rate of support and the range of likely values. The estimated rate of support was 43%, which provided some evidence that the null hypothesis is false. But the most powerful evidence came from the range of likely values: 39.7% to 46.3%. This range did not cover the null value of 50%. So we could safely reject the null hypothesis and accept the alternative.
Other null hypotheses “The population rate is 50%” is perhaps the most common null hypothesis concerning a rate or proportion. But on occasion, null values other than 50% may be of interest. Suppose an abortion-rights group has claimed: “An overwhelming majority of the American public—more than 70%—support a a woman’s right to choose abortion for any reason.” Or, suppose that an anti-abortion group has claimed: “By a 2:1 margin, the American public overwhelmingly rejects the idea of abortion on demand.” To see if the first claim is plausible, we could test the null hypotheses that the true percentage is 70%. To see if the second claim is plausible, the null hypothesis would be 33%.
The range of likely values (39.7% to 46.3%) does not cover the null value of 70%, nor does it cover the null value of 33%. In this case, the data would not support the claim of either group.