Linear Regression

Text before the first section.

Correlation

Text of section.

Calculate the correlation of X and Y:

X = 1 X = 2 Y = 0 0.12 0.24 Y = 1 0.3 34

Calculate the correlation of X and Y:

X = 0 X = 1 X = 2 Y = 0 0.08 0.16 0.1 Y = 1 0.14 0.2 0.32

Suppose we roll a fair, 4-sided die two times. Let X be the sum of the rolls, and let Y be the product of the rolls. Find the correlation of X and Y.

[Note: Somewhat tedious.]

Linear Regression

Text of section.

A survey of local companies collects information about marketing budgets X and revenue Y (each measures in thousands of dollars), shown below. A linear regression gives the best linear fit as Y = 18.28 X + 29.69. What is the coefficient of determination r^2?

x_i y_i (y_i - \text{avg})^2 \text{pred } y_i \text{res}^2 200 4300 2073600 3686 377377 420 7700 3841600 7707 53 270 4500 1537600 4965 216495 380 7000 1587600 6976 572 300 5200 291600 5514 98401 sum: 28700 9332000 28848 692898

A sample of 100 measurements are taken and a best fit line is calculated, resulting in the data below (the final line shows the sums for each column). Find the coefficient of determination.

x_i y_i \text{pred } y_i (y - \text{avg})^2 \text{res}^2 38.00 121.00 93.17 11.83 774.33 87.00 241.00 238.95 13586.23 4.22 30.00 61.00 69.37 4024.63 70.12 35.00 85.00 84.25 1555.51 0.57 33.00 108.00 78.30 270.27 882.19 26.00 32.00 57.47 8545.15 648.91 sum: 12444.00 12444.00 515206.64 29789.80