Skip to content

Latest commit

 

History

History
24 lines (24 loc) · 942 Bytes

File metadata and controls

24 lines (24 loc) · 942 Bytes

Sample Size Determination

Mean

Implicit Assumptions
◻️ Confidence level is assumed to be 95% unless otherwise specified.
Actual Code
Sample Task

The distribution for volume is normal with sample mean = 796ml and population standard deviation = 15ml.
What sample size is needed to reduce the margin of error to at most 3ml, when developing a 95% confidence interval for the mean volume for population?

ceiling(qnorm(0.975)^2*(15^2)/(3^2))




Proportion

Implicit Assumptions
◻️ If sample proportion is unavailable, π=0.5 is used to maximise (π(1-π)).
◻️ Confidence level is assumed to be 95% unless otherwise specified.
Actual Code
Sample Task

Determine number of voters to poll to ensure a sampling error of at most ± 2%.

ceiling(qnorm(0.975)^2*((0.5)*(1-0.5))/(0.02)^2)