Putting It Together: Contingency Tables

Let's say you ran the same study looking at how much money people have and their education level, but you used categories instead. You measured education (the independent variable) as "high school" or "university" and money (the dependent variable) as "high" or "low". This information is saved in your console as td.

This exercise is part of the course

Basic Statistics

View Course

Exercise instructions

  • Enter td into your console and have a look at your contingency table
  • In your console, calculate what percentage of people with high money are university educated
  • In your console, calculate what percentage of people with low money are high school educated
  • What kind of education is linked to more money?
  • Answer all questions in your script. Round numerical answers to one decimal place, and make sure text answers are in lower case and used as strings (i.e. using "").

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Percentage of people with high money that are university educated


# Percentage of people with low money that are high schol educated


# What kind of education is linked to more money?