A group of researchers want to test the possible effect of an epilepsy medication taken by pregnant mothers on the cognitive development of their children. As evidence, they want to estimate the IQ scores of three-year-old children born to mothers who were on this particular medication during pregnancy. Previous studies suggest that the standard deviation of IQ scores of three-year-old children is 18 points. At east how many such children should the researchers sample at a minimum in order to obtain an 80% confidence interval with a margin of error of t most 4 points?
s <- 18 # Standard deviation
ME <- 4 # Margin of error
conf <- 0.80 # Confidence interval
z.star <- qnorm((1-conf)/2)
(z.star * s / ME)^2
## [1] 33.25808
At east 34 should the researchers sample at a minimum in order to obtain an 80% confidence interval with a margin of error of t most 4 points.