Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Practice of Statistics in the Life Sciences Fourth Edition

Similar presentations


Presentation on theme: "The Practice of Statistics in the Life Sciences Fourth Edition"— Presentation transcript:

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

2 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

3 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.

4 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)

5 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.

6 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.

7 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.

8 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.

9 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.

10 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."

11 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

12 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

13 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

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

15 Large sample example (2 of 2)
Using the large sample method: 𝑚= 𝑧 ∗ 𝑝 1− 𝑝 /𝑛 𝑚= ∗ − 𝑚= ∗ ≈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.

16 “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

17 “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.

18 “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? 𝑝 = = ≈0.056 An approximate 90% confidence interval for p using the “plus four” method is: 𝑚= 𝑧 ∗ 𝑝 1− 𝑝 / 𝑛+4 𝑚= ∗ − 𝑚= ∗ 0.011≈ % 𝐶𝐼 for 𝑝: 𝑝 ±𝑚 0.056±0.018

19 “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.

20 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).

21 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* = 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

22 Choosing the sample size—example (2 of 2)
𝑛= 𝑧 ∗ 𝑚 2 𝑝 ∗ 1− 𝑝 ∗ = ≈  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.

23 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.

24 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.

25 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.

26 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?

27 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− × ≈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) < , highly significant. We reject H0. There is very strong evidence (P < ) that the righting behavior of live aphids is better than chance.

28 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: 𝑝 = =0.7474

29 Another hypothesis test example (2 of 2)
We test: 𝐻 0 :𝑝=0.75 versus 𝐻 𝑎 :𝑝≠0.75 𝑧= 𝑝 − 𝑝 0 𝑝 0 1− 𝑝 0 𝑛 = − × =−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.61, not significant. We fail to reject H0. The data are consistent with a dominant-recessive genetic model.

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

31 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

32 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.

33 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.

34 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

35 Large sample CI example (2 of 2)
H. attack n Drug 56 2051 2.73% Placebo 84 2030 4.14% So the 90% CI is ( − ) ± 1.645* = ± 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.

36 “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 + 𝑛 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.

37 “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.

38 “Plus four” CI example (2 of 2)
𝑝 𝑇𝑃 = =0.8125; 𝑝 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 = =0.5625; 𝑝 𝑇𝑃 − 𝑝 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 =0.25 𝑚= 𝑧 ∗ 𝑝 𝑇𝑃 1− 𝑝 𝑇𝑃 𝑛 𝑇𝑃 +2 + 𝑝 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 1− 𝑝 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 𝑛 𝑐𝑜𝑛𝑡𝑟𝑜𝑙 +2 𝑚= ≈ % 𝐶𝐼 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.

39 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 Appropriate when all counts (successes and failures in each sample) are 5 or more.

40 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

41 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

42 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!!!

43 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.

44 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 Drug 56 1995 2051 2.73% Placebo 84 1946 2030 4.14%

45 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.

46 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.

47 Relative risk example (4 of 4)
H. attack No H.A. n 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 offers lots of examples. On average, we need to treat 71 men for 5 years with Gemfibrozil to avoid 1 heart attack (NNT = 71).


Download ppt "The Practice of Statistics in the Life Sciences Fourth Edition"

Similar presentations


Ads by Google