Using the information in the table, estimate the value of 𝑦 when 𝑥 equals 13. Give your answer to the nearest integer.
And then we have a table containing pairs of bivariate data for 𝑥 and 𝑦. In order to estimate a 𝑦-value for some given value of 𝑥, here that’s 13, assuming the data is approximately linear, we first find the equation of the regression line. This is of the form 𝑦 hat equals 𝑎 plus 𝑏𝑥. 𝑏 is essentially the slope of the line, and we use the formula 𝑆 𝑥𝑦 divided by 𝑆 𝑥𝑥. Then, we can individually calculate 𝑆 𝑥𝑦 and 𝑆 𝑥𝑥. Or if we find their quotient, we can rewrite the formula as 𝑛 times the sum of 𝑥𝑦 minus the sum of 𝑥 times the sum of 𝑦 divided by 𝑛 times the sum of 𝑥 squared minus the sum of 𝑥 squared.
Then, once we have the value of 𝑏, we can work out the value of 𝑎. It’s 𝑦 bar minus 𝑏 times 𝑥 bar, where 𝑦 bar and 𝑥 bar are the means of 𝑦 and 𝑥, respectively. So it should be quite clear to us that we’re going to need to begin by calculating the sum of the 𝑥- and the 𝑦-values, but also the 𝑥𝑦 and 𝑥 squared values. So we’ll move our formulae out of the way, and we’ll add some rows and columns to our table.
Let’s begin by calculating each value of 𝑥𝑦. To find the first entry, we multiply 23 by 22, which is 506. Then, the next entry is the product of nine and 24, which is 216. And continuing in this way, we get 600, 195, 147, and 108. Next, we’ll complete the 𝑥 squared row. The first value is the result of 23 squared, which is 529. Next, we calculate nine squared; that’s 81. 24 squared is 576. 15 squared is 225. And then our remaining two values are 49 and 144, respectively. We’re now going to complete the final column in our table. That’s the totals, the sum of each of the entries in each individual row. The sum of all the 𝑥-values is 90. The sum of our 𝑦-values is 114. The sum of the values in the 𝑥𝑦 column is 1772. And then the sum of our 𝑥 squared values is 1604.
We now have enough information to be able to calculate the value of 𝑏 in the equation for our least squares regression line. Since there are six pairs of entries, we let 𝑛 be equal to six. And so 𝑏 is 𝑛 times the sum of 𝑥𝑦. That’s six times 1772 minus the sum of 𝑥 times the sum of 𝑦, that’s 90 times 114, over 𝑛 times the sum of 𝑥 squared, so six times 1604 minus the sum of 𝑥 squared. That’s 90 squared. That gives us 372 divided by 1524, which is approximately equal to 0.244 correct to three decimal places. And so we have the value of 𝑏.
Our next job is to calculate the value of 𝑎. And remember the formula we use is 𝑎 equals 𝑦 bar minus 𝑏 times 𝑥 bar, where 𝑦 bar and 𝑥 bar are the means of 𝑦 and 𝑥, respectively. In other words, 𝑦 bar is the sum of all 𝑦-values divided by 𝑛, and 𝑥 bar is the sum of all 𝑥-values divided by 𝑛. So 𝑦 bar is 114 divided by six, which is equal to 19. And 𝑥 bar is 90 divided by six, which is equal to 15. Then, 𝑎 is 19 minus 𝑏 times 15, which correct to two decimal places is 15.34. Substituting this back into the formula for the least squares regression line, and we find that 𝑦 hat is 15.34 plus 0.244𝑥.
Remember, we’re looking to find the value of 𝑦 when 𝑥 is equal to 13. So we’re going to substitute 𝑥 equals 13 into this equation. So 𝑦 is 15.34 plus 0.244 times 13. That’s 18.51 and so on, which correct to the nearest integer is 19.