There are a several earthquakes that occurred in 2017

This preview shows page 8 - 10 out of 33 pages.

There are a several earthquakes that occurred in 2017 that we’re interested in, and generally, we won’t have access to this large population. Instead, if we sample correctly, we can take a small subsample of earthquakes in this year to get an idea about the distribution of magnitudes throughout the year! Question 1. In the following lines of code, we take two different samples from the earthquake table, and calculate the mean of the magnitudes of these earthquakes. Are these samples repre- sentative of the population of earthquakes in the original table (that is, the should we expect the mean to be close to the population mean)? Hint: Consider the ordering of the earthquakes table.
Question 2. Write code producing a sample that should represent the population of size 500 then take the mean of the magnitudes of the earthquakes in this sample. Assign these to representative_sample and representative_mean respectively. Hint: In class, what sort of samples can properly represent the population?
Out[18]: 4.8095199999999991 Question 3. Suppose we want to figure out what the biggest magnitude earthquake was in 2017, but we are tasked with doing this only with a sample of 500 from the earthquakes table. 8
To determine whether trying to find the biggest magnitude from a sample is a plausible idea, write code that simulates the maximum of a random sample of size 500 from the earthquakes table 5000 times. Assign your array of maximums to maximums .
Question 4. We want to see if a random sample of size 500 is likely to help you determine the largest magnitude earthquake in the population. To help determine this, find the magnitude of the (actual) strongest earthquake in 2017. The random sample of 500 is not likely to help you determine the largest magnitude earth- quake in the population.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture