Remember that areas are represented in terms of

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

Remember that areas are represented in terms of percentages.Hint 1:For a refresher on distribution types, check outSection 10.1Hint 2:Thehist()table method ignores data points outside the range of its bins, but you mayignore this fact and calculate the areas of the bars using what you know about histograms fromlecture.[106]:full_data_with_value[106]:Player| 3P| 2P| PTS| Salary| ValueAaron Gordon| 1.2| 4.1| 14.2 | 19863636 | 0.030206Aaron Holiday| 1.5| 2.2| 9.9| 2239200| 0.245623Abdel Nader| 0.7| 1.3| 5.7| 1618520| 0.191533Admiral Schofield | 0.5| 0.6| 3.2| 898310| 0.22264Al Horford| 1.4| 3.4| 12| 28000000 | 0.0185714Al-Farouq Aminu| 0.5| 0.9| 4.3| 9258000| 0.0270037Alec Burks| 1.7| 3.3| 15.8 | 2320044| 0.396544Alec Burks| 1.8| 3.3| 16.1 | 2320044| 0.409475Alec Burks| 0| 1| 2| 2320044| 0Alen Smailagić| 0.3| 1.3| 4.7| 898310| 0.233772… (552 rows omitted)[107]:(600*0.1)+(205*0.1)+(100*.1)+(30*0.1)+(25*0.1)+(25*0.1)[107]:98.5[108]:(660*0.1)+(210*0.1)+(60*0.1)+(10*0.1)+(40*0.1)[108]:98.0[109]:distribution_1="empirical"player_count_1= 562area_total_1= 100distribution_2="empirical"player_count_2= 50area_total_2= 100[110]:ok.grade("q3_4");~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Running tests---------------------------------------------------------------------Test summaryPassed: 4Failed: 012
[ooooooooook] 100.0% passedQuestion 5.For which range of values does the plot in question 3 better depict the distributionof thepopulation’s player values: 0 to 0.3, or above 0.3? Explain your answer.
1.44. EarthquakesThenextcellloadsatablecontaininginformationabouteveryearthquakewithamagnitudeabove5in2019(smallerearthquakesaregenerallynotfelt,onlyrecordedbyverysensitiveequipment),compiledbytheUSGeologicalSurvey.(source:)[111]:earthquakes=Table().read_table('earthquakes_2019.csv').select(['time','mag',,'place'])earthquakes[111]:time| mag| place2019-12-31T11:22:49.734Z | 5| 245km S of L'Esperance Rock, New Zealand2019-12-30T17:49:59.468Z | 5| 37km NNW of Idgah, Pakistan2019-12-30T17:18:57.350Z | 5.5| 34km NW of Idgah, Pakistan2019-12-30T13:49:45.227Z | 5.4| 33km NE of Bandar 'Abbas, Iran2019-12-30T04:11:09.987Z | 5.2| 103km NE of Chichi-shima, Japan2019-12-29T18:24:41.656Z | 5.2| Southwest of Africa2019-12-29T13:59:02.410Z | 5.1| 138km SSW of Kokopo, Papua New Guinea2019-12-29T09:12:15.010Z | 5.2| 79km S of Sarangani, Philippines2019-12-29T01:06:00.130Z | 5| 9km S of Indios, Puerto Rico2019-12-28T22:49:15.959Z | 5.2| 128km SSE of Raoul Island, New Zealand… (1626 rows omitted)If we were studying all human-detectable 2019 earthquakes and had access to the above data, we’dbe in good shape - however, if the USGS didn’t publish the full data, we could still learn somethingabout earthquakes from just a smaller subsample. If we gathered our sample correctly, we could usethat subsample to get an idea about the distribution of magnitudes (above 5, of course) throughoutthe year!In the following lines of code, we take two different samples from the earthquake table, and calculatethe mean of the magnitudes of these earthquakes.[112]:sample1=earthquakes.sort('mag', descending=True).take(np.arange(100))sample1_magnitude_mean=np.mean(sample1.column('mag'))sample2=earthquakes.take(np.arange(100))sample2_magnitude_mean=np.mean(sample2.column('mag'))

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture