HIV Deaths and GDP per Capita: IB Math IA on Correlation

Published

This IB Math Internal Assessment asks whether countries with higher GDP per capita have fewer HIV deaths. Using 2020 data for the 29 countries with the most HIV deaths, it calculates the means, the Pearson correlation coefficient and a least squares line, and tests whether the correlation is significant. The correlation is almost zero (r = −0.033) and not significant, and the evaluation explains why comparing total deaths with income per person limits what the result can show.

Introduction

Research Question

Is there a correlation between HIV mortality and GDP per capita?

HIV/AIDS was first recognized in the United States in 1981, and since then it has become one of the major global epidemics. It is estimated that in 2020 alone, about 680,000 people died from HIV-related illnesses, and 38 million people were living with HIV (UNICEF, 2021).

I first learned about HIV/AIDS when I was 14 years old, and since then I have been interested to know more about this disease. While I was looking at HIV deaths in 2020, I realized that eight of the ten nations with the most HIV deaths are African. This led me to use mathematics to investigate whether there is a relationship between HIV deaths and GDP per capita in the 29 nations with the highest HIV mortality.

Mathematical Exploration

Correlation is used in mathematics and statistics to describe the association between two variables by its strength (strong or weak) and its direction (positive or negative). As a rough guide, a correlation coefficient above 0.5 in absolute value shows a strong correlation and one below 0.5 a weak correlation (Schober et al., 2018). A correlation is negative when one variable decreases as the other increases, and positive when both variables move in the same direction.

In this exploration, I use the Pearson correlation coefficient and a scatter plot with a least squares line to measure the correlation between HIV mortality and GDP per capita in 29 countries, and a t-test to check whether the result could be due to chance.

Pearson Correlation

The Pearson product-moment correlation coefficient r is calculated as:

r=∑(x−x‾)(y−y‾)∑(x−x‾)2×∑(y−y‾)2

where x is the explanatory variable (here, HIV deaths), y is the response variable (GDP per capita), and x̄ and ȳ are their means. The mean of a data set is:

x‾=∑xn

where Σx is the sum of the values and n is the number of values. The value of r lies between −1 and 1: values close to 1 show a strong positive correlation, values close to −1 a strong negative correlation, and values close to 0 no linear correlation.

Scatter Plot

A scatter plot shows the data graphically, with the explanatory variable on the x-axis and the response variable on the y-axis. If the line of best fit rises, the gradient is positive and so is the correlation; if it falls, the gradient and the correlation are negative. If the points show no trend, the correlation coefficient is close to 0.

Aim and Hypothesis

This exploration aims to use mathematical tools (the Pearson correlation coefficient and a scatter plot) to find out whether there is a relationship between gross domestic product per capita and HIV mortality, using data for 2020.

I hypothesize that there is no correlation between GDP per capita and HIV mortality: the correlation coefficient will be close to 0, and the line of best fit on the scatter plot will be close to flat.

Data

The HIV deaths for each country were taken from Index Mundi (indexmundi.com), and GDP per capita for the same 29 countries from the World Bank figures published by Our World in Data (ourworldindata.org). The countries are the 29 with the most HIV deaths in 2020, ranked in Table 1.

Table 1: HIV Deaths and GDP per Capita in 29 Countries, 2020
CountryHIV deaths (thousands)GDP per capita (international $)
South Africa7212,666
India696,166
Mozambique511,230
Nigeria454,917
Indonesia3811,445
Tanzania272,625
Kenya214,340
Uganda212,175
Zimbabwe203,353
Zambia173,278
DR Congo151,082
Ghana145,446
Cameroon143,666
Brazil1414,064
Thailand1417,285
Malawi131,509
Angola136,110
Ethiopia122,297
South Sudan9.13,114
Myanmar7.74,875
Pakistan6.84,563
Ukraine5.912,376
Mali5.82,226
Botswana514,655
Vietnam58,200
Lesotho4.82,317
Republic of the Congo4.53,434
Colombia4.113,449
Mexico417,852
Total552.7190,715

Statistical Analysis

Means

Using the totals in Table 1:

x‾=552.729=19.06
y‾=190,71529=6,576.38

On average, the 29 countries had 19.06 thousand HIV deaths and a GDP per capita of 6,576 international dollars.

Pearson Correlation Coefficient

Table 2 gives the deviation of each value from its mean, the products of the deviations and their squares.

Table 2: Pearson Correlation Table
Countryxyx − x̄y − ȳ(x − x̄)(y − ȳ)(x − x̄)²(y − ȳ)²
South Africa7212,66652.946,090322,3932,802.7937,083,480
India696,16649.94−410−20,4952,494.14168,411
Mozambique511,23031.94−5,346−170,7711,020.2528,583,772
Nigeria454,91725.94−1,659−43,047672.962,753,540
Indonesia3811,44518.944,86992,218358.7823,703,467
Tanzania272,6257.94−3,951−31,37963.0715,613,398
Kenya214,3401.94−2,236−4,3423.775,001,392
Uganda212,1751.94−4,401−8,5453.7719,372,140
Zimbabwe203,3530.94−3,223−3,0340.8910,390,174
Zambia173,278−2.06−3,2986,7904.2410,879,306
DR Congo151,082−4.06−5,49422,30016.4730,188,204
Ghana145,446−5.06−1,1305,71825.591,277,757
Cameroon143,666−5.06−2,91014,72325.598,470,308
Brazil1414,064−5.067,488−37,87725.5956,064,464
Thailand1417,285−5.0610,709−54,17125.59114,674,557
Malawi131,509−6.06−5,06730,70136.7125,678,333
Angola136,110−6.06−4662,82636.71217,510
Ethiopia122,297−7.06−4,27930,20749.8218,313,087
South Sudan9.13,114−9.96−3,46234,48199.1711,988,070
Myanmar7.74,875−11.36−1,70119,325129.022,894,692
Pakistan6.84,563−12.26−2,01324,681150.274,053,696
Ukraine5.912,376−13.165,800−76,315173.1533,635,600
Mali5.82,226−13.26−4,35057,680175.7918,925,800
Botswana514,655−14.068,079−113,574197.6465,264,112
Vietnam58,200−14.061,624−22,826197.642,636,144
Lesotho4.82,317−14.26−4,25960,733203.3118,142,312
Republic of the Congo4.53,434−14.56−3,14245,749211.959,874,548
Colombia4.113,449−14.966,873−102,805223.7647,232,915
Mexico417,852−15.0611,276−169,795226.76127,139,622
Total552.7190,7150.000−88,4529,655.19750,220,813

Substituting the totals from Table 2 into the formula:

r=−88,451.89,655.19×750,220,813=−0.0329

The correlation coefficient of r = −0.0329 is negative but so close to 0 that it shows no linear relationship between HIV deaths and GDP per capita.

Scatter Plot

The data in Table 1 are plotted in Figure 1, with the least squares line:

y=−9.16x+6,751
  • One country
  • Least squares line: Ŷ = 6750.98 − 9.16X, r = −.033, R² = .001

Point at a country, or use the number buttons (arrow keys move between them), to see the GDP per capita the line predicts and the residual.

Mexico

HIV deaths (thousands)
4.0
GDP per capita (international $)
17852
Predicted GDP per capita
6714.33
Residual
17852 − 6714.33 = +11137.67: 11137.67 above the line
Figure 1: GDP per Capita Against HIV Deaths, With Least Squares LineRedrawn by Writers Per Hour from the 29 countries in Table 1; the paper’s own chart was lost when the sample was moved online. The least squares line, r and R² are worked out on this page from the same points.
Figure 1 data: each country’s HIV deaths, GDP per capita, predicted GDP per capita and residual
Figure 1 data: the 29 countries in Table 1, the GDP per capita the least squares line predicts for each and the residual (GDP per capita minus prediction)
CountryHIV deaths (thousands)GDP per capita (international $)Predicted GDP per capitaResidual
172.0126666091.38+6574.62
269.061666118.86+47.14
351.012306283.76−5053.76
445.049176338.73−1421.73
538.0114456402.86+5042.14
627.026256503.63−3878.63
721.043406558.59−2218.59
821.021756558.59−4383.59
920.033536567.76−3214.76
1017.032786595.24−3317.24
1115.010826613.56−5531.56
1214.054466622.72−1176.72
1314.036666622.72−2956.72
1414.0140646622.72+7441.28
1514.0172856622.72+10662.28
1613.015096631.88−5122.88
1713.061106631.88−521.88
1812.022976641.04−4344.04
199.131146667.61−3553.61
207.748756680.44−1805.44
216.845636688.68−2125.68
225.9123766696.93+5679.07
235.822266697.84−4471.84
245.0146556705.17+7949.83
255.082006705.17+1494.83
264.823176707.00−4390.00
274.534346709.75−3275.75
284.1134496713.42+6735.58
294.0178526714.33+11137.67

The line falls very slightly, but the points are scattered widely around it with no visible pattern. The coefficient of determination R² = 0.0011 means that HIV deaths explain about 0.1% of the variation in GDP per capita, and √R² = 0.0329 with the sign of the gradient gives the same r = −0.0329 as the Pearson table. Countries with similar numbers of deaths have very different incomes: Brazil, Thailand, Ghana and Cameroon each had about 14 thousand HIV deaths, but GDP per capita ranged from 3,666 to 17,285 international dollars.

Testing the Significance of r

To check whether a correlation this small could arise by chance, I test the hypotheses for the population correlation ρ:

  • H₀: ρ = 0 (HIV deaths and GDP per capita are not correlated)
  • H₁: ρ ≠ 0 (HIV deaths and GDP per capita are correlated)

The test statistic follows a t-distribution with n − 2 = 27 degrees of freedom:

t=rn−21−r2=−0.0329271−0.03292=−0.17

For a two-tailed test at the 5% significance level with 27 degrees of freedom, the critical values of t are ±2.052, which correspond to a critical r of ±0.367. Since |t| = 0.17 is far below 2.052 (p ≈ 0.87), the correlation is not significant, and the null hypothesis cannot be rejected.

Conclusion

The aim of this exploration was to investigate whether there is a relationship between GDP per capita and HIV mortality in 29 countries. I hypothesized that there would be no correlation. The Pearson correlation coefficient was r = −0.0329, the scatter plot gave the same value, and its least squares line is almost flat (R² = 0.0011). The t-test shows that the correlation is not significant at the 5% level. The data are therefore consistent with my hypothesis: they give no evidence of a linear relationship between a country’s GDP per capita and its number of HIV deaths. This does not prove that no relationship exists, only that this data set does not show one.

Evaluation

The aim was achieved, as the mathematical tools gave a clear and consistent answer, but several features of the data limit what the result can show.

First, the two variables are measured on different scales. HIV deaths are a total for each country, while GDP is per person. A large country can have many deaths even with a low death rate: India, with about 1.4 billion people, had almost as many HIV deaths as South Africa, with about 60 million. Using HIV deaths per 100,000 people would compare countries more fairly and could give a different result.

Second, the countries were chosen because they had the most HIV deaths. Countries with few deaths, which include most high-income countries, are left out, and this narrows the range of both variables. A random sample of countries, or all countries with available data, would test the relationship more fairly.

Third, the data come from one year and from two different sources. The 2020 figures may have been affected by the COVID-19 pandemic, which disrupted both economies and health services, and the HIV estimates for some countries are uncertain. Using data for at least five years, from a single source such as UNAIDS for the death figures, would make the results more reliable.

Finally, Pearson’s r only measures a linear relationship. A future exploration could also use Spearman’s rank correlation, which is less affected by extreme values such as South Africa and India, and could include other factors, such as spending on health care, that may influence HIV mortality.

References

  1. Schober, P., Boer, C., & Schwarte, L. A. (2018). Correlation coefficients: Appropriate use and interpretation. Anesthesia & Analgesia, 126(5), 1763–1768.
  2. UNICEF. (2021). HIV statistics: Global and regional trends. UNICEF Data. https://data.unicef.org/topic/hivaids/global-regional-trends/

Rate This Sample

How useful was this example?

Your rating

Cite This Sample

HIV Deaths and GDP per Capita: IB Math IA on Correlation. (2024, September 18). Writers Per Hour. https://writersperhour.com/samples/ib/hiv-deaths-and-gdp-per-capita-math-ia

We'll ensure your essay is what you asked for

  • Have skilled academic writers complete your assignment.
  • Pay a fair rate for a writing that follows your guidelines.
  • Obtain a 100% unique essay ready before your due date.