Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

R question 4 Load the countries data set countries.csv. We want to test whether the population size in Africa is the same as the population

R question 4

Load the countries data set "countries.csv". We want to test whether the population size in Africa is the same as the population size in Europe using a two sample t-test. In order to just do the comparison, we will filter the dataset so it only includes Africa and Europe:

library(dplyr)

filtered_countries

a. One of the assumptions of a t-test is that variables are normally distributed. Plot a histogram of "total_population_in_thousands_2015" for both Europe and Africa. Are these normally distributed? WriteYESorNo

b. Let's transform these variables. Which transformation should we use for this data?

c. After applying the correct transformation, does the total population look normally distributed? WriteYESorNo

d. Do a t-test using the appropriate data, report the following values (for both means, report the mean after applying the antilog):

Mean Africa =

Mean Europe =

p-value =

e. Based on your results, look up the critical valueof this comparison. Do you reject or fail to reject the null hypothesis? WriteREJECTorFAIL TO REJECTin the following blank. This question is case sensitive

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed
dpt2_vacci fines_for_tmortality_/ cigarette_ continent ecological_ ecological_ cell_phone_subscriptions_per_10 75 No 123.6 NA Asia NA NA 53.9 98 Yes 123.1 NA Europe 1.86 1.8 108.45 95 No 80.6 1.58 Africa 1.79 16 103.31 97 No NA NA Europe NA NA 74.27 64 No 89.6 NA Africa 0.82 NA 48.61 99 No NA NA North Ame NA NA 198.62 94 Yes 131.5 1.8 South Ame 3.79 2.7 142.51 93 Yes 219.6 0.94 Europe 1.16 NA 106.88 92 Yes 111 15.4 Oceania 8.49 NA 106.19 98 Yes 122 6.23 Europe 5.45 5.3 161.21 94 No 112.8 1.95 Europe 2.18 NA 107.47 96 Yes 103.8 7.25 North Ame NA NA 72.31 98 No 71.3 NA Asia NA NA 156.23 94 Yes 87.8 0.72 Asia 0.6 0.7 63.76 94 No 140.4 NA North Ame NA NA 126.4 97 Yes 117 0.89 Europe 5.27 NA 112.06 99 Yes 130.3 7.31 Europe 5.88 NA 119.39 95 No 83.4 3.53 North Ame NA 2.1 50.62 75 Yes 89.6 NA Africa 0.97 NA 89.91 99 Yes 80.1 NA Asia 0.79 NA 74.74 98 Yes 106.6 1.49 South Ame 1.29 NA 92.64 86 Yes 108.9 2.17 Europe 1.29 NA 89.53 95 Yes 86.5 NA Africa 1.68 NA 150.09 93 Yes 118.5 2.62 South Ame 2.6 2.9 125.19 99 Yes 86.4 NA Asia NA NA 113.77 88 Yes 132.3 3.12 Europe 3.81 NA 145.73 91 Yes 91.7 NA Africa 0.9 NA 57.07 95 No 134.1 1.14 Africa 0.75 NA 25.68 95 Yes 63.1 NA Africa NA NA 84.16 88 No 100.6 0.36 Asia 0.83 NA 131.96 87 Yes 73.4 1.29 Africa 0.89 NA 64.04 91 Yes 119 7.79 North Ame 7.66 NA 75.74 47 No 81.5 NA Africa 1.12 NA 23.39 46 Yes 88 NA Africa 0.75 NA 35.49 95 Yes 115.3 3.82 South Ame 3.39 3.2 138.5 99 Yes 143.4 1.48 Asia 1.84 NA 81.26 90 Yes 91.1 1.32 South Ame 1.9 1.8 103.19 80 Yes 100.7 1.45 Africa NA NA 32.33 90 Yes 70.5 NA Africa NA NA 101.18 99 Yes NA NA Oceania NA NA NA 91 Yes 110.7 2.8 North Ame 2.77 2.5 128.32 95 Yes 158.6 4.15 Europe 2.35 NA 113.31 99 No 133.1 NA North Ame 2.1 1.9 14.95 99 Yes 93.3 5.39 Europe NA NA 98.39 99 Yes 142.2 3.73 Europe 6.3 NA 122.79 93 No 147.2 NA Asia NA NA NA\f\f\f\f

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Algebra advanced algebra with financial applications

Authors: Robert K. Gerver

1st edition

978-1285444857, 128544485X, 978-0357229101, 035722910X, 978-0538449670

More Books

Students also viewed these Mathematics questions