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).

Slope, years of life per 10x income ... 95% CI ...
p-value ... Two-sided t-test, H0: slope = 0
R2 ... Variance explained
n ... Observations in current selection

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.

Continent
1952 - 2007

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.

Scatter plot of GDP per capita versus life expectancy Log-scaled GDP per capita on the x-axis, life expectancy in years on the y-axis, points colored by continent, with an overlaid OLS regression line.
Filtered fit: slope ... years per 10x income, 95% CI ..., p ..., R2 ..., n ...

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.

Bar chart of mean life expectancy by continent Bars show mean life expectancy by continent with 95 percent confidence interval error bars for the current filter selection.
One-way ANOVA across continents, current selection: F ..., p ...

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.

lifeExp = beta0 + beta1 * log10(gdpPercap) + error
  1. Model

    lifeExp = beta0 + beta1 * log10(gdpPercap) + error, fit by ordinary least squares because income is heavily right-skewed.

  2. Inference

    The slope gets a t-distribution based 95% confidence interval and a two-sided p-value.

  3. Client-side recomputation

    Changing a filter refits the model from scratch with the closed-form normal equations. No filtered answer is looked up.

  4. 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.