Get startedGet started for free

ECDF of improvement from low to high lanes

Now that you have a metric for improvement going from low- to high-numbered lanes, plot an ECDF of this metric. I have put together the swim times of all swimmers who swam a 50 m semifinal in a high numbered lane and the final in a low numbered lane, and vice versa. The swim times are stored in the NumPy arrays swimtime_high_lanes and swimtime_low_lanes. Entry i in the respective arrays are for the same swimmer in the same event.

This exercise is part of the course

Case Studies in Statistical Thinking

View Course

Exercise instructions

  • Compute the fractional improvement for being in a high-numbered lane for each swimmer using the formula from the last exercise. Store the result in the variable f.
  • Compute the x and y values for plotting the ECDF.
  • Plot the ECDF as dots.
  • Label the x-axis 'f', y-axis 'ECDF', and show the plot.

Hands-on interactive exercise

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

# Compute the fractional improvement of being in high lane: f
f = (____ - ____) / ____

# Make x and y values for ECDF: x, y


# Plot the ECDFs as dots


# Label the axes and show the plot



Edit and Run Code