Exercise

# The b-value for Parkfield

The ECDF is effective at exposing roll-off, as you could see below magnitude 1. Because there are plenty of earthquakes above magnitude 3, you can use *m _{t} = 3* as your completeness threshold. With this completeness threshold, compute the

*b*-value for the Parkfield region from 1950 to 2016, along with the 95% confidence interval. Print the results to the screen. The variable

`mags`

with all the magnitudes is in your namespace.Overlay the theoretical Exponential CDF to verify that the Parkfield region follows the Gutenberg-Richter Law.

Instructions

**100 XP**

- Compute the
*b*-value and the 95% confidence interval using your`b_value()`

function. Use 10,000 bootstrap replicates. - Use
`np.random.exponential()`

to draw 100,000 samples from the theoretical distribution. The mean for the distribution is`b/np.log(10)`

, and you need to add`mt`

to your samples to appropriately handle the location parameter. Store the result in`m_theor`

. - Plot the ECDF of
`m_theor`

as a line. - Plot the ECDF of all magnitudes above
`mt`

as dots. - Hit 'Submit Answer' to display the plot and print the
*b*-value and confidence interval to the screen.