GDP per capita (per person) is the total GDP divided by the size of the resident population. It can be considered an indicator of a country's standard of living but should be used with caution because of the differences in the cost of living in different countries. In some range of GDP per capita, the affect of the standard of living on life expectancy can be seen. This Demonstration shows the relation of GDP per person to the life expectancy (blue point) and median age (red point) for both female and male citizens in a country.
For each country of the world, the points are the life expectancy and median age as a function of GDP per capita. You can see that GDP per capita strongly affects life expectancy in the poor countries (which have low GDP). In these countries, improvements to living conditions, as reflected by a rise in GDP per person, would very likely lead to higher life expectancies. But life expectancy increases up to the limit (about 80 years old) and then is almost independent of GDP per person. That is, at some standard of living that is good enough, life expectancy reaches its maximum value.
The difference of life expectancy in a poor country and a well-off country is very large, about 40 years (from 40 to 80 years old). For the median age, this difference is about 25 years (from 15 to about 40 years).
This Demonstration shows that for very poor countries, the GDP per person is a very important factor that affects life expectancy; but for high-GDP countries, there are more important factors (education, environment, society, ...) affecting life expectancy.