Statistical dashboard · real data · real inference
Does national income predict how long people live?
An OLS regression of life expectancy on log10(GDP per capita) across ... country-year observations from the public Gapminder dataset (1952-2007).
Every number above is computed live from data/findings.json and client-side OLS. Nothing on this page is hand-typed.
01 / Explore
Filter the relationship, not the evidence.
Choose continents and a year range. The browser refits the regression, redraws both charts, and updates every readout for the exact rows in your selection.
Income vs. life expectancy
Each point is one country in one year. The x-axis is log-scaled GDP per capita, and the line is the OLS fit for the current selection.
02 / Continents
The same selection, viewed by place.
Bars show mean life expectancy for the current selection. Error bars are 95% confidence intervals from the t-distribution.
03 / Methodology
A transparent model with a live check.
The headline is an ordinary least squares regression, and every filter is recomputed in the browser from the underlying country-year rows.
- Model
lifeExp = beta0 + beta1 * log10(gdpPercap) + error, fit by ordinary least squares because income is heavily right-skewed. - Inference
The slope gets a t-distribution based 95% confidence interval and a two-sided p-value.
- Client-side recomputation
Changing a filter refits the model from scratch with the closed-form normal equations. No filtered answer is looked up.
- Dataset provenance
Loading dataset provenance...
04 / Limitations
What the data cannot tell us.
- Observational, not experimental. No country was randomly assigned an income level, so reverse causation and confounding remain possible.
- Country-level aggregation. GDP per capita and life expectancy are national averages, not measures of within-country inequality.
- Five-year sampling. The data are recorded at five-year intervals from 1952 to 2007, so short-term shocks are invisible.
- Historical window. The series predates recent shifts in global health and income and should not be extrapolated to the present.
- Coarse continent grouping. Each continent blends very different national trajectories.
- Small-sample subsets. A narrow selection can leave few observations. The live n and confidence interval show that instability.