Download Confidence Intervals, Sample Size Calculation - Discussion 8 | STAT 310 and more Study notes Mathematical Statistics in PDF only on Docsity! STAT 310 DISCUSSION 8 TA: Yi Chai Office: 1335N MSC Email: chaiyi@stat.wisc.edu Webpage: http://www.stat.wisc.edu/∼chaiyi Office Hours: 11:00-12:00pm T and 1:00-2:00pm Th or by appointment 1. Confidence Intervals 100(1− α)%-C.I. Margin of error Length of C.I. mean of N(µ, σ2) known σ2 Ȳ ± zα/2 × σ√ n zα/2 × σ√ n 2zα/2 × σ√ n unknown σ2 Ȳ ± tα/2,n−1 × s√ n tα/2,n−1 × s√ n 2tα/2,n−1 × s√ n Proportions p̂± zα/2 √ p̂(1− p̂) n zα/2 √ p̂(1− p̂) n 2zα/2 √ p̂(1− p̂) n 2. Sample size calculation: • Estimation of mean of a normal distribution N(µ, σ2) with known σ2. The sample size n such that the margin of error for the 1 − α confidence interval for µ is no greater than a prescribed value δ is n > σ2( Zα/2 δ )2 • Estimation of proportion. The required sample size is n > 1 4 ( Zα/2 δ )2 3. Examples • Example 1: (6.3.10 from the textbook.) How many times must we toss a coin to ensure that a 0.95 confidence interval, for the probability of heads on a single toss, has length less than 0.1, 0.05 and 0.01, respectively? • Example 2: (6.3.12 from the textbook.) Suppose that a measurement on a population can be assumed to be distributed N(µ, 2) where µ is unknown and that the size of the population is very large. A researcher wants to determine a 0.95 confidence interval for µ that is no longer than 1. What is the minimum sample size that will guarantee this? • Example 3: (6.3.15 from the textbook.) Generate 103 samples of size n = 5 from the Bernoulli(0.5) distribution. For each of these samples, calculate (6.3.6)[ x̄− z(1+γ)/2 √ x̄(1− x̄) n , x̄ + z(1+γ)/2 √ x̄(1− x̄) n ] with γ = 0.95 and record the proportion of intervals that contain the true value. What do you notice? Repeat this simulation with n = 20. What do you notice? 1