Biostatistics Notes and Confidence Intervals
Biostatistics Study Notes
Example 6.3 - Estimating Proportion of Adults Who Drink Occasionally
- Research Question: Estimate the proportion of adults who drink beer, wine, or hard liquor at least occasionally.
- Sample Size: 40 adults selected randomly from a large city.
- Responses:
- 23 out of 40 responded "Yes";
- Data breakdown: Yes, Yes, Yes, No, Yes, No, No, No, Yes, Yes, No, Yes, No, Yes, No, No, Yes, No, No, Yes, Yes, Yes, Yes, Yes, No, Yes, Yes, Yes, Yes, No, No, No, Yes, No, Yes.
A. Point Estimate (p)
- Formula: p = \frac{x}{n} where:
- x = number of "Yes" responses
- n = total number of responses
- Calculation:
- p = \frac{23}{40} = 0.575
B. Margin of Error (MOE)
- Margin of Error: generally determined by MOE = z_{\alpha/2} \times \sqrt{\frac{p(1-p)}{n}}
- Using a standard normal distribution for a 95% confidence level:
- z_{\alpha/2} = | \text{Norm}(0.05, 0, 1) | = 1.96
- Calculation:
- For p:
- MOE = 1.96 \times \sqrt{\frac{0.575(1-0.575)}{40}}
- After evaluation, MOE = 0.1532
C. Sample Size
- Condition: Is the sample size large? Need to check:
- Condition: np \geq 10 and n(1-p) \geq 10.
- For calculation:
- n \cdot p = 40 \cdot 0.575 = 23 \geq 10
- n(1-p) = 40 \cdot 0.425 = 17 \geq 10
- Concluded: Yes, the sample size is large.
D. 95% Confidence Interval
- Formula involves using the point estimate and margin of error:
- CI = (p - MOE, p + MOE)
- Result Calculation:
- CI = (0.575 - 0.1532, 0.575 + 0.1532) = (0.4218, 0.7282)
E. Interpretation
- Conclusion: "I am 95% confident that the true proportion (p) of adults who drink occasionally is between 42.18% and 72.82%."
Example 6.13 - Confidence Interval for Mean Pulse Rate
- Context: A random sample of 21 US adult males who jog at least 15 miles per week; average pulse rate measured.
- Sample Average Pulse Rate: 52.6 beats/minute.
- Standard Deviation: 3.22 beats/minute.
- Distribution: Assumed to be normally distributed.
A. 95% Confidence Interval Calculation
- Sample Size: n = 21
- Critical Value (z): $z_{0.025} = 2.04$ obtained from t-distribution table.
- Margin of Error (ME):
- ME = z_{0.025} \cdot \frac{s}{\sqrt{n}}
- Full Calculation:
- ME = 2.04 \cdot \frac{3.22}{\sqrt{21}} = 1.469
- Resulting Interval:
- CI = (52.6 - 1.469, 52.6 + 1.469) = (51.13, 54.07)
C. Interpretation of Results
- Conclusion: "We are 95% confident that the true mean pulse rate of US adult males who jog at least 15 miles per week is between 51.13 and 54.07."
D. Reduce Observation Interpretation
- Comparison: Mean pulse rate of all US adult males at approximately 72 beats/minute is outside the confidence interval, indicating jogging likely reduces mean pulse rate.
Example 7.10 - Hypothesis Testing for Visits to Physician
- Context: Gallup Poll reports average visits to physician by women.
- Null Hypothesis: H_0: \mu = 5.8 visits/year.
- Sample Size: 12 women showed visits data: 3, 2, 1, 3, 7, 2, 9, 4, 6, 6, 8, 5.
A. Statistical Calculation by Hand
- Test Statistic (t):
- t = \frac{\bar{x} - \mu}{\frac{s}{\sqrt{n}}}
- For this sample: Mean = \bar{x} = 4.667, Standard Deviation (s) calculated.
- Result:
- t = -1.527485
B. Use of R to Calculate t-test
- Command in R:
t.test(visits, alternative='two.sided', mu=5.8, conf.level=0.95)
- Result Analysis:
- t = -1.5275, df = 11, p-value = 0.1549
- Interpretation indicated alternative hypothesis tested: True mean is not equal to 5.8.
- 95% confidence interval calculated: (3.033623, 6.299710).
Example 7.11 - Hypothesis Test on Field Trip Interest
- Context: A teacher hypothesizes that 85% of students want to visit the zoo.
- Sample Size: 55 students, 39 expressed interest.
Formulating Hypothesis
- Null Hypothesis (H0):
- H_0: p = 0.85
- Alternative Hypothesis (H1):
- H_1: p
eq 0.85 (two-tailed)
- H_1: p
Example 7.12 - Writing Hypotheses
Practice Writing the Null and Alternative Hypotheses
A. Pregnancies in the country not planned:
- Null in words: Half of the pregnancies in this country are not planned.
- Null in symbols: H_0: p = 0.5
- Direction: Left-tailed.
- Alternative in symbols: H_1: p > 0.5
B. Chicken pox vaccination effectiveness:
- Null in words: 3% of vaccinated children still contract the disease.
- Null in symbols: H_0: p = 0.03
- Direction: Left-tailed.
- Alternative in symbols: H_1: p < 0.03
C. Lactose intolerance in population:
- Null in words: Proportion of lactose-intolerant people is 0.25.
- Null in symbols: H_0: p = 0.25
- Direction: Two-tailed.
- Alternative in symbols: H_1: p
eq 0.25
Example 7.17 - Polling Majority Preferences
- Context: Poll of 1000 adult Americans on political preference, 48% prefer a Democratic candidate.
- Null Hypothesis:
- H_0: p = 0.5
- Sample Size Check: Confirmed: large sample.
- Test statistic and p-value calculated:
- z = -1.26, p-value = 0.2059
- Conclusion: Fail to reject H_0; insufficient evidence to state that true proportion differs from 50%.
Example 8.3 - Weight Change in Smokers
- Context: Investigation of weight change after quitting smoking among eight females.
- Results Pre and Post Measurements:
- Before/After differences calculated for weight.
A. Point Estimate Calculation
- Point Estimate for Difference: P = 1.75
B. Margin of Error Calculation
- Margin of Error: M.E. = 2.853
C. Confidence Interval Calculation
- Resulting interval is (-1.103, 4.6026)
D. Interpretation of Confidence Interval
- Conclusion: "We are 95% confident that the true mean difference in women's weight before and after quitting smoking is between -1.103 and 4.6026."
Example 8.3 Continued - Paired T-Test
- Significance Level for Test: 5%.
- Test Hypotheses:
- H0: \mud = 0
- Two-tailed test conducted.
- Result:
- Decision: Fail to reject the null hypothesis; conclusions indicated insufficient evidence to suggest significant weight change post quitting smoking.