Session Ready
Exercise

Distribution of income

In the next two exercises we'll look at relationships between income and other variables. In the BRFSS, income is represented as a categorical variable; that is, respondents are assigned to one of 8 income categories. The variable name is 'INCOME2'. Before we connect income with anything else, let's look at the distribution by computing the PMF. Recall that all Pmf objects have a .bar() method.

Instructions
100 XP
  • Extract 'INCOME2' from the brfss DataFrame and assign it to income.
  • Plot the PMF of income as a bar chart.