The Practice of Statistics in the Life Sciences Fourth Edition

Slides:



Advertisements
Similar presentations
Comparing Two Proportions
Advertisements

From the Data at Hand to the World at Large Chapters 19, 23 Confidence Intervals Estimation of population parameters: an unknown population proportion.
Inference for Proportions Inference for a Single Proportion
Inference about a population proportion Chapter 20 © 2006 W.H. Freeman and Company.
Warm-up An experiment on the side effects of pain relievers assigned arthritis patients to one of several over-the-counter pain medications. Of the 440.
LECTURE UNIT 5 Confidence Intervals (application of the Central Limit Theorem) Sections 5.1, 5.2 Introduction and Confidence Intervals for Proportions.
Chapter 20 Testing Hypotheses about Proportions 1.
From the Data at Hand to the World at Large Chapter 19 Confidence Intervals for an Unknown Population p Estimation of a population parameter: Estimating.
Confidence Intervals Mrs. Medina.
Inference for proportions - Comparing 2 proportions IPS chapter 8.2 © 2006 W.H. Freeman and Company.
Inference for proportions - Comparing 2 proportions IPS chapter 8.2 © 2006 W.H. Freeman and Company.
Comparing 2 proportions BPS chapter 21 © 2006 W. H. Freeman and Company These PowerPoint files were developed by Brigitte Baldi at the University of California,
Inferences Based on Two Samples
Inference about a population proportion BPS chapter 20 © 2006 W.H. Freeman and Company.
8.1 Inference for a Single Proportion
Inference for proportions - Inference for a single proportion IPS chapter 8.1 © 2006 W.H. Freeman and Company.
CHAPTER 20: Inference About a Population Proportion ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
The Practice of Statistics Third Edition Chapter 13: Comparing Two Population Parameters Copyright © 2008 by W. H. Freeman & Company Daniel S. Yates.
Objectives (BPS chapter 20) Inference for a population proportion  The sample proportion  The sampling distribution of  Large sample confidence interval.
Chapter 10: Comparing Two Populations or Groups
Chapter 8 Testing Hypotheses about Proportions Part II: Significance Levels, Type I and Type II Errors, Power 1.
CHAPTER 20: Inference About a Population Proportion ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
Comparing 2 Proportions © 2006 W.H. Freeman and Company.
From the Data at Hand to the World at Large Chapter 19 Confidence Intervals for an Unknown Population p Estimation of a population parameter: Estimating.
Lecture Unit 5 Section 5.4 Testing Hypotheses about Proportions 1.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.1 Categorical Response: Comparing Two Proportions.
Statistics for Business and Economics Module 1:Probability Theory and Statistical Inference Spring 2010 Lecture 8: Tests of significance and confidence.
AP STATISTICS COMPARING TWO PROPORTIONS Chapter 22.
Objectives (PSLS Chapter 19) Inference for a population proportion  Conditions for inference on proportions  The sample proportion (p hat )  The sampling.
Objectives (Chapter 20) Comparing two proportions  Comparing 2 independent samples  Confidence interval for 2 proportion  Large sample method  Plus.
Class Six Turn In: Chapter 15: 30, 32, 38, 44, 48, 50 Chapter 17: 28, 38, 44 For Class Seven: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 Read.
Confidence Interval for a Proportion Adapted from North Carolina State University.
20. Comparing two proportions
Inference for a Single Population Proportion (p)
Chapter Nine Hypothesis Testing.
21. The chi-square test for goodness of fit
Warm-up An experiment on the side effects of pain relievers assigned arthritis patients to one of several over-the-counter pain medications. Of the 440.
Chapter 10: Comparing Two Populations or Groups
Chapter 19 Testing Hypotheses about Proportions
AP Statistics Comparing Two Proportions
AP Stats Check In Where we’ve been…
Chapter 8: Inference for Proportions
Chapter 6 Testing Hypotheses about Proportions
Chapter 10: Comparing Two Populations or Groups
Chapter 8 Inference for Proportions
Tests of significance: The basics
CHAPTER 21: Comparing Two Means
Unit 6 - Comparing Two Populations or Groups
CHAPTER 20: Inference About a Population Proportion
CHAPTER 22: Inference about a Population Proportion
Essential Statistics Introduction to Inference
The Practice of Statistics in the Life Sciences Fourth Edition
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 8 Inference for Proportions
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Objectives 7.1 Inference for the mean of a population
Chapter 10: Comparing Two Populations or Groups
Chapter 10: Comparing Two Populations or Groups
Objectives 6.1 Estimating with confidence Statistical confidence
Chapter 10: Comparing Two Populations or Groups
Objectives 6.1 Estimating with confidence Statistical confidence
Chapter 10: Comparing Two Populations or Groups
Presentation transcript:

The Practice of Statistics in the Life Sciences Fourth Edition Chapter 19: Inference about a population proportion Copyright © 2018 W. H. Freeman and Company

Objectives Inference for a population proportion The sample proportion p̂ Large sample confidence intervals for a proportion More accurate confidence intervals for a proportion Choosing the sample size Hypothesis tests for a proportion

Conditions for inference on proportions Assumptions The data used for the estimate are a random sample from the population studied. The population is at least 20 times as large as the sample. This ensures independence of successive trials in the random sampling. The sample size n is large enough that the shape of the sampling distribution is approximately Normal. How large depends on the type of inference conducted.

The sample proportion 𝑝 We now study categorical data and draw inference on the proportion, or percentage, of the population with a specific characteristic. If we call a given categorical characteristic in the population “success,” then the sample proportion of successes, 𝑝 is: 𝑝 = count of successes in the sample count of observations in the samle We treat a group of 120 Herpes patients with a new drug; 30 get better: 𝑝 = (30)/(120) = 0.25 (proportion of patients improving in sample)

Sampling distribution of 𝑝 (1 of 2) The sampling distribution of p̂ is never exactly Normal. But for large enough sample sizes, it can be approximated by a Normal curve.

Sampling distribution of 𝑝 (2 of 2) The mean and standard deviation (width) of the sampling distribution are both completely determined by p and n. 𝑁 𝑝, 𝑝 1−𝑝 𝑛 Therefore, we won’t need to use a t distribution (unlike with inference for means). Thus, we have only one population parameter to estimate, p.

Confidence interval for p (1 of 2) When p is unknown, both the center and the spread of the sampling distribution are unknown, which presents a problem. We need to “guess” a value for p.

Confidence interval for p (2 of 2) Our options: Use 𝑝 , the sample proportion. This is the “large sample method”. It performs poorly unless n is extremely large. Use 𝑝 , an improved estimate of p. This is the “plus four method”. It is reasonably accurate, even for samples as small as 10.

Large sample confidence interval for p Confidence intervals contain the population proportion p in C% of samples. For an SRS of size n drawn from a large population and with sample proportion p̂ calculated from the data, an approximate level C confidence interval for p is 𝐶𝐼: 𝑝 ±𝑚, with 𝑚= 𝑧 ∗ 𝑆 𝐸= 𝑧 ∗ 𝑝 1− 𝑝 /𝑛 Use this method when the number of successes and the number of failures are both at least 15.

Large sample confidence interval example (1 of 4) Medication side effects Arthritis is a painful, chronic inflammation of the joints. An experiment on the side effects of pain relievers examined arthritis patients to find the proportion of patients who suffer side effects. We wish to compute a 90% confidence interval for the population proportion of arthritis patients who suffer some "adverse symptoms."

Large sample confidence interval example (2 of 4) What are some side effects of ibuprofen? Serious side effects (seek medical attention immediately): Allergic reactions Muscle cramps, numbness, or tingling Ulcers (open sores) in the mouth Rapid weight gain (fluid retention) Seizures

Large sample confidence interval example (3 of 4) Black, bloody, or tarry stools Blood in your urine or vomit Decreased hearing or ringing in the ears Jaundice (yellowing of the skin or eyes) Abdominal cramping, indigestion, or heartburn

Large sample confidence interval example (4 of 4) Less serious side effects (discuss with your doctor): Dizziness or headache Nausea, gaseousness, diarrhea, or constipation Depression Fatigue or weakness Dry mouth Irregular menstrual periods

Large sample example (1 of 2) What is the sample proportion p̂ ? 𝑝 = 23 440 ≈0.052 For a 90% confidence level, z* = 1.645.

Large sample example (2 of 2) Using the large sample method: 𝑚= 𝑧 ∗ 𝑝 1− 𝑝 /𝑛 𝑚= 1.645 ∗ 0.052 1−0.052 440 𝑚= 1.645 ∗ 0.0106≈0.017 90% CI for 𝑝: 𝑝 ±𝑚 0.052±0.017  With 90% confidence level, between 3.5% and 6.9% of arthritis patients taking this pain medication experience some adverse symptoms.

“Plus Four” confidence interval for p (1 of 2) The “plus four” method gives more accurate confidence intervals than the large sample method. We act as if we had four additional observations, two successes and two failures. Thus, the new sample size is n + 4 and the count of successes is X + 2. The “plus four” estimate of p is: 𝑝 = count of successes+2 count of all observations+4

“Plus Four” confidence interval for p (2 of 2) An approximate level C confidence interval is: 𝐶𝐼: 𝑝 ±𝑚, with 𝑚= 𝑧 ∗ 𝑆 𝐸= 𝑧 ∗ 𝑝 1− 𝑝 𝑛+4 Use this method when C is at least 90% and sample size is at least 10.

“Plus Four” confidence interval example (1 of 2) We want a 90% CI for the population proportion of arthritis patients who suffer some “adverse symptoms.” What is the value of the “plus four” estimate of p? 𝑝 = 23+2 440+4 = 25 444 ≈0.056 An approximate 90% confidence interval for p using the “plus four” method is: 𝑚= 𝑧 ∗ 𝑝 1− 𝑝 / 𝑛+4 𝑚= 1.645 ∗ 0.056 1−0.056 444 𝑚= 1.645 ∗ 0.011≈0.018 90% 𝐶𝐼 for 𝑝: 𝑝 ±𝑚 0.056±0.018

“Plus Four” confidence interval example (2 of 2)  With 90% confidence, between 3.8% and 7.4% of the population of arthritis patients taking this pain medication experience some adverse symptoms.

Choosing the sample size You may need to choose a sample size large enough to achieve a specified margin of error. Because the sampling distribution of p̂ is a function of the unknown population proportion p this process requires that you guess a likely value for p: p*. 𝑝~𝑁 𝑝, 𝑝 1−𝑝 𝑛 →𝑛= 𝑧 ∗ 𝑚 2 𝑝 ∗ 1− 𝑝 ∗ Try this out: the value p*(1 − p*) is greatest when p* = 0.5. Make an educated guess, or use p* = 0.5 (most conservative estimate).

Choosing the sample size—example (1 of 2) What sample size would we need in order to achieve a margin of error no more than 0.01 (1 percentage point) with a 90% confidence level? We could use 0.5 for our guessed p*. However, since the drug has been approved for sale over the counter, we can safely assume that no more than 10% of patients should suffer “adverse symptoms” (a better guess than 50%). For a 90% confidence level, z* = 1.645. Note: For a 0.03 margin of error we would need only 271 arthritis patients—do the calculations and check your answer. Confidence level C 90% 95% 99% Critical value z* 1.645 1.960 2.576

Choosing the sample size—example (2 of 2) 𝑛= 𝑧 ∗ 𝑚 2 𝑝 ∗ 1− 𝑝 ∗ = 1.645 0.01 2 0.01 0.09 ≈2434.4  To obtain a margin of error no more than 0.01, we need a sample size n of at least 2435 arthritis patients. [Note: Using 0.5 for the guess would have resulted in a sample size of 6766 patients.] Note: For a 0.03 margin of error we would need only 271 arthritis patients—do the calculations and check your answer.

Hypothesis tests for p When testing: H0: p = p0 (a given value we are testing) If H0 is true, the sampling distribution is known. The test statistic is the standardized value of 𝑝 . 𝑧= 𝑝 − 𝑝 0 𝑝 0 1− 𝑝 0 𝑛 This is valid when both expected counts—expected successes np0 and expected failures n(1 − p0)—are each 10 or larger.

P-values for one- or two-sided alternatives (1 of 2) The P-value is the probability, if H0 was true, of obtaining a test statistic like the one computed or more extreme in the direction of Ha. And as always, if the P-value is smaller than the chosen significance level a, the effect is statistically significant and we reject H0.

P-values for one- or two-sided alternatives (2 of 2) And as always, if the P-value is smaller than the chosen significance level a, the effect is statistically significant and we reject H0.

Hypothesis test example (1 of 2) Aphids evade predators (ladybugs) by dropping off the leaf. An experiment examined the mechanism of aphid drops. When dropped upside-down from delicate tweezers, live aphids landed on their ventral side in 95% of the trials (19 out of 20). In contrast, dead aphids landed on their ventral side in 52.2% of the trials (12 out of 23). Is there evidence (at significance level 5%) that live aphids land right side up (on their ventral side) more often than chance would predict?

Hypothesis test example (2 of 2) Here, “chance” would be 50% ventral landings. So we test: 𝐻 0 :𝑝=0.5 versus 𝐻 𝑎 :𝑝>0.5 𝑧= 𝑝 − 𝑝 0 𝑝 0 1− 𝑝 0 𝑛 = 0.95−0.5 0.5×0.5 20 ≈4.02 The expected counts of success and failure are each 10, so the z procedure is valid. The test P-value is P(z = 4.02). From Table B, P = 1 – P(z < 4.02) < 0.0002, highly significant. We reject H0. There is very strong evidence (P < 0.0002) that the righting behavior of live aphids is better than chance.

Another hypothesis test example (1 of 2) Mendel’s first law of genetic inheritance states that crossing dominant and recessive homozygote parents yields a second generation made of 75% of dominant-trait individuals. When Mendel crossed pure breeds of plants producing smooth peas and plants producing wrinkled peas, the second generation (F2), was made of 5474 smooth peas and 1850 wrinkled peas. Do these data provide evidence that the proportion of smooth peas in the F2 population is not 75%? The sample proportion of smooth peas is: 𝑝 = 5474 5474+1850 =0.7474

Another hypothesis test example (2 of 2) We test: 𝐻 0 :𝑝=0.75 versus 𝐻 𝑎 :𝑝≠0.75 𝑧= 𝑝 − 𝑝 0 𝑝 0 1− 𝑝 0 𝑛 = 0.7474−0.75 0.75×0.25 7324 =−0.513 However, it is important to remember that we cannot “prove” that the null hypothesis is true, only that it is a possibility. From Table B, we find P = 2P(z < –0.51) = 2 × 0.3050 = 0.61, not significant. We fail to reject H0. The data are consistent with a dominant-recessive genetic model.

The Practice of Statistics in the Life Sciences Fourth Edition Chapter 20: Comparing two proportions Copyright © 2018 W. H. Freeman and Company

Objectives Comparing two proportions Two sample problems: proportions The sampling distribution of the difference between two proportions Large sample confidence intervals for comparing proportions More accurate confidence intervals for comparing proportions Hypothesis tests for comparing proportions Relative risk and odds ratio

Comparing two independent samples We often need to compare two treatments with two independent samples. For large enough samples, the sampling distribution of is approximately Normal. However, neither p1 nor p2 are known.

Large sample CI for two proportions For two independent SRSs of sizes n1 and n2 with sample proportions of successes 𝑝 1 and 𝑝 2 respectively, an approximate level C confidence interval for p1 – p2 is 𝑝 1 − 𝑝 2 ±𝑚, 𝑚 is the margin of error 𝑚= 𝑧 ∗ 𝑆𝐸 𝑑𝑖𝑓𝑓 = 𝑧 ∗ 𝑝 1 1− 𝑝 1 𝑛 1 + 𝑝 2 1− 𝑝 2 𝑛 2 C is the area under the standard Normal curve between −z* and z*. Use this method when the number of successes and the number of failures are each at least 10 in each sample.

Large sample CI example (1 of 2) How much does the cholesterol-lowering drug Gemfibrozil help reduce the risk of heart attack? We compare the incidence of heart attack over a 5-year period for 2 random samples of middle-aged men taking either the drug or a placebo. Standard error of the difference 𝑝 1 – 𝑝 2 : The confidence interval is

Large sample CI example (2 of 2) H. attack n p̂ Drug 56 2051 2.73% Placebo 84 2030 4.14% So the 90% CI is (0.0414 − 0.0273) ± 1.645*0.0057 = 0.014 ± 0.009 We are 90% confident that the percent of middle-age men who suffer a heart attack is 0.5 to 2.3 percentage points lower when taking the cholesterol-lowering drug than when taking a placebo.

“Plus four” CI for two proportions The “plus four” method again produces more accurate confidence intervals. We act as if we had four additional observations: one success and one failure in each of the two samples. The new combined sample size is 𝑛 1 + 𝑛 2 + 4 and the proportions of successes are: 𝑝 1 = 𝑋 1 +1 𝑛 1 +2 and 𝑝 2 = 𝑋 2 +1 𝑛 2 +2 An approximate level C confidence interval is: Use this when C is at least 90% and both sample sizes are at least 5.

“Plus four” CI example (1 of 2) Researchers compared oral health in 46 young adult males wearing a tongue piercing (TP) and a control group of 46 young adult males without tongue piercing. They found that 38 individuals in the TP group and 26 in the control group had enamel cracks. We want to estimate with 95% confidence the difference between the proportions of individuals with enamel cracks among young adult males with and without TP. One count is too low for the large sample method, so we use the plus-four method. The lowest count is 8, which is too low for the large sample method.

“Plus four” CI example (2 of 2) 𝑝 𝑇𝑃 = 38+1 46+2 =0.8125; 𝑝 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 = 26+1 46+2 =0.5625; 𝑝 𝑇𝑃 − 𝑝 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 =0.25 𝑚= 𝑧 ∗ 𝑝 𝑇𝑃 1− 𝑝 𝑇𝑃 𝑛 𝑇𝑃 +2 + 𝑝 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 1− 𝑝 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 𝑛 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 +2 𝑚=1.96 0.8125 0.1875 48 + 0.5625 0.3775 48 ≈0.1786 95% 𝐶𝐼 for 𝑝 𝑇𝑃 − 𝑝 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 :0.25±0.179, or 0.071,0.429 The lowest count is 8, which is too low for the large sample method. We are 95% confident that the percent of young adult males with a tongue piercing who have enamel cracks is about 7 to 43 percentage points greater than the percent with enamel cracks among young adult males without a tongue piercing.

Hypothesis tests for two proportions We test: H0: p1 = p2 = p If H0 is true, we are sampling twice from the same population and we can pool the information from both samples to estimate p. The pooled sample proportion 𝑝 is 𝑝 = total successes total observations = count 1 + count 2 𝑛 1 + 𝑛 2 →𝑧= 𝑝 1 + 𝑝 2 𝑝 1− 𝑝 1 𝑛 1 + 1 𝑛 2 Appropriate when all counts (successes and failures in each sample) are 5 or more.

Hypothesis test example (1 of 3) Gastric freezing was once a treatment for ulcers. Patients would swallow a deflated balloon with tubes to cool the stomach for an hour in hope of reducing acid production and relieving ulcer pain.The treatment was shown to be safe and significantly reduced ulcer pain and was widely used for years. A randomized comparative experiment later compared the outcome of gastric freezing with that of a placebo: 28 of the 82 patients subjected to gastric freezing improved, while 30 of the 78 in the control group improved. H0: pgf = pplacebo Ha: pgf > pplacebo

Hypothesis text example (2 of 3) Results: 28 of the 82 patients subjected to gastric freezing improved 30 of the 78 patients in the control group improved H0: pgf = pplacebo Ha: pgf > pplacebo

Hypothesis text example (3 of 3) The P-value is greater than 50%...  Gastric freezing was not significantly better than a placebo (P-value > 0.1), and this treatment was abandoned. ALWAYS USE A CONTROL!!!

Relative risk and odds ratio In the health sciences, we often compare a given health risk in the treatment group with the same risk in the control group. One measure of this is the Relative Risk Reduction (RRR), which indicates how better off you would be relative to receiving a placebo or control treatment.

Relative risk example (1 of 4) How much does the cholesterol-lowering drug Gemfibrozil help reduce the risk of heart attack? We compare the incidence of heart attack over a 5-year period for two random samples of middle-aged men taking either the drug or a placebo. H. attack No H.A. n p̂ Drug 56 1995 2051 2.73% Placebo 84 1946 2030 4.14%

Relative risk example (2 of 4) The drug Gemfibrozil reduces the risk of a heart attack in middle-aged men by about 34% over a 5-year period of continuous treatment, compared with middle-aged men taking a placebo (RRR = 34%). That is, the risk of a heart attack over that period is 34% smaller in the Gemfibrozil group than in the placebo group.

Relative risk example (3 of 4) The Absolute Risk Reduction (ARR) is simply the absolute difference in outcome rates between the control and treatment groups: The Number Needed to Treat (NNT) is the number of patients that would need to be treated to prevent one additional negative outcome. NNT=1/ARR ARR and NNT are better indicators of treatment efficacy than RRR.

Relative risk example (4 of 4) H. attack No H.A. n p̂ Drug 56 1995 2051 2.73% Placebo 84 1946 2030 4.14% The group taking Gemfibrozil had a rate of heart attack 1.4 percentage point lower than that of the placebo group (ARR = 1.4%). Pharmaceutical companies typically report the “relative risk reduction,” which makes the treatment effect appear much more impressive. There is growing recognition that NNT is the more intuitive summary of the three. The website www.thennet.com offers lots of examples. On average, we need to treat 71 men for 5 years with Gemfibrozil to avoid 1 heart attack (NNT = 71).