Relationship between Happiness & LifeQuality .pdf
wrachelsong
59 views
64 slides
Mar 09, 2025
Slide 1 of 64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
About This Presentation
There a lot of studies showing the correlation between GDP by country and average life satisfcation. Usually, most countries with higher GDP tend to have higher average life satisfaction scores. Inspired by this findings, I began to wonder.. 'What other aspects of life significantly contribute t...
There a lot of studies showing the correlation between GDP by country and average life satisfcation. Usually, most countries with higher GDP tend to have higher average life satisfaction scores. Inspired by this findings, I began to wonder.. 'What other aspects of life significantly contribute to happiness?' Specifically, we wanted to explore which quality of life indicators have a significant relationship with the happiness scores of different regions.
Research Question : Which quality of life indicators have a significant relationship with the happiness score among different regions?
To address this question, we decided to investigate various factors that might influence happiness, including economic stability, health, social support, and more.
Size: 7.35 MB
Language: en
Added: Mar 09, 2025
Slides: 64 pages
Slide Content
Relationship between
Happiness Score and
Quality of Life Indicators
CDS 230-Group #3
Woohyun Song
Kieran Tang
Yoonjoo Lee
Yonggyun Kim
Jiwon Park
Gahyun Ahn
Table of Content
Introduction1.
Background Information2.
Research Question3.
Data Explanation4.
Tidying up Data5.
Analyzing Relationships6.
Functions7.
8. Visualization
9. Modeling
10. Conclusion
Introduction
Background
Information
Background Information
A landmark survey of the state of global happiness
Ranks 155 countries by their happiness levels
Released at the UN, celebrating International Day of
Happiness
Review the state of happiness in the world today
Background Information
An annual survey to measure the state of open government data around the world
An independent assessment from a citizen’s perspective
Limit to datasets published by governments
Enable standardized & robust assessments
Which quality of life indicators
have a relationship with
the Happiness Score
among the regions?
Research Question
Data
Explanation
Happiness Score: The average score of happiness as rated by respondents on a
scale from 0 to 10
Economy (GDP per Capita): The contribution of GDP per capita to the happiness
score
Family: The contribution of social support and family to the happiness score
Health (Life Expectancy): The contribution of life expectancy to the happiness score
Data Explanation
Happiness rank and scores by country, 2015 (Kaggle)
2015.csv
Freedom: The contribution of perceived freedom to make life choices to
the happiness score
Trust (Government Corruption): The contribution of the perception of
government corruption to the happiness score
Generosity: The contribution of generosity and charitable donations to the
happiness score
Dystopia Residual: The contribution of a hypothetical dystopian scenario
to the happiness score, serving as a benchmark for other variables
*Dystopia: an imaginary place where people are unhappy and
usually afraid because they are not treated fairly compare
Data Explanation
Openness scores : How much Government open
their data
Their corresponding rankings by country.
Data Explanation
countries.csv
2013~2015(Kaggle)
Tidying up
Data
Step 1 Step 2 Step 3
Load two datasets
Merge two datasets
to a new dataset
Choose variables that
will be used for the analysis
Tidying up data
Step 1
Load two datasets
Tidying up data
Step 1
Information about datasets
‘happiness‘ Dataframe
Total entries: 158 rows (countries)
Total columns: 12
Categorical data: 2
Numerical data: 10
Data types: object (2 columns),
int64 (1 column), float64 (9
columns)
Tidying up data
Step 1
Information about datasets
‘Openness_score‘ Dataframe
Total entries: 149 rows (countries)
Total columns: 8
Categorical data: 2
Numerical data: 6
Data types: object (2 columns), int64
(2 column), float64 (4 columns)
Tidying up data
Step 2
Country
Region
Happiness Score
Economy (GDP per Capita)
Standard Error
Family
Selected columns in ‘happiness‘ dataframe
Choose variables that will be used for the analysis
Health (Life Expectancy)
Freedom
Trust (Government Corruption)
Generosity
Dystopia Residual
Tidying up data
Step 2
Country name
2015 Score
Choose variables that will be used for the analysis
Selected columns in ‘Openness_score‘ dataframe
Tidying up data
Step 2
Rename columns for easier merging and visibility
Country name
2015 Score
Country
2015 Openness Score
Choose variables that will be used for the analysis
Tidying up data
Merge two datasets to a new datasetStep 3
Tidying up data
Sort by most happiness countriesStep 3
Tidying up data
Analyzing
relationships
Scatterplot of variables
Pairplot of weak relationship
‘Dystopia Residual’ : Positive
relationship but additional
happiness indicators required
‘Trust (Government Corruption) &
‘Generosity‘ : NO linear pattern
Pairplot of
'Happiness Score',
'2015 Openness Score',
'Economy (GDP per Capita)',
'Health (Life Expectancy)',
'Freedom',
'Family'
Pairplot of
variables
2015 Openness Score Economy (GDP) Health FamilyFreedom
Relationship between Happiness score
and 5 variables
Openness, Economy, Health, Freedom and Family vs Happiness Score
The scatterplot for all shows positive correlation.
Functions
A list of countries extracted from df_merged dataframe
Purpose : To get happiness scores by countries
List of countries to be analyzed
Total
118 countries
in a list
[Switzerland, Iceland, Denmark,
Norway, Canada,
.
.
.
Burkina Faso, Rwanda, Benin,
Syria, Togo]
By using the def function, returns a dictionary with the
country as the key and the region as the value
Show region for each country
Switzerland : Western Europe
.
.
.
Syria : Middle East and Northern Africa
Togo : Sub-Saharan Africa
Switzerland : Western Europe
key
value
Grouping countries in the same region
WESTERN EUROPE
[Switzerland, Iceland, Denmark,
... ,
Italy, Cyprus, Portugal, Greece]
NORTH AMERICA
[Canada, United States]
AUSTRALIA &
NEW ZEALAND
[New Zealand, Australia]
MIDDLE EAST &
NORTHERN AFRICA
[ Israel, United Arab Emirates,
Oman, ... , Egypt, Yemen, Syria]
LATIN AMERICA & CARIBBEA
[ Costa Rica, Mexico, Brazil, Panama, ... ,
Jamaica, Dominican Republic, Haiti ]
Too much to compare across countries, so group them by region
Grouping countries in the same region
SOUTHEASTERN ASIA
[Singapore, Thailand, Malaysia, ... ,
Myanmar, Cambodia]
CENTRAL &
EASTERN EUROPE
[Czech Republic, Uzbekistan, Slovakia, … ,
Ukraine, Armenia, Georgia, Bulgaria]
EASTERN ASIA
[Taiwan, Japan,
Hong Kong, China]
SUB-SAHARAN AFRICA SOUTHERN ASIA
[Nigeria, Zambia, Lesotho, South
Africa, … , Rwanda, Benin, Togo]
[Pakistan, Bangladesh,
India, Nepal]
Too much to compare across countries, so group them by region
Replace country names
with their openness scores
WESTERN EUROPE
[47, 48, 70,
...
55, 0, 34, 39]
[Switzerland, Iceland,
Denmark,
...
Italy, Cyprus, Portugal,
Greece]
WESTERN EUROPE
Purpose : To visualize the distribution of openness scores across regions
Ex)
Replace country names with their GDP
[Canada,
United States]
NORTH AMERICAEx)
Purpose : To visualize the distribution of GDP across regions
NORTH AMERICA
[1.33,
1.39]
Replace country names with their
Freedom
AUSTRALIA &
NEW ZEALAND
Ex)
Purpose : To visualize the distribution of Freedom across regions
AUSTRALIA &
NEW ZEALAND
[1.33,
1.39]
[New Zealand,
Australia]
Replace country names with their
Health
[0.88, 0.99,
1.01, 0.82]
[Taiwan, Japan,
Hong Kong, China]
EASTERN ASIA
Ex)
Purpose : To visualize the distribution of Health across regions
EASTERN ASIA
Replace country names with their Family
SOUTHERN AISA
Purpose : To visualize the distribution of Family across regions
Ex) SOUTHERN AISA
[Pakistan,
Bangladesh,
India, Nepal]
[0.41,
0.43,
0.38, 0.86]
Visualizations
Box plot of Happiness Scores by regions
NORTH AMERICA
AUSTRALIA & NEW ZEALAND
Lowest median happiness scores
SUB-SAHARAN AFRICA
SOUTHERN ASIA
Highest happiness levels
Lower variability
Widest spread among the regions
MIDDLE EAST &
NORTHERN AFRICA
Violin plot of Openness Scores by regions
WESTERN EUROPE
NORTH AMERICA
Lower median happiness scores
MIDDLE EAST & NA
SUB-SAHARAN AFRICA
High openness score
Widest spread among the regions
Significant variability in openness scores
AUSTRALIA & NEW ZEALAND
NORTH AMERICA
AUSTRALIA & NEW ZEALAND
Density plot of GDP Scores by regions
High GDP scores
Narrow Distribution
Lower GDP scores
Significant variability
MIDDLE EAST AND
NORTHERN AFRICA
SOUTHEASTERN ASIA
Box plot of Freedom Scores by regions
Higher freedom score
Low variability
WESTERN EUROPE
NORTH AMERICA
AUSTRALIA &
NEW ZEALAND
LATIN AMERICA & CARIBBEAN
CENTRAL & EASTERN EUROPE
Lower freedom median score
Density plot of Health Scores by regions
Lower health scores
Significant variability
SOUTHEASTERN ASIA
Highest density of health scores
Narrow distributions
AUSTRALIA &
NEW ZEALAND
Box plot of Family Scores by regions
WESTERN EUROPE
NORTH AMERICA
AUSTRALIA & NEW ZEALAND
High Family Score
Low Variability
CENTRAL, EE &
SOUTHERN ASIA
Low Family Score
High Variability, Outliers
Pairplot of
variables by
regions
2015 Openness Score Economy (GDP) Health FamilyFreedom
Relationship between Happiness score
& 5 variables by region
Sub-Saharan Africa
Western Europe
higher scores across all variables with strong positive correlations to happiness
Lower scores across all variables with strong positive correlations to happiness
Happiness
Score
Heatmap of variables
Openness
Score
Economy
(GDP)
HealthFamilyFreedom
Happiness
Score
<GDP>
Highest positive correlation with
happiness score of 0.8.
Happiness
Score
Heatmap of variables
Openness
Score
Economy
(GDP)
HealthFamilyFreedom
Happiness
Score
<Openness>
Lowest positive correlations with
Happiness Score of 0.49
Happiness
Score
Modeling
RMSE
(Root Mean Square Error)
measures the average
difference between predicted
and actual values,
with lower values indicating
more accurate predictions
R - Squared
shows how well a model's
predictions fit the data,
with values closer to 1
indicating better fit
What is R-Squared and RMSE?
Splitting the test and train sets
The data is split into 70% for training and 30% for testing
To accurately evaluate the performance of our model
70%
Training data
30%
Test Data
Simple Linear Regression
Strong Positive correlation
Higher GDP and stronger affect of family support are
associated with higher happiness scores
GDP Family
Simple Linear Regression
Positive correlation
Suggests that better health and greater freedom contribute
to higher levels of happiness
Health Freedom
Simple Linear Regression
Weaker linear relationship than GDP and family
Openness Score contribute to happiness, but the impact is small
Openness Score
Simple Linear Regression Results
With test/train split Without test/train split
Models evaluated with a test/train split tend to have slightly lower R-squared values
and higher RMSE values compared to using the full dataset.
-> indicating a more conservative and realistic estimate of model performance
GDP, Family, and Health
high R-squared values and low RMSE values
largest impact on predicing Happiness
score
Impactful Variables
Less Impactful Variables
Freedom, Openness Score
low R-squared values and high RMSE values
do not significantly contribute to the
prediction of Happiness Score
3 variables to be used for
Multiple Linear Regression Model
GDP
Family
Health
-> GDP, Family, and Health are included in the multiple regression model,
highlighting their importance in predicting the Happiness Score
Plot The Data To Test For Linearity
All three variables
show a positive correlation with the
Happiness Score, reinforcing their
significance in predicting happiness.
RMSE R-squard
0.57 0.7279
Evaluate Model Performance
GDP
Family
Health
RMSE of 0.57 suggests that the model predicts fairly accurately.
R-squared value of 0.7279 means that the model explains approximately 72.79% of the variability
in the data, indicating a strong explanatory power
-> The model provides a good fit and predicts the Happiness Score with
reasonable accuracy
Conclusion
Which quality of life indicators have a relationship
with the Happiness Score among the regions?
1. Key Indicators
GDP (Per Capita): Strongest positive correlation
Family Support: Strong positive effect of family
support
Health (Life Expectancy): Strong positive correlation
2. Less Impactful Indicators
Which quality of life indicators have a relationship
with the Happiness Score among the regions?
Freedom: Weaker correlation with happiness
compared to GDP, family support, and health
Openness Score: Minimal impact on happiness score
High scores
across most indicators,
leading to higher happiness scores.
Lower scores across indicators
but still positive correlations
with happiness
3. Regional Differences
Which quality of life indicators have a relationship
with the Happiness Score among the regions?
WESTERN EUROPE
NORTH AMERICA
AUSTRALIA/NEW ZEALAND
SUB-SAHARAN AFRICA
SOUTHERN ASIA