# Income inequality and happiness

## Question

Suppose you are given two datasets as shown below:

• Data on the Gini coefficient (proxy for income inequality).

• This is a number between 0 and 1, where 0 corresponds to perfect equality (e.g. everyone has the same income) and 1 corresponds to perfect inequality (where one person has all the income—and everyone else has no income). You can read more about the Gini coefficient on Wikipedia here

• Data containing a Happiness Score from the World Happiness Report.

• The score represents a weighted average across a number of variables and ranges from 1-10, where 10 is perfectly happy. You can read more about the World Happiness Report Wikipedia here

Given this data, determine if there is a correlation between income equality (field: 'current' in Gini index dataset) and happiness (field: 'overall_score' in Happiness dataset). You'll only want to keep records that exist in both datasets (there are many countries/regions in the World Happiness Report that do not have a measured Gini index).

To help get you started, here is a Google Colab notebook with the datasets imported.

## Solution

### Access restricted

Subscribe to premium account to see the solution.