Exercise

Effect size for categorical variables

You saw in the City of Austin employee data that job titles have an unequal distribution of genders. But does the same thing hold for ethnicities? And to what extent does ethnicity relate to the job title chosen? In this exercise you'll dig in and answer that question.

A DataFrame of comparing job titles and ethnicities (employees_df) has been loaded for you, as have the packages pandas as pd, NumPy as np, and stats from SciPy.

Instructions 1/2

undefined XP
    1
    2
  • Compute the chi-squared statistic from the contingency table employees_df.
  • Compute the degrees of freedom for Cramer's V.
  • Compute the total number of people in the contingency table.
  • Compute Cramer's V using the equation from the video.