01
Happiness,
Wealth & Support
Exploring how national wealth and social support relate to reported happiness and life expectancy
View on GitHub →5.54
Mean happiness
5.69
Median happiness
14.32
Lowest reduced χ²
Social support linear model
2
GDP groups
Low and high GDP subsets
Problem
How much can simple economic and social indicators explain differences in reported wellbeing?
National happiness scores correlate with measures of wealth, health and social conditions, but a visible trend does not necessarily imply that a simple model adequately describes the data. This study compares several functional forms and asks whether GDP per capita or social support provides the stronger single-variable description of reported happiness.
Central idea
Better fit does not automatically mean better model.
Model quality is assessed using weighted least-squares fitting, reduced χ², visual behaviour and whether increasing complexity is justified by the structure of the data.
Method
Fit, compare, then interrogate the assumptions.
Happiness score is first modelled as a function of logged GDP per capita using measured happiness uncertainties. Linear, exponential, quadratic and cubic functions are fitted using weighted least squares. Their goodness of fit is then compared using χ² and reduced χ².
Social support is then tested as an alternative predictor before the analysis is extended to ask how relative social support relates to relative life expectancy within low- and high-GDP countries.
01
Weighted regression
Measured happiness uncertainties are included directly in the fitting.
02
Goodness of fit
χ² and reduced χ² quantify the discrepancy between each model and the observations.
03
Model comparison
Increasing flexibility is judged alongside visual behaviour and interpretability.
04
Relative analysis
GDP subsets are normalised internally before social support and life expectancy are compared.
Model Selection
More flexible models reduce χ², but complexity has a cost.
A straight-line fit to logged GDP per capita gives a reduced χ² of 23.42. Exponential and quadratic descriptions improve this only modestly, while the cubic reaches 21.58.
The cubic nevertheless develops an implausible trend at the lowest-GDP end of the sample, where a single sparse data point has disproportionate leverage. The notebook therefore favours the exponential or quadratic description over the formally lower-χ² cubic model.
This is the key model-selection lesson of the study: numerical fit quality should be interpreted alongside data coverage, model behaviour and the risk of overfitting.
GDP → Happiness model comparison
| Model | Reduced χ² | Interpretation |
|---|---|---|
| Linear | 23.42 | Simple baseline; inadequate description. |
| Exponential | 22.53 | Modest improvement with plausible global behaviour. |
| Quadratic | 22.43 | Similar improvement to exponential model. |
| Cubic | 21.58 | Lowest χ², but unstable behaviour at sparse low-GDP edge. |
Linear GDP fit
m = 0.910 ± 0.012
χ² = 3138.62
Model archive
4 fitted forms
Parameters, uncertainties and fitted curves are retained in the website JSON.
Alternative Predictor
Social support provides the stronger single-variable relationship with happiness.
A weighted linear fit between social support and happiness produces a reduced χ² of 14.32, substantially below the 23.42 obtained from the linear GDP model.
Neither relation fully explains the observed scatter: both reduced χ² values remain far above unity. The comparison instead suggests that reported wellbeing cannot be adequately reduced to national income alone and motivates a multi-variable view of economic and social outcomes.
GDP linear model
23.42
Reduced χ²
Social support model
14.32
Reduced χ²
8.249 ± 0.097
Fitted slope
-0.973 ± 0.082
Intercept
1918.68
χ²
Extended Analysis
Does social support relate differently to life expectancy across low- and high-income countries?
Logged GDP is strongly correlated with both life expectancy and social support, so the two GDP groups cannot be compared directly. Each group is therefore normalised by its own mean social support and life expectancy before the relative relationship is fitted.
GDP ↔ Life expectancy
R² = 0.701
p = 5.47 × 10-37
GDP ↔ Social support
R² = 0.550
p = 5.20 × 10-25
Low GDP
0.222 ± 0.045
Slope
0.265
R²
p-value: 6.94 × 10-6
High GDP
0.293 ± 0.086
Slope
0.149
R²
p-value: 1.13 × 10-3
Interactive
Relative social support vs relative life expectancy
Compare the fitted relationship within the low- and high-GDP subsets. Both variables are normalised by the mean of their respective GDP group.
0.222 / 0.293
Low / high GDP slope
0.265 / 0.149
Low / high GDP R²
Both fitted relationships are positive.
Comparison
Results
Economic outcomes are structured by more than income alone.
GDP per capita is positively associated with happiness, but none of the tested single-variable GDP models provides a statistically complete description of the observed variation.
Social support produces a substantially lower reduced χ² than the linear GDP relationship, indicating a stronger single-variable association with happiness within this sample.
Relative social support is positively associated with relative life expectancy in both GDP subsets. The relationship explains more variance in the low-GDP group, while the fitted slopes remain statistically compatible within their uncertainties.
The analysis therefore favours a multi-factor interpretation: income, social conditions and health outcomes are related, but their interactions cannot be reduced to a single simple model.
Key limitation
The high-GDP group spans a much narrower relative-social-support range than the low-GDP group, limiting how confidently the two fitted relationships can be compared.
Written Report
A concise written analysis of the study.
This report develops the analysis presented on this page into a standalone written case study, covering the modelling approach, comparison of GDP and social support, and the extension to relative life expectancy across GDP groups.
Open PDF↗Analysis Report
↗Happiness, Wealth & Support
Model comparison, social-support analysis and GDP-group extension.
References⌄
Data⌄
| Dataset | World Happiness dataset used in PHYS465 Worksheet 1 |
| Primary variables | Happiness score, happiness uncertainty, logged GDP, social support and life expectancy |
| GDP grouping | Equal-frequency low/high GDP groups created using pandas qcut(q=2) |
| Relative analysis | Social support and life expectancy were divided by the mean of their respective GDP subset. |
| Core packages | NumPy Pandas SciPy Matplotlib |