Get startedGet started for free

Exercise 13. Estimating the probability of a specific error size

Assume you are in a practical situation and you don't know \(p\). Take a sample of size \(N=100\) and obtain a sample average of \(\bar{X} = 0.51\).

What is the CLT approximation for the probability that your error size is equal or larger than 0.01?

This exercise is part of the course

HarvardX Data Science Module 4 - Inference and Modeling

View Course

Exercise instructions

  • Calculate the standard error of the sample average using the sqrt function.
  • Use pnorm twice to define the probabilities that a value will be less than -0.01 or greater than 0.01.
  • Combine these results to calculate the probability that the error size will be 0.01 or larger.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Define `N` as the number of people polled
N <-100

# Define `X_hat` as the sample average
X_hat <- 0.51

# Define `se_hat` as the standard error of the sample average


# Calculate the probability that the error is 0.01 or larger

Edit and Run Code