Question 1208428
<font color=black size=3>
Answer: <font color=red size=4>0.8703</font>
This value is approximate.


Explanation


This value can be quickly calculated using technology.
Here are some options:<ul><li>Use the <a href="https://www.mathbootcamps.com/find-the-correlation-coefficient-r-on-your-calculator-ti83-84/">LinReg</a> command on a TI83 (or similar). Make sure that Diagnostic is set to "on".</li><li>Use the <a href="https://support.microsoft.com/en-us/office/correl-function-995dcef7-0c0a-4bed-a3fb-239d7b68ca92">the CORREL command</a> in a spreadsheet.</li><li>Input the data into the spreadsheet mode of <a href="https://www.geogebra.org/">GeoGebra</a>. Refer to <a href="https://www.youtube.com/watch?v=UEjrcVy7zwg">this video</a> for an example.</li><li>Search out "pearson correlation coefficient calculator" to find many free tools online. Two search results I found were <a href="https://www.socscistatistics.com/tests/pearson/">this</a> and <a href="https://www.gigacalculator.com/calculators/correlation-coefficient-calculator.php">this</a> (among many other results).</li><li>Use a programming language such as R or Python.</li><li>There are many other technology options. I encourage the student to explore his/her favorite.</li></ul>If you aren't allowed to use a specialized correlation coefficient calculator, then check out any of the three methods shown below.


----------------------------------------------------------------------------------------
Method 1


Define the following
x = length of baking time (in minutes)
y = life span (in hours)


The given table is 
<table border = "1" cellpadding = "5"><tr><td>x</td><td>18</td><td>13</td><td>18</td><td>15</td><td>10</td><td>12</td><td>8</td><td>4</td></tr><tr><td>y</td><td>23</td><td>20</td><td>18</td><td>16</td><td>14</td><td>11</td><td>10</td><td>7</td></tr></table>


There are n = 8 columns of values.
In other words, there are 8 pairs of (x,y) values.


Add up the x values and divide by n = 8 to find the sample mean of the x values.
xbar = sample mean of x values = x with a horizontal bar over top
xbar = (sum of x values)/(number of x values)
xbar = (18+13+18+15+10+12+8+4)/8
xbar = 98/8
xbar = 12.25
If you are using spreadsheet software, then the function you can use is called <a href="https://support.microsoft.com/en-us/office/average-function-047bac88-d466-426c-a32b-8f33eb960cf6">Average</a>


Apply the same idea to the y values.
ybar = (sum of y values)/(number of y values)
ybar = (23+20+18+16+14+11+10+7)/8
ybar = 119/8
ybar = 14.875


Introduce a new row labeled xy. This is the product of the x and y values.
For example, we'll have x*y = 18*23 = 414 as the first entry of this row.
<table border = "1" cellpadding = "5"><tr><td>x</td><td>18</td><td>13</td><td>18</td><td>15</td><td>10</td><td>12</td><td>8</td><td>4</td></tr><tr><td>y</td><td>23</td><td>20</td><td>18</td><td>16</td><td>14</td><td>11</td><td>10</td><td>7</td></tr><tr><td>xy</td><td>414</td><td>260</td><td>324</td><td>240</td><td>140</td><td>132</td><td>80</td><td>28</td></tr></table>
Add up the items in this new row to get Sum(xy) = 414+260+324+240+140+132+80+28 = 1618
Spreadsheet software is strongly recommended.


The last two things we need are:
SD(x)
SD(y)
which represent the sample standard deviations of the x and y values respectively.


You could find these by hand (see part d of <a href="https://www.algebra.com/algebra/homework/word/numbers/Numbers_Word_Problems.faq.question.1196832.html">this page</a>) but I'll use technology to speed things up.
SD(x) = 4.862392
SD(y) = 5.409978
These values are approximate. I rounded each to 6 decimal places.
Make sure you use the sample standard deviation and NOT the population standard deviation.



Let's calculate the correlation coefficient.
*[tex \Large \text{r} = \frac{ (\sum \text{x}\text{y}) - \text{n}*\overline{\text{x}}*\overline{\text{y}}}{(\text{n}-1)*SD(\text{x})*SD(\text{y})}]


*[tex \Large \text{r} = \frac{ (1618) - 8*12.25*14.875}{(8-1)*4.862392*5.409978}]


*[tex \Large \text{r} \approx 0.8703]


Many textbooks will round to 4 decimal places. If your teacher instructs otherwise, then be sure to follow said instructions.


----------------------------------------------------------------------------------------
Method 2


Return back to this table.
<table border = "1" cellpadding = "5"><tr><td>x</td><td>18</td><td>13</td><td>18</td><td>15</td><td>10</td><td>12</td><td>8</td><td>4</td></tr><tr><td>y</td><td>23</td><td>20</td><td>18</td><td>16</td><td>14</td><td>11</td><td>10</td><td>7</td></tr><tr><td>xy</td><td>414</td><td>260</td><td>324</td><td>240</td><td>140</td><td>132</td><td>80</td><td>28</td></tr></table>


Let's introduce rows labeled x^2 and y^2.
As their name suggests, we'll square each value.
Eg: x^2 = 18^2 = 324
<table border = "1" cellpadding = "5"><tr><td>x</td><td>18</td><td>13</td><td>18</td><td>15</td><td>10</td><td>12</td><td>8</td><td>4</td></tr><tr><td>y</td><td>23</td><td>20</td><td>18</td><td>16</td><td>14</td><td>11</td><td>10</td><td>7</td></tr><tr><td>xy</td><td>414</td><td>260</td><td>324</td><td>240</td><td>140</td><td>132</td><td>80</td><td>28</td></tr><tr><td>x^2</td><td>324</td><td>169</td><td>324</td><td>225</td><td>100</td><td>144</td><td>64</td><td>16</td></tr><tr><td>y^2</td><td>529</td><td>400</td><td>324</td><td>256</td><td>196</td><td>121</td><td>100</td><td>49</td></tr></table>


Define the following
A = sum of the x values = 98
B = sum of the y values = 119
C = sum of the xy values = 1618
D = sum of the x^2 values = 1366
E = sum of the y^2 values = 1975
Spreadsheet software can quickly compute each of these.


We can now compute the correlation coefficient.
*[tex \Large \text{r} = \frac{ n*C - A*B }{ \sqrt{ (n*D - A^2)*(n*E - B^2) } }]


*[tex \Large \text{r} = \frac{ 8*1618 - 98*119 }{ \sqrt{ (8*1366 - 98^2)*(8*1975 - 119^2) } }]


*[tex \Large \text{r} \approx 0.8703]


----------------------------------------------------------------------------------------
Method 3


Let's return back to the original table.
<table border = "1" cellpadding = "5"><tr><td>x</td><td>18</td><td>13</td><td>18</td><td>15</td><td>10</td><td>12</td><td>8</td><td>4</td></tr><tr><td>y</td><td>23</td><td>20</td><td>18</td><td>16</td><td>14</td><td>11</td><td>10</td><td>7</td></tr></table>


Recall these previous calculations
xbar = 12.25
SD(x) = 4.862392


We'll use them to determine the z score of each x value.
For instance, if x = 18, then,
z = (x-xbar)/( SD(x) )
z = (18-12.25)/( 4.862392 )
z = 1.182545545485
z = 1.182546
Repeat similar calculations for the other x values. This new row will be labeled Zx to indicate the z scores of the x values.
<table border = "1" cellpadding = "5"><tr><td>x</td><td>18</td><td>13</td><td>18</td><td>15</td><td>10</td><td>12</td><td>8</td><td>4</td></tr><tr><td>y</td><td>23</td><td>20</td><td>18</td><td>16</td><td>14</td><td>11</td><td>10</td><td>7</td></tr><tr><td>Zx</td><td>1.182546</td><td>0.154245</td><td>1.182546</td><td>0.565565</td><td>-0.462735</td><td>-0.051415</td><td>-0.874055</td><td>-1.696696</td></tr></table>


For the y values we have
ybar = 14.875
SD(y) = 5.409978  (approximate)
Here's what it looks like to introduce the z scores for the y values.
<table border = "1" cellpadding = "5"><tr><td>x</td><td>18</td><td>13</td><td>18</td><td>15</td><td>10</td><td>12</td><td>8</td><td>4</td></tr><tr><td>y</td><td>23</td><td>20</td><td>18</td><td>16</td><td>14</td><td>11</td><td>10</td><td>7</td></tr><tr><td>Zx</td><td>1.182546</td><td>0.154245</td><td>1.182546</td><td>0.565565</td><td>-0.462735</td><td>-0.051415</td><td>-0.874055</td><td>-1.696696</td></tr><tr><td>Zy</td><td>1.501855</td><td>0.947324</td><td>0.577636</td><td>0.207949</td><td>-0.161738</td><td>-0.716269</td><td>-0.901113</td><td>-1.455644</td></tr></table>
As mentioned earlier, spreadsheet software is strongly recommended.


The next thing we'll do is multiply each Zx and Zy value to form a new row.
Example: 1.182546*1.501855 = 1.776013 approximately
<table border = "1" cellpadding = "5"><tr><td>x</td><td>18</td><td>13</td><td>18</td><td>15</td><td>10</td><td>12</td><td>8</td><td>4</td></tr><tr><td>y</td><td>23</td><td>20</td><td>18</td><td>16</td><td>14</td><td>11</td><td>10</td><td>7</td></tr><tr><td>Zx</td><td>1.182546</td><td>0.154245</td><td>1.182546</td><td>0.565565</td><td>-0.462735</td><td>-0.051415</td><td>-0.874055</td><td>-1.696696</td></tr><tr><td>Zy</td><td>1.501855</td><td>0.947324</td><td>0.577636</td><td>0.207949</td><td>-0.161738</td><td>-0.716269</td><td>-0.901113</td><td>-1.455644</td></tr><tr><td>Zx*Zy</td><td>1.776013</td><td>0.14612</td><td>0.683081</td><td>0.117609</td><td>0.074842</td><td>0.036827</td><td>0.787622</td><td>2.469785</td></tr></table>
The decimal values are approximate.


The values in that bottom row add to 6.091899 which is also approximate.


We can finally calculate the r value.
r = Sum(Zx*Zy)/(n-1)
r = 6.091899/(8-1)
r = 0.870271285714
<font color=red size=4>r = 0.8703</font>


Other methods are possible. 
I'll let the student explore them.


----------------------------------------------------------------------------------------


Further Reading
<a href="https://www.statology.org/pearson-correlation-coefficient/">https://www.statology.org/pearson-correlation-coefficient/</a>
<a href="https://statisticsbyjim.com/basics/correlation-coefficient-formula/">https://statisticsbyjim.com/basics/correlation-coefficient-formula/</a>
<a href="https://www.statisticshowto.com/probability-and-statistics/correlation-coefficient-formula/">https://www.statisticshowto.com/probability-and-statistics/correlation-coefficient-formula/</a>
<a href="https://www.howtoexcel.org/correlation-coefficient/">https://www.howtoexcel.org/correlation-coefficient/</a>


More Practice
<a href="https://www.algebra.com/algebra/homework/word/evaluation/Evaluation_Word_Problems.faq.question.1196643.html">https://www.algebra.com/algebra/homework/word/evaluation/Evaluation_Word_Problems.faq.question.1196643.html</a>
</font>