Now let us summarize what we have seen. To guide you, we have written most of the summary already.
Question 4.
Complete the statements below by filling in the [SQUARE BRACKETS].
Hint 1:
For a refresher on distribution types, check out
Section 10.1
()
Hint 2:
The
hist()
table method ignores data points outside the range of its bins, but you may ignore this
fact and calculate the areas of the bars using what you know about histograms from lecture.
.
.

Question 5.
For which range of values does the plot in question 3 better depict the distribution of the
population's player values
: 0 to 0.5, or above 0.5? Explain your answer.

4. Earthquakes
The next cell loads a table containing information about
every earthquake with a magnitude above 4.5
in
2017, compiled by the US Geological Survey. (source:
()
)

In [121]:
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 di
ff
erent samples from the earthquake table, and
calculate the mean of the magnitudes of these earthquakes. Are these samples representative 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.
Out[121]:
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)
earthquakes
=
Table().read_table(
'earthquakes_2017.csv'
).select([
'time'
,
'mag'
,
'pla
earthquakes

In [122]:
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.