Download presentation
Presentation is loading. Please wait.
Published byEugenia Chapman Modified over 8 years ago
1
Statistics: Unlocking the Power of Data Lock 5 Inference for Proportions STAT 250 Dr. Kari Lock Morgan Chapter 6.1, 6.2, 6.3, 6.7, 6.8, 6.9 Formulas for standard errors Normal based inference
2
Statistics: Unlocking the Power of Data Lock 5 Central Limit Theorem For a sufficiently large sample size, the distribution of sample statistics for a mean or a proportion is normal For proportions, “sufficiently large” can be taken as at least 10 in each category The larger the sample sizes, the more normal the distribution of the statistic will be www.lock5stat.com/statkey
3
Statistics: Unlocking the Power of Data Lock 5 Accuracy The accuracy of simulation methods depends on the number of simulations (more simulations = more accurate) The accuracy of the normal distribution depends on the sample size (larger sample size = more accurate) If the distribution of the statistic is normal and you have generated many simulated statistics, the answers should be very close
4
Statistics: Unlocking the Power of Data Lock 5 Confidence Interval Formula From original data From bootstrap distribution From N(0,1) IF SAMPLE SIZES ARE LARGE…
5
Statistics: Unlocking the Power of Data Lock 5 Formula for p-values From randomization distribution From H 0 From original data Compare z to N(0,1) for p-value IF SAMPLE SIZES ARE LARGE…
6
Statistics: Unlocking the Power of Data Lock 5 Standard Error Wouldn’t it be nice if we could compute the standard error without doing thousands of simulations? We can!!!
7
Statistics: Unlocking the Power of Data Lock 5 ParameterDistributionStandard Error Proportion Normal Difference in Proportions Normal Meant, df = n – 1 Difference in Meanst, df = min(n 1, n 2 ) – 1 Standard Error Formulas
8
Statistics: Unlocking the Power of Data Lock 5 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) For testing, plug in the null value for the parameter(s), because you want the distribution assuming H 0 true (if the parameters have anything to do with H 0 )
9
Statistics: Unlocking the Power of Data Lock 5 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.The Scatological Hitchhiker Snail
10
Statistics: Unlocking the Power of Data Lock 5 Question #1 of the Day What proportion of “hitchhiker” snails survive when ingested by a bird?
11
Statistics: Unlocking the Power of Data Lock 5 Interval for Proportion 1) Calculate sample statistic 2) Find z* for desired level of confidence 3) Calculate standard error 4) Use statistic ± z* × SE 5) Interpret in context statistic ± z* × SE
12
Statistics: Unlocking the Power of Data Lock 5 Sample Statistic 26 of 174 snails survived
13
Statistics: Unlocking the Power of Data Lock 5 z* for 90%
14
Statistics: Unlocking the Power of Data Lock 5 Standard Error ParameterDistributionStandard Error Proportion Normal Difference in Proportions Normal Meant, df = n – 1 Difference in Meanst, df = min(n 1, n 2 ) – 1
15
Statistics: Unlocking the Power of Data Lock 5 Bootstrap Standard Error
16
Statistics: Unlocking the Power of Data Lock 5 Interval for Proportion statistic ± z* × SE 0.149 ± 1.645 × 0.027 (0.105, 0.193) We are 90% confident that between 0.105 and 0.193 of hitchhiker snails survive being ingested by a bird.
17
Statistics: Unlocking the Power of Data Lock 5 Bootstrap Interval
18
Statistics: Unlocking the Power of Data Lock 5 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.Snails can survive passage through a bird’s digestive system
19
Statistics: Unlocking the Power of Data Lock 5 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 a) (-0.10, 0.06) b) (-0.12, 0.08) c) (-0.14, 0.10) d) (-0.17, 0.13)
20
Statistics: Unlocking the Power of Data Lock 5 Your Turn
21
Statistics: Unlocking the Power of Data Lock 5 Question #2 of the Day Does hormone replacement therapy cause increased risk of breast cancer?
22
Statistics: Unlocking the Power of Data Lock 5 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, 8102 were randomized to placebo. 166 HRT and 124 placebo women developed any kind of cancer.
23
Statistics: Unlocking the Power of Data Lock 5 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.
24
Statistics: Unlocking the Power of Data Lock 5 Hypotheses Does hormone replacement therapy cause increased risk of invasive breast cancer? p 1 = proportion of women taking HRT who get invasive breast cancer p 2 = proportion of women not taking HRT who get invasive breast cancer a) H 0 : p 1 = p 2, H a : p 1 ≠ p 2 b) H 0 : p 1 = p 2, H a : p 1 > p 2 c) H 0 : p 1 = p 2, H a : p 1 < p 2
25
Statistics: Unlocking the Power of Data Lock 5 Calculate z-statistic null value = 0 What to use for p 1 and p 2 ??? Have to assume null is true…
26
Statistics: Unlocking the Power of Data Lock 5 Testing When testing, use the null value for p, rather than the sample statistic So, if testing whether the proportion of people not taking HRT who develop invasive breast cancer is less than 0.1, the standard error would be
27
Statistics: Unlocking the Power of Data Lock 5 Null Values Testing a difference in proportions: H 0 : p 1 = p 2 Use the overall sample proportion from both groups (called the pooled proportion) as an estimate for both p 1 and p 2 Note that this is in between the sample proportions for each group.
28
Statistics: Unlocking the Power of Data Lock 5 Standard Error
29
Statistics: Unlocking the Power of Data Lock 5 Standard Error
30
Statistics: Unlocking the Power of Data Lock 5 z-statistic
31
Statistics: Unlocking the Power of Data Lock 5 p-value
32
Statistics: Unlocking the Power of Data Lock 5 p-value
33
Statistics: Unlocking the Power of Data Lock 5 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)
34
Statistics: Unlocking the Power of Data Lock 5 Your Turn! Same trial, different variable of interest. 8506 women were randomized to take HRT, 8102 were randomized to placebo. 502 HRT and 458 placebo women developed any kind of cancer. Does hormone replacement therapy cause increased risk of cancer in general? a) Yes b) No
35
Statistics: Unlocking the Power of Data Lock 5 Your Turn
36
Statistics: Unlocking the Power of Data Lock 5 Margin of Error For a single proportion, what is the margin of error? a) b) c)
37
Statistics: Unlocking the Power of Data Lock 5 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.
38
Statistics: Unlocking the Power of Data Lock 5 Margin of Error
39
Statistics: Unlocking the Power of Data Lock 5 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? (a)About 100 (b)About 500 (c)About 1000 (d) About 5000
40
Statistics: Unlocking the Power of Data Lock 5 To Do Read Sections 6.1, 6.2, 6.3, 6.7, 6.8, 6.9 Do HW 6 (due Friday, 11/6)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.