/stats-hw-with-python-categorical-variables

A Jupyter notebook showing how to solve statistics homework problems with Python.

Primary LanguageJupyter Notebook

Code for a post on medium.com: Doing Your Statistics Homework With Python, Part 1

This repo contains a jupyter notebook that contains functions useful for solving Statistics problems that ask questions about the distribution of a single categorical variable. In particular:

  1. Finding the total number of observations
  2. Converting the frequency table into a relative frequency table
  3. Finding the percent of values that fall into a list of categories.
  4. Displaying the distribution with a bar chart and a pie chart (with matplotlib and seaborn).