Exercise

Two-sample t-test

Now we'll compare two sets of samples. Again, we'll be looking at the Sex_ratio (number of males per 100 females) found in different countries, but this time we're going to compare the Sex_ratio of European countries with Asian countries. Does the mean sex ratio differ between the two continents? A two-sample t-test can tell us whether the means of two samples differ significantly. The dataset is provided as euasdata. pandas, scipy.stats, and plotnine have been loaded into the workspace as pd, stats, and p9. You'll do some exploratory data analysis, then compare the groups via a statistical test.

Instructions 1/2

undefined XP
    1
    2
  • Using ggplot() with geom_density(), create a density plot of Sex_ratio on the x-axis, with each Continent assigned a fill color.