Presentation is loading. Please wait.

Presentation is loading. Please wait.

Inference for Proportions

Similar presentations


Presentation on theme: "Inference for Proportions"— Presentation transcript:

1 Inference for Proportions
STAT 250 Dr. Kari Lock Morgan Inference for Proportions Sections 6.1, 6.3 Formulas for standard errors Normal based inference

2 Confidence Interval Formula
IF SAMPLE SIZES ARE LARGE… From N(0,1) From original data From bootstrap distribution

3 From randomization distribution
Formula for p-values IF SAMPLE SIZES ARE LARGE… From original data From H0 From randomization distribution Compare z to N(0,1) for p-value

4 Standard Error Wouldn’t it be nice if we could compute the standard error without doing thousands of simulations? We can!!!

5 Standard Error Formulas
Parameter Distribution Standard Error Proportion Normal Difference in Proportions Mean t, df = n – 1 Difference in Means t, df = min(n1, n2) – 1

6 SE Formula Observations
n is always in the denominator (larger sample size gives smaller standard error) Standard error related to square root of 1/n Standard error formulas use population parameters… (uh oh!) For intervals, plug in the sample statistic(s) as your best guess at the parameter(s)

7 Standard Error Formulas
Parameter Distribution Standard Error Proportion Normal Difference in Proportions Mean t, df = n – 1 Difference in Means t, df = min(n1, n2) – 1

8 Hitchhiker Snails A type of small snail (Tornatellides boeningi) is very widespread in Japan, and colonies of the snails that are genetically very similar have been found very far apart. How could the snails travel such long distances? Biologist Shinichiro Wada fed 174 live snails to birds, and found that 26 were excreted live out the other end. (The snails are apparently able to seal their shells shut to keep the digestive fluids from getting in). Yong, E. “The Scatological Hitchhiker Snail,” Discover, October 2011, 13.

9 Question #1 of the Day What proportion of “hitchhiker” snails survive when ingested by a bird?

10 Interval for Proportion
statistic ± z* × SE Calculate sample statistic Find z* for desired level of confidence Calculate standard error Use statistic ± z* × SE Interpret in context

11 Sample Statistic 26 of 174 snails survived

12 z* for 90%

13 Difference in Proportions
Standard Error Parameter Distribution Standard Error Proportion Normal Difference in Proportions Mean t, df = n – 1 Difference in Means t, df = min(n1, n2) – 1

14 Bootstrap Standard Error

15 Interval for Proportion

16 Bootstrap Interval

17 Different Birds The snails were fed to two different birds
14.3% of the 119 snails fed to Japanese white-eyes survived 16.4% of the 55 snails fed to brown-eared bulbuls survived Wada, S., Kawakami, K., & Chiba, S. Snails can survive passage through a bird’s digestive system. Journal of Biogeography, June 21, 2011.

18 Your Turn! Give a 95% confidence interval for the difference in proportions, white-eye – bulbul. Japanese white-eye: 14.3% out of 119 Brown-eared bulbul: 16.4% out of 55 (-0.10, 0.06) (-0.12, 0.08) (-0.14, 0.10) (-0.17, 0.13)

19 Your Turn

20 Question #2 of the Day Does hormone replacement therapy cause increased risk of breast cancer?

21 Hormone Replacement Therapy
Until 2002, hormone replacement therapy (HRT), estrogen and/or progesterone, was commonly prescribed to post-menopausal women. This changed in 2002, when the results of a large clinical trial were published 8506 women were randomized to take HRT, were randomized to placebo HRT and 124 placebo women developed any kind of cancer.

22 Hypothesis Test State hypotheses Calculate sample statistic
Calculate SE Calculate z = (statistic – null)/SE Compare z to standard normal distribution to find p-value. Make a conclusion.

23 SE Formulas What to plug in for the unknown population parameters?
For testing, Best: plug in the null value for the parameter(s), because you want the distribution assuming H0 true (if the parameters have anything to do with H0) Acceptable for this course: just use sample statistics (this is different from the textbook)

24 Hypotheses H0: p1= p2, Ha: p1≠ p2 H0: p1= p2, Ha: p1> p2
Does hormone replacement therapy cause increased risk of invasive breast cancer? p1 = proportion of women taking HRT who get invasive breast cancer p2 = proportion of women not taking HRT who get invasive breast cancer H0: p1= p2, Ha: p1≠ p2 H0: p1= p2, Ha: p1> p2 H0: p1= p2, Ha: p1< p2

25 Calculate Sample Statistic

26 Calculate SE

27 Standard Error

28 Calculate z-statistic

29 p-value

30 p-value

31 Conclusion If there were no difference between HRT and placebo regarding invasive breast cancer, we would only see results this extreme about 2 out of 100 times. We have evidence that HRT increases risk of invasive breast cancer. (The trial was terminated because of this, and hormone replacement therapy is now no longer routinely recommended)

32 Your Turn! Same trial, different variable of interest.
8506 women were randomized to take HRT, were randomized to placebo HRT and 458 placebo women developed any kind of cancer. Does hormone replacement therapy cause increased risk of cancer in general? Yes No

33 Your Turn

34 Margin of Error For a single proportion, what is the margin of error?

35 Margin of Error You can choose your sample size in advance, depending on your desired margin of error! Given this formula for margin of error, solve for n.

36 Margin of Error

37 Margin of Error Suppose we want to estimate a proportion with a margin of error of 0.03 with 95% confidence. How large a sample size do we need? About 100 About 500 About 1000 About 5000

38 To Do HW 5.1, 5.2, 6.13 (due Monday, 3/27)


Download ppt "Inference for Proportions"

Similar presentations


Ads by Google