Exercise

Confidence interval by hand

There are two common ways that interviewers will touch on confidence intervals; they will either ask you to explain it in simple terms, or elaborate on how they are calculated, possibly having you implement one. In this exercise, you'll practice the latter by producing a confidence interval by hand, using no packages other than those imported for you.

We have gone ahead and assigned the appropriate z-score for a 95% confidence interval and sample mean to the z_score and sample_mean variables to simplify things a bit.

Instructions

100 XP
  • Compute the standard error and the margin of error using the sem() function and z_score variable imported for you.
  • Compute and print the lower boundary of our confidence interval using the sample_mean variable imported for you.
  • Compute and print the upper boundary of our confidence interval using the sample_mean variable imported for you.