EDA: mean differences between odd and even splits
To investigate the differences between odd and even splits, you first need to define a difference metric. In previous exercises, you investigated the improvement of moving from a low-numbered lane to a high-numbered lane, defining f = (ta - tb) / ta. There, the ta in the denominator served as our reference time for improvement. Here, you are considering both improvement and decline in performance depending on the direction of swimming, so you want the reference to be an average. So, we will define the fractional difference as f = 2(ta - tb) / (ta + tb).
Your task here is to plot the mean fractional difference between odd and even splits versus lane number. I have already calculated the mean fractional differences for the 2013 and 2015 Worlds for you, and they are stored in f_13
and f_15
. The corresponding lane numbers are in the array lanes
.
This exercise is part of the course
Case Studies in Statistical Thinking
Exercise instructions
- Plot
f_13
versuslanes
using keyword argumentsmarker='.'
,markersize=12
, andlinestyle='none'
. - Do the same for
f_15
versuslanes
. - Label the x-axis
'lane'
, y-axis'frac. diff. (odd - even)'
, and show it.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Plot the the fractional difference for 2013 and 2015
____
____
# Add a legend
_ = plt.legend((2013, 2015))
# Label axes and show plot