Get startedGet started for free

Parameter estimates of difference between finals and semifinals

Compute the mean fractional improvement from the semifinals to finals, along with a 95% confidence interval of the mean. The NumPy array f that you computed in the last exercise is in your namespace.

This exercise is part of the course

Case Studies in Statistical Thinking

View Course

Exercise instructions

  • Compute the mean of f, storing the result in f_mean.
  • Generate 10,000 bootstrap replicates of the mean of f. Store the results in bs_reps.
  • Compute a 95% confidence interval from these bootstrap replicates.
  • Hit 'Submit Answer' to print the mean and confidence interval to the screen.

Hands-on interactive exercise

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

# Mean fractional time difference: f_mean
f_mean = ____

# Get bootstrap reps of mean: bs_reps
bs_reps = ____

# Compute confidence intervals: conf_int
conf_int = ____

# Report
print("""
mean frac. diff.: {0:.5f}
95% conf int of mean frac. diff.: [{1:.5f}, {2:.5f}]""".format(f_mean, *conf_int))
Edit and Run Code