Session Ready
Exercise

Sample Size IV

Now you're conducting a study on what proportion of students drink alcohol and want to know what sample size to use for a confidence interval of 95%, with a margin of error of 0.05.

The sample size will be p multiplied by 1-p multiplied by the Z-score squared, divided by the margin of error squared. Let's try to find this using the 'safe approach' for p. This is the value above which the output p*(1-p) cannot get any larger (you can always go back to the lecture notes or click 'hint' if you don't remember what this is).

Instructions
100 XP
  • In your script, calculate the separate components of the sample size equation and assign to stated object
  • In your script, use the separate components to calculate sample size
  • Remember to format your calculations correctly and use () where appropriate