In: Statistics and Probability
Assignment 1
Note: submit the following
1- "Excel file" include data and graph and analysis "please do not use anything rather than excel"
2- a functional code that performs all the required operations in 1 & part A
1-Collect set of data from the web. About coronavirus evolution in different countries considering other factors like median age of populations, health care systems etc. you are required to perform statistical analysis of this data by calculating the different statistical metrics (like the mean, the variance, the mode, the median, the third quartile and the first quartile etc.) for the full population. You are also asked to plot the histogram, time sequence diagram and boxplot of the whole data.
A) Select a random sample of 20 data points which are equally spaced from the start till the end of the data set. Of this sample you are required to calculate the mean, the variance, the mode, the median, the third quartile and the first quartile. Then, you are required to plot the histogram, time sequence diagram and boxplot for the sample.
B) Write your comments on the differences between the actual population statistics and graphs as compared to the sample statistics and graphs. Also, you should try to make use of other studied conceptual tools to interpret the results.
Design a device probabilistic model to predict the future
It is required to find out a mathematical model that can approximate the overall trend of the selected data which can be used to predict the future samples.
1) Collected Data Source : https://www.kaggle.com/koryto/countryinfo#covid19countryinfo.csv
2) Descriptive Statistics
Population | Mean | Variance | Mode | Median | Third Quartile | First Quartile |
Total Covid Cases | 6198.44 | 660239027.7 | 10 | 293.5 | 1485 | 35.25 |
Median Age | 31.47 | 84.83914514 | 32 | 32 | 40 | 24 |
Number of hospital bed per 1K people | 3.09 | 6.608481939 | 1.6 | 2.50 | 4.275 | 1.2 |
(Health expenses/ Population) *10000 | 2513.07 | 151563748.5 | 55.4234005 | 75.03 | 519.3201083 | 11.57325641 |
Formulla used : (Note that the cell reference will change for each data column)
Mean :=AVERAGE(B2:B171)
Variance : =VAR(B2:B171)
Mode: =MODE(B2:B171)
Median: =MEDIAN(B2:B171)
1st Qaurtile : =QUARTILE(B2:B171,1)
3rd Quartile : =QUARTILE(B2:B171,3)
Extracted Data:
Countries | Total Covid Cases | Median Age | Number of hospital bed per 1K people | (Health expenses/ Population) *10000 |
US | 257379 | 38 | 2.90 | 28.81 |
Spain | 117710 | 45 | 3.00 | 68.08 |
Italy | 115242 | 47 | 3.40 | 55.42 |
Germany | 89126 | 46 | 8.30 | 63.94 |
China | 82507 | 38 | 4.20 | 0.53 |
France | 59929 | 42 | 6.50 | 69.58 |
Iran | 53183 | 32 | 1.50 | 15.03 |
United Kingdom | 38168 | 40 | 2.80 | 61.06 |
Switzerland | 19303 | 43 | 4.70 | 876.18 |
Turkey | 18135 | 32 | 2.70 | 11.81 |
Belgium | 16770 | 42 | 6.20 | 412.61 |
Netherlands | 15817 | 41 | 1.20 | 402.75 |
Austria | 11444 | 43 | 7.60 | 570.48 |
Canada | 11283 | 41 | 2.70 | 121.88 |
Korea, South | 10062 | 44 | 11.50 | 49.85 |
Portugal | 9886 | 46 | 3.40 | 260.97 |
Brazil | 8165 | 33 | 2.20 | 6.55 |
Israel | 7030 | 30 | 3.10 | 325.69 |
Sweden | 6078 | 41 | 2.60 | 524.69 |
Australia | 5350 | 38 | 3.80 | 176.16 |
Norway | 5296 | 40 | 3.90 | 1147.71 |
Russia | 4149 | 40 | 8.20 | 9.69 |
Czechia | 3869 | 43 | 6.50 | 230.65 |
Denmark | 3861 | 42 | 2.50 | 877.56 |
Ireland | 3849 | 38 | 2.80 | 1080.44 |
Chile | 3737 | 35 | 2.20 | 99.55 |
Malaysia | 3333 | 30 | 1.90 | 32.87 |
Romania | 3183 | 43 | 6.30 | 56.66 |
Ecuador | 3163 | 28 | 1.50 | 55.55 |
Poland | 3149 | 42 | 6.50 | 45.02 |
Philippines | 3018 | 26 | 1.00 | 2.95 |
Japan | 2617 | 48 | 13.40 | 34.83 |
India | 2567 | 28 | 0.70 | 0.17 |
Luxembourg | 2487 | 40 | 4.80 | 10195.25 |
Pakistan | 2458 | 23 | 0.60 | 0.61 |
Saudi Arabia | 2039 | 32 | 2.70 | 89.65 |
Indonesia | 1986 | 30 | 1.20 | 1.35 |
Thailand | 1978 | 40 | 2.10 | 8.74 |
Finland | 1615 | 43 | 4.40 | 721.21 |
Greece | 1613 | 46 | 4.30 | 211.45 |
Mexico | 1510 | 29 | 1.50 | 7.83 |
South Africa | 1505 | 28 | 2.80 | 18.31 |
Dominican Republic | 1488 | 28 | 1.60 | 80.48 |
Serbia | 1476 | 42 | 5.70 | 151.53 |
Panama | 1475 | 30 | 2.30 | 357.61 |
Peru | 1414 | 31 | 1.60 | 20.35 |
Iceland | 1364 | 37 | 3.20 | 12061.79 |
Argentina | 1265 | 32 | 5.00 | 30.76 |
Colombia | 1161 | 31 | 1.50 | 16.76 |
Singapore | 1114 | 42 | 2.40 | 629.19 |
Croatia | 1079 | 44 | 5.60 | 403.38 |
United Arab Emirates | 1024 | 33 | 1.20 | 245.29 |
Algeria | 986 | 29 | 1.90 | 23.51 |
Estonia | 961 | 42 | 5.00 | 1422.50 |
Qatar | 949 | 32 | 1.20 | 1353.67 |
Ukraine | 942 | 41 | 8.80 | 10.72 |
Slovenia | 934 | 45 | 4.60 | 1315.09 |
New Zealand | 868 | 38 | 2.80 | 732.03 |
Egypt | 865 | 25 | 1.60 | 4.84 |
Iraq | 820 | 21 | 1.40 | 11.96 |
Armenia | 736 | 35 | 4.20 | 297.98 |
Morocco | 735 | 30 | 1.10 | 11.79 |
Lithuania | 696 | 45 | 7.30 | 688.76 |
Bahrain | 672 | 32 | 6.80 | 1441.61 |
Hungary | 623 | 43 | 7.00 | 197.92 |
Bosnia and Herzegovina | 574 | 43 | 3.50 | 335.89 |
Lebanon | 508 | 30 | 2.90 | 163.65 |
Moldova | 505 | 38 | 5.80 | 127.67 |
Latvia | 493 | 44 | 5.80 | 757.61 |
Bulgaria | 485 | 45 | 6.80 | 214.72 |
Kazakhstan | 460 | 31 | 6.70 | 48.09 |
Tunisia | 455 | 33 | 2.30 | 65.49 |
Slovakia | 450 | 41 | 4.80 | 377.68 |
Azerbaijan | 443 | 32 | 4.70 | 117.47 |
Andorra | 439 | 45 | 2.50 | 76994.76 |
North Macedonia | 430 | 39 | 4.40 | 411.35 |
Kuwait | 417 | 37 | 2.00 | 697.33 |
Costa Rica | 396 | 33 | 1.20 | 252.45 |
Cyprus | 396 | 37 | 3.40 | 1769.98 |
Uruguay | 369 | 36 | 2.80 | 503.21 |
Belarus | 351 | 40 | 11.00 | 114.82 |
Taiwan* | 348 | 42 | 10.40 | 157.49 |
Cameroon | 306 | 19 | 1.30 | 6.14 |
Albania | 304 | 36 | 2.90 | 268.96 |
Jordan | 299 | 24 | 1.40 | 55.67 |
Burkina Faso | 288 | 18 | 0.40 | 4.59 |
Afghanistan | 273 | 18 | 0.50 | 4.73 |
Oman | 252 | 31 | 1.60 | 320.37 |
San Marino | 245 | 47 | 3.80 | 108308.04 |
Vietnam | 237 | 32 | 2.60 | 3.43 |
Cuba | 233 | 42 | 5.20 | 11.57 |
Honduras | 222 | 24 | 0.70 | 35.64 |
Uzbekistan | 221 | 28 | 4.00 | 11.44 |
Senegal | 207 | 19 | 0.30 | 5.79 |
Ghana | 204 | 22 | 0.90 | 8.01 |
Malta | 202 | 43 | 4.70 | 7861.07 |
Cote d'Ivoire | 194 | 19 | 0.40 | 7.20 |
Nigeria | 190 | 18 | 0.30 | 1.04 |
Mauritius | 186 | 37 | 3.40 | 864.15 |
Montenegro | 160 | 39 | 4.00 | 1523.73 |
Sri Lanka | 152 | 34 | 3.60 | 16.49 |
Georgia | 148 | 38 | 2.60 | 179.99 |
Venezuela | 146 | 30 | 0.80 | 20.36 |
Brunei | 134 | 32 | 2.70 | 4761.37 |
Congo (Kinshasa) | 134 | 17 | 1.60 | 2.27 |
Bolivia | 132 | 26 | 1.10 | 38.21 |
Kyrgyzstan | 130 | 26 | 4.50 | 43.99 |
Kenya | 122 | 20 | 1.40 | 2.92 |
Cambodia | 114 | 26 | 0.80 | 12.56 |
Niger | 98 | 15.2 | 0.30 | 2.81 |
Trinidad and Tobago | 97 | 36 | 3.00 | 1574.86 |
Paraguay | 92 | 26 | 1.30 | 101.51 |
Rwanda | 84 | 20 | 1.60 | 11.04 |
Liechtenstein | 75 | 41 | 8.20 | 2465.38 |
Madagascar | 65 | 19.6 | 0.20 | 2.78 |
Bangladesh | 61 | 28 | 0.80 | 0.53 |
Monaco | 60 | 54 | 13.80 | 86820.24 |
Guinea | 52 | 18 | 4.02 | 4.34 |
Djibouti | 49 | 27 | 2.20 | 148.79 |
Guatemala | 47 | 23 | 0.60 | 24.78 |
Jamaica | 47 | 31 | 1.70 | 172.57 |
Barbados | 46 | 40 | 5.80 | 4294.04 |
El Salvador | 46 | 27.6 | 1.30 | 89.11 |
Uganda | 45 | 16.7 | 0.50 | 3.04 |
Togo | 40 | 19 | 0.80 | 11.60 |
Zambia | 39 | 18 | 2.00 | 11.04 |
Mali | 36 | 16.3 | 0.10 | 5.83 |
Ethiopia | 35 | 19 | 0.30 | 0.57 |
Bahamas | 24 | 32 | 2.90 | 4320.47 |
Congo (Brazzaville) | 22 | 19 | 1.60 | 6.16 |
Eritrea | 22 | 19.2 | 0.70 | 15.79 |
Republic of the Congo | 22 | 17 | 0.80 | 36.79 |
Gabon | 21 | 23 | 6.30 | 216.11 |
Tanzania | 20 | 18 | 0.70 | 1.61 |
Guyana | 19 | 27 | 1.60 | 427.18 |
Maldives | 19 | 30 | 4.30 | 2800.88 |
Haiti | 18 | 24 | 0.70 | 10.52 |
Syria | 16 | 25.6 | 1.50 | 9.72 |
Equatorial Guinea | 15 | 22 | 2.10 | 563.09 |
Mongolia | 14 | 28 | 7.00 | 143.37 |
Namibia | 14 | 22 | 2.70 | 370.73 |
Benin | 13 | 19 | 0.50 | 6.93 |
Saint Lucia | 13 | 34 | 1.30 | 3708.60 |
Dominica | 12 | 33.5 | 3.80 | 8140.47 |
Grenada | 10 | 32 | 3.70 | 6016.55 |
Laos | 10 | 24.4 | 1.50 | 22.82 |
Mozambique | 10 | 17.6 | 0.70 | 2.05 |
Seychelles | 10 | 34 | 3.60 | 8815.72 |
Sudan | 10 | 20 | 0.80 | 6.32 |
Suriname | 10 | 29 | 3.10 | 1733.63 |
Antigua and Barbuda | 9 | 34 | 3.80 | 11283.69 |
Eswatini | 9 | 21 | 0.80 | 542.16 |
Guinea-Bissau | 9 | 18.8 | 1.00 | 50.81 |
Saint Kitts and Nevis | 9 | 34.8 | 2.30 | 27124.57 |
Zimbabwe | 9 | 18.7 | 1.70 | 12.25 |
Central African Republic | 8 | 18 | 1.00 | 0.85 |
Chad | 8 | 16.6 | 0.40 | 2.21 |
Fiji | 7 | 27.9 | 2.30 | 369.24 |
Holy See | 7 | 40 | 5.00 | 55.42 |
Liberia | 7 | 19 | 0.80 | 25.31 |
Cabo Verde | 6 | 27.6 | 2.10 | 559.12 |
Mauritania | 6 | 20 | 0.40 | 38.07 |
Nepal | 6 | 25 | 0.30 | 5.18 |
Bhutan | 5 | 28 | 1.70 | 371.95 |
Nicaragua | 5 | 26.5 | 0.90 | 61.29 |
Somalia | 5 | 17 | 0.90 | 10.95 |
Belize | 4 | 24 | 1.30 | 1317.81 |
Gambia | 4 | 18 | 1.10 | 47.17 |
Saint Vincent and the Grenadines | 3 | 33 | 2.60 | 4086.96 |
Timor-Leste | 1 | 20.8 | 5.90 | 106.94 |