
Introduction
Do people in countries with more women in congress live longer, happier lives? Political office, or positions in parliament or congress have historically been dominated by men in virtually every country where some form of government exists. Over the years though, there’s been a steady increase of women in parliament in several countries.
This is a report of my findings from a statistical analysis of data aimed at testing whether countries with more women in parliament have higher life expectancies and higher Happiness scores. So what exactly is a happiness score?
"Please imagine a ladder, with steps numbered from 0 at the bottom to 10 at the top. The top of the ladder represents the best possible life for you, and the bottom of the ladder represents the worst possible life for you. On which step of the ladder would you say you personally feel you stand at this time?" This measure, also referred to as Cantril life ladder, was how the happiness score per respondent was gathered for the countries investigated.
A dataset consisting of average life expectancies per year for each country was analyzed. The time span for the collection of the data used in this study started as far back as the year 1800 for the the life expectancies data, to as recently as 2005 for the happiness scores, and ranged up to 2019/2020. I sourced all data from Gapminder.
Methodology
In total, I included one hundred and sixty countries across the globe in this study, with each country having average values for the proportion of women in parliament, Life Expectancy, and happiness score data for each year data was collected.
For ease of analysis, the data was grouped by country, then the averages of all three values, life expectancy in years, percent women in parliament, and happiness score were computed over all the years data was collected, leaving each country with exactly three average values for the three variables in question.
Two additional features were created to aid the analysis; the new features were used to categorize the happiness score and proportion of women in parliament into a high or low happiness score, or a high or low proportion of women in parliament.
Finally the data was split into two based on countries with a high proportion of women in parliament, and a low proportion of women in parliament. The means of the life expectancies and happiness scores were then computed and compared in 2-sample t-tests to see if the differences of the means were statistically significant at the alpha significance level of 0.05
Women in Parliament and Life Expectancy
Results showed that the countries with a higher percentage of women in parliament had a mean life expectancy of about 73.1yrs, while the countries with low percentage of women in parliament had a mean of 69.7yrs. I ran a two-sample t-test to see if this difference was statistically significant – not equal to zero (alternative hypothesis), or if it is not statistically significant – equal to zero (null hypothesis).

fig(1) Click here for an interactive version of the chart above. The violin plots above show the countries with a high level of women in parliament on the left and those with a low level on the right. The internal box plots show the countries with a higher level of women in parliament generally have higher life expectancies on average.
Two-sample t-test result (means of life expectancy)
The p-value from the t-test was 0.0097, so I reject the null hypothesis and conclude that the difference in means of life expectancies between countries with a high percentage of women in parliament, and countries with a low percentage of women in parliament is not equal to zero, and is statistically significant at the alpha significance level of 0.05. So one could conclude that it is most likely the case that countries with a higher percentage of women in parliament most likely also live longer on average.

fig(2) Click here for an interactive version of the chart above. The bar chart shows the top 20 countries with the highest proportion (shown as a percentage) of women in parliament. Rwanda surprisingly tops the list at almost 55%, but the country is also an outlier on the top countries list with an average life expectancy of about 65yrs, which is lower than every other country’s average on the list of top countries.
Women in Parliament and Happiness Score
The countries with a higher percentage of women in parliament had a mean happiness score of about 45.1%, while the countries with a low percentage had a mean happiness score of about 36.6%. I repeated the process of verifying if the difference of the means is statistically significant by running a two sample t-test as I did earlier.

fig(3) Click here for an interactive version of the chart above. The box plots above show the plot for countries with a high level of women in parliament on the left, and the countries with a low level on the right. From the plots, we see that the countries on the left have on average higher happiness scores, or percent happiness than the countries on the right.
Two-sample t-test Result (means of happiness score)
The p-value was 0.0009, so I reject the null hypothesis and conclude that the difference in means of the happiness scores between countries with a high percentage of women in parliament and countries with a low percentage is not equal to zero, and is statistically significant at the 0.05 alpha level. Which leads to the conclusion that it is most likely the case that countries with a high percentage of women in parliament are most likely also happier on average.

fig(4) Click here for an interactive version of the chart above. The Bar chart shows the top 20 countries with the highest happiness scores. Denmark tops this list with an average happiness score of about 72%.
Happiness Score and Life Expectancy
To wrap the study up, I conducted a regression analysis to test for how happiness score relates to life expectancy.
Regression Analysis/Regression Plot

fig(5) Click here for an interactive version of chart above. Regression plot showing OLS regression plot fitting life expectancy and happiness score. The line is of less than moderate strength, but positive.
Regression Analysis Result (life expectancy and happiness score)
The OLS result showed a p-value of less than 0.005 and R-Square value of 0.33. Hence we reject the null hypothesis which states that the two variables fitted for the model are not related, and conclude that there is a statistically significant relationship between percent happiness and life expectancy at the 0.05 alpha level. The regression line shows a positive, but medium to weak correlation between percent happiness and life expectancy; about 33% of the variability in life expectancy can be explained by changes in percent happiness.

fig(6) Click here for an interactive version of the chart above. Bubble plot showing the average values for happiness score and life expectancy. The colors represent either a high or low percentage level of women in parliament, while the bubble size represents the actual percent of women in parliament in each country.
Animated Bubble Plot of Life Expectancy V Happiness Score

fig(7) Click here to animate the bubbles in chart above. Bubble plot showing how percent women in parliament, happiness score, and life expectancies changed between 2005 and 2019. Notice how the bubbles flowed upwards and slightly rightwards, suggesting an increasing proportion of women in parliament in the countries represented by the bybbles.
Conclusion, Limitations and Outlook
To the question of whether countries with a higher percentage of women in parliament also have a higher life expectancy than countries with fewer women in parliament, I conclude that when a country has a higher percentage of women in parliament, chances are high that the country would also have a higher life expectancy.
In addition, chances are high that the countries with a higher percentage of women in parliament also have a higher happiness score on average compared to their counterpart countries with fewer women in parliament.
For the regression analysis, I found that there was a relationship between happiness score and life expectancy with a positive, albeit less than moderate strength correlation between the two variables.
For data cleaning, I replaced missing values in the original datasets with zeros for the purpose of analysis, and due to the varying range of years across the three data files, the final dataframe had 160 total countries. So it is likely that results of the t-tests and regression analysis may be different if more countries are added to the list with data spanning a longer time period.
The outlook for this project may include sourcing for more data on the proportions of women in parliament in more countries with a final goal of testing if the results covered here would still hold.
A secondary goal would be to investigate how other social factors combined with a higher percentage of women in parliament affect life expectancy and happiness.