Question 2 write code producing a sample that should

This preview shows page 9 - 12 out of 14 pages.

Out[29]: time mag place 2017-12-31T23:48:50.980Z 4.8 30km SSE of Pagan, Northern Mariana Islands 2017-12-31T20:59:02.500Z 5.1 Southern East Pacific Rise 2017-12-31T20:27:49.450Z 5.2 Chagos Archipelago region 2017-12-31T19:42:41.250Z 4.6 18km NE of Hasaki, Japan 2017-12-31T16:02:59.920Z 4.5 Western Xizang 2017-12-31T15:50:22.510Z 4.5 156km SSE of Longyearbyen, Svalbard and Jan Mayen 2017-12-31T14:53:32.590Z 5.1 41km S of Daliao, Philippines 2017-12-31T14:51:58.200Z 5.1 132km SSW of Lata, Solomon Islands 2017-12-31T12:24:13.150Z 4.6 79km SSW of Hirara, Japan 2017-12-31T04:02:18.500Z 4.8 10km W of Korini, Greece ... (6350 rows omitted) Out[30]: [6.422999999999999, 4.7749999999999995]
Question 2. Write code producing a sample that should represent the population of size 500 then take the mean of the magnitudes of
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? ) )) ) 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. 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 .
In [36]: _ = ok . grade( 'q4_3' ) 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. In [37]: strongest_earthquake_magnitude = max (earthquakes . column( "mag" )) strongest_earthquake_magnitude In [38]: _ = ok . grade( 'q4_4' ) Question 5. Explain whether you believe you can accurately use a sample size of 500 to determine the maximum. What is a specific con of using the maximum as your estimator? Use the histogram above to help answer.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture