Correlating Population - Age Median - GDP using Statistical Computing

Updated: Apr 16

Exploring incredible stats with data

In this blog I've picked four countries namely India , China ,United States and Japan. I have compared the Population Distribution and Age Median of these countries and explored how it has an impact on GDP.


The world's total population is 7.8 billion while the sum of these countries population is 3.2 billion which covers more than 41.03% of the world's total population. Comparatively , The world's total GDP is 138 trillion, while the sum up of these countries is 43.93 trillion which wraps up to 31.83% of world's total GDP.

This Bar chart clearly reveals that the India and China are in the front-line with major portion of World's Population. This distribution varies with the manoeuvre and initiatives taken by the respective countries. By seeing the chart, Japan is about to contain their population by taking scrupulous proceedings. On the other hand India and China is about to have the world's largest citizenry. Finally, USA which stands at the middle who has neither massive inhabitants nor less populace.

Code section - Population Bar Plot :

Note : All the plots and graphs are done with R programming language

population_bar <- pop %>%
  filter(year == 2020) %>%
  ggplot(aes(x = country ,y = pop ,fill = country ,label = population))  +
  geom_bar(stat = "identity") +
  coord_flip() +
  xlab("Country") +
  ylab("Population (In Billions)") +
  ggtitle("Population in 2020") +
  geom_text() +

Population Forecast

From this graph we can observe that India will overshadow China's total population in 2030 and will be standing at rank 1. This is because of the stringent measures taken by the Chinese palatinate. On the other hand Japan will be over containing the population which leads to depreciation of populace. USA will be having a piecemeal growth in total population but it will step down from it's rank 3 to rank 4 in 2040. To conclude , China and Japan over contains the population and has a decline in their citizenry, where India will be the marshal of total population in 2030.

Code section - Population Forecast line graph :

for_pop <- forecast %>%
  ggplot(aes(year ,pib ,color = country)) +
  geom_point(size = 3) +
  geom_line(size = 2 ,alpha = 0.2) +
  xlab("Year") +
  ylab("Population (In Billions)") +
  ggtitle("Population Distribution Forecast") +

Population Growth Rate

By seeing this graph we can observe that every countries are containing their total population as they have down rate in their inhabitants. The diminishing rate of India and Japan is comparatively same and the line structure is predominantly a slope. The growth rate of China was at its peak in 1990 and has a slope line in the rest of the years. Howbeit, USA is not having a slope line but it has gradual decline in growth rate. The United States started containing their population from 2010 as we can observe a diminution in the chart. By statistical scrutinizing, the growth rate of India was at it's crest in 1980 with a rate of 2.33%. If India didn't took any initiatives at that time the total population will be 1.79 billion now, but India took unerring proceedings and contained the total residents to 1.3 billion now. On contrary, Japan over contained it's populace which led to a pessimistic growth rate.

Code section - Population Growth Rate line graph :

growth_line <- pop %>%
  mutate(growth = growth * 100) %>%
  ggplot(aes(year ,growth ,color = country )) +
  geom_line() +
  geom_point() +
  xlab("Year") +
  ylab("Growth Rate") +
  ggtitle("Growth Rate from 1980 - 2020") +

Population Growth Rate Projection

To be explicit, the growth rate of China in 2020 is 0.4% and the rate will be jaundiced after 2030 because of the meticulous containment of growth rate. Because of the resisting rate, the population rank of China will be abdicated to rank 2. Coming to India, it has a healthy growth rate when compared to others. Despite of having decline in growth rate it stood positive till 2050. So, we can say that India has monumental human capital at the year of 2050 and will be taking the spot of China. The same case is associated with the United States. The growth rate of US has gingerly abated over the years but comparatively stood positive like India. The bizarre case among this is Japan as it has persistently a denial growth rate as we can observe from the chart. This is because of over containing the growth rate. It has a systematic decrease in rate over the years and by the end of 2050 the growth rate will be reported at -0.5%. Because of this reason, the median age of Japan is constantly increasing over the years.

Code section - Growth rate projection chart

for_growth_rate <- forecast %>%
  mutate(growth = growth * 100) %>%
  ggplot(aes(x=year ,y=growth ,fill = country)) +
  geom_bar(stat = "identity") +
  xlab("Year") +
  ylab("Growth Rate") +
  ggtitle("Growth Rate Projection") +
  facet_wrap(~country) +

Median Age

Actual Median Age of countries from 1980 - 2020 :

Projected Median Age of countries from 2020 - 2050 :

From these graphs we can notice that India has persistently maintained it's Median Age starting from 20 in 1980 and managed to be at 28 in 2020. Even when forecasting, the median age of India will be just 38 years in 2050. So, we can say that India has ideally and constructively maintained it's Median Age over the years. It is attainable for India as it has a positive growth rate. Coming next, the rival of India which is China who was able to sustain their median age up to 1990 but appeared to be showing a radical increase in the following years. The median age of China intersects the median age of USA in 2020 with 38 years. When forecasting the median age of China it revealed a substantial increase with 47 years in 2050 mainly because of it's negative growth rate of population. When coming to USA it does not show any peculiar movements in it's median age when compared to other countries. The median age of USA was at it's peak in 2020 with 38 years correlating with China. Howbeit, USA set to manage the median age and is steadily increasing with corresponding to the positive growth rate of citizenry. The projected median age of USA in 2050 will be 42 which is relatively satisfactory when collating to China. Finally, the anomalous case among this is Japan whose median age is far - reaching when compared to the rest. The median age of Japan in 1980 was 32 and was constantly escalating over the years with a peak median age of 48 in 2020 concerning with the negative growth rate of population in Japan. When forecasting the median age of Japan, it spirals to 54 years in 2050. To conclude, India is recognized as the youngest country with respect to it's median age and, the oldest country among these is Japan. These median ages correlate with their respective GDP of the country. Read further to know about the correlation of median ages and GDP of a country.

Code section - Median age line graph :

median_age <- pop %>%
  ggplot(aes(year ,medianage ,color = country)) +
  geom_point() +
  geom_line() +
  xlab("Year") +
  ylab("Median Age") +
  ggtitle("Median Age of Countries") +

Code section - Median age projection line graph :

for_medianage <- forecast %>%
  filter(year %in% c(2020 ,2030 ,2040 ,2050)) %>%
  ggplot(aes(year ,medianage ,color = country )) +
  geom_point(size = 2) +
  geom_line() +
  xlab("Year") +
  ylab("Median Age") +
  ggtitle("Median Age Projection") +


GDP of India :

GDP Growth Rate of India : (The horizontal line passes through is the mean of growth rate of Indian GDP)

The GDP of India according to 2020 is 3.1 trillion dollars. As we can observe from the growth rate chart, it follows a pessimistic trend right from the beginning of 2016. Because of this pandemic bout, the International Monetary Fund reported that the growth rate of Indian GDP will be 2.50% in 2021. On contrary, the vision of 5 trillion plan stated by the Prime Minister of India is optimistically to be attained in 2025. This vision of 5 trillion in 2025 can be reached only by obtaining a growth rate of 12.65% per year from 2022 to 2025. But, with an average growth rate of 6.5%, it is possible to accomplish the goal only in 2029.

Code section - GDP of India bar plot :

gdp_1 <- gdp %>%
  ggplot(aes(Year ,gdpn1)) +
  geom_bar(stat = "identity" ,fill = "blue") +
  geom_point(color = "orange" ,size = 3) +
  xlab("Year") +
  ylab("GDP (In Trillions)") +
  ggtitle("Nominal GDP of India") +

Code section - GDP growth rate of India line chart :

gdp_growth <- gdp %>%
  ggplot(aes(Year ,growth)) +
  geom_line(size = 1 ,color = "grey") +
  geom_point(color = "orange" ,size = 2) +
  geom_hline(yintercept = avg_gdpg ,color = "blue",size = 1) +
  xlab("Year") +
  ylab("Growth Rate") +
  ggtitle("Growth Rate of Nominal GDP in India") +

With it's huge workforce and the aspects of positive Population growth rate and Age Median, India hopes for the best out of it.

343 views5 comments