Get startedGet started for free

Setting the parameter of interest

To create an interval for the median instead of the mean, you can change the est argument of the inference() function.

This exercise is part of the course

Data Analysis and Statistical Inference

View Course

Exercise instructions

Change the est argument to "median" and run the code.

Hands-on interactive exercise

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

# The nc data frame and the inference() function are already loaded into the workspace

# Adapt the inference() function:
inference(nc$gained, type = "ci", method = "simulation", conflevel = 0.95, est = "mean", boot_method = "se")
Edit and Run Code