Solveeit Logo

Question

Question: Find the correlation coefficient between age in years (x) and glucose level (y) from the data of 5 p...

Find the correlation coefficient between age in years (x) and glucose level (y) from the data of 5 people as follows.

Answer

0.621

Explanation

Solution

The correlation coefficient (Pearson's r) between two variables x and y for a sample of n data points is given by the formula:

r=n(xy)(x)(y)[nx2(x)2][ny2(y)2]r = \frac{n \sum (xy) - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2][n \sum y^2 - (\sum y)^2]}}

Given data:

n = 5

x: 43, 22, 25, 42, 58

y: 99, 65, 79, 75, 87

  1. Calculate the sum of x values (x\sum x), sum of y values (y\sum y), sum of products of x and y values (xy\sum xy), sum of squares of x values (x2\sum x^2), and sum of squares of y values (y2\sum y^2).

    x=43+22+25+42+58=190\sum x = 43 + 22 + 25 + 42 + 58 = 190

    y=99+65+79+75+87=405\sum y = 99 + 65 + 79 + 75 + 87 = 405

    xy=(43×99)+(22×65)+(25×79)+(42×75)+(58×87)=4257+1430+1975+3150+5046=15858\sum xy = (43 \times 99) + (22 \times 65) + (25 \times 79) + (42 \times 75) + (58 \times 87) = 4257 + 1430 + 1975 + 3150 + 5046 = 15858

    x2=432+222+252+422+582=1849+484+625+1764+3364=8086\sum x^2 = 43^2 + 22^2 + 25^2 + 42^2 + 58^2 = 1849 + 484 + 625 + 1764 + 3364 = 8086

    y2=992+652+792+752+872=9801+4225+6241+5625+7569=33461\sum y^2 = 99^2 + 65^2 + 79^2 + 75^2 + 87^2 = 9801 + 4225 + 6241 + 5625 + 7569 = 33461

  2. Use the formula for the sample correlation coefficient: r=n(xy)(x)(y)[nx2(x)2][ny2(y)2]r = \frac{n \sum (xy) - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2][n \sum y^2 - (\sum y)^2]}}, where n is the number of data points.

  3. Substitute the calculated sums into the formula and compute the value of r.

    r=5×15858(190)(405)[5×8086(190)2][5×33461(405)2]r = \frac{5 \times 15858 - (190)(405)}{\sqrt{[5 \times 8086 - (190)^2][5 \times 33461 - (405)^2]}}

    r=7929076950[4043036100][167305164025]r = \frac{79290 - 76950}{\sqrt{[40430 - 36100][167305 - 164025]}}

    r=23404330×3280=23401420240023403768.6190.62087r = \frac{2340}{\sqrt{4330 \times 3280}} = \frac{2340}{\sqrt{14202400}} \approx \frac{2340}{3768.619} \approx 0.62087

Rounding to three decimal places, we get 0.621.