ComenzarEmpieza gratis

Parkfield earthquake magnitudes

As usual, you will start with EDA and plot the ECDF of the magnitudes of earthquakes detected in the Parkfield region from 1950 to 2016. The magnitudes of all earthquakes in the region from the ANSS ComCat are stored in the NumPy array mags.

When you do it this time, though, take a shortcut in generating the ECDF. You may recall that putting an asterisk before an argument in a function splits what follows into separate arguments. Since dcst.ecdf() returns two values, we can pass them as the x, y positional arguments to plt.plot() as plt.plot(*dcst.ecdf(data_you_want_to_plot)).

You will use this shortcut in this exercise and going forward.

Este ejercicio forma parte del curso

Case Studies in Statistical Thinking

Ver curso

Instrucciones del ejercicio

  • Generate a plot of the ECDF in one line, using the *dcst.ecdf() approach describe above. Call plt.plot() with the marker='.' and linestyle='none' keyword arguments as usual.
  • Label the x-axis 'magnitude', y-axis 'ECDF', and show the plot.

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Make the plot


# Label axes and show plot



Editar y ejecutar código