Did the 2015 event have this problem?
You would like to know if this is a typical problem with pools in competitive swimming. To address this question, perform a similar analysis for the results of the 2015 FINA World Championships. That is, compute the mean fractional improvement for going from lanes 1-3 to lanes 6-8 for the 2015 competition, along with a 95% confidence interval on the mean. Also test the hypothesis that the mean fractional improvement is zero.
The arrays swimtime_low_lanes_15
and swimtime_high_lanes_15
have the pertinent data.
This exercise is part of the course
Case Studies in Statistical Thinking
Exercise instructions
- Compute the fractional improvement,
f
using the arraysswimtime_low_lanes_15
andswimtime_high_lanes_15
. Also compute the mean off
, storing it asf_mean
. - Draw 10,000 bootstrap replicates of the mean
f
. - Compute the 95% confidence interval of the mean fractional improvement.
- Shift
f
to createf_shift
such that its mean is zero. - Draw 100,000 bootstrap replicates of the mean of
f_shift
. - Compute the p-value.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Compute f and its mean
f = (____ - ____) / ____
f_mean = ____
# Draw 10,000 bootstrap replicates
bs_reps = ____
# Compute 95% confidence interval
conf_int = ____
# Shift f
f_shift = ____ - ____
# Draw 100,000 bootstrap replicates of the mean
bs_reps = ____
# Compute the p-value
p_val = ____(____ >= ____) / 100000
# Print the results
print("""
mean frac. diff.: {0:.5f}
95% conf int of mean frac. diff.: [{1:.5f}, {2:.5f}]
p-value: {3:.5f}""".format(f_mean, *conf_int, p_val))