QUESTION IMAGE
Question
linear regression and correlation.
compute the equation of the linear regression line in the form y = mx + b, where m is the slope and b is the intercept.
use at least 3 decimal places. (round if necessary)
y = x +
compute the correlation coefficient for this data set. use at least 3 decimal places. (round if necessary)
r=
Step1: Calculate sums
Let \(n = 7\).
\(\sum_{i = 1}^{n}x_i=3 + 4+5 + 6+7 + 8+9=42\)
\(\sum_{i = 1}^{n}y_i=11.71+0.58 + 15.45+12.92+19.19+19.36+21.83 = 101.04\)
\(\sum_{i = 1}^{n}x_i^2=3^2 + 4^2+5^2 + 6^2+7^2 + 8^2+9^2=9 + 16+25+36+49+64+81 = 270\)
\(\sum_{i = 1}^{n}x_iy_i=3\times11.71+4\times0.58 + 5\times15.45+6\times12.92+7\times19.19+8\times19.36+9\times21.83\)
\(=35.13+2.32+77.25+77.52+134.33+154.88+196.47 = 677.9\)
Step2: Calculate slope \(m\)
The formula for \(m\) is \(m=\frac{n\sum_{i = 1}^{n}x_iy_i-\sum_{i = 1}^{n}x_i\sum_{i = 1}^{n}y_i}{n\sum_{i = 1}^{n}x_i^2-(\sum_{i = 1}^{n}x_i)^2}\)
\(m=\frac{7\times677.9 - 42\times101.04}{7\times270-42^2}\)
\(=\frac{4745.3-4243.68}{1890 - 1764}\)
\(=\frac{501.62}{126}\approx3.981\)
Step3: Calculate intercept \(b\)
The formula for \(b\) is \(b=\bar{y}-m\bar{x}\), where \(\bar{x}=\frac{\sum_{i = 1}^{n}x_i}{n}=\frac{42}{7} = 6\) and \(\bar{y}=\frac{\sum_{i = 1}^{n}y_i}{n}=\frac{101.04}{7}\approx14.434\)
\(b = 14.434-3.981\times6\)
\(=14.434 - 23.886=-9.452\)
Step4: Calculate correlation coefficient \(r\)
First, calculate \(S_{xx}=n\sum_{i = 1}^{n}x_i^2-(\sum_{i = 1}^{n}x_i)^2=7\times270 - 42^2=126\)
\(S_{yy}=n\sum_{i = 1}^{n}y_i^2-(\sum_{i = 1}^{n}y_i)^2\)
\(\sum_{i = 1}^{n}y_i^2=11.71^2+0.58^2 + 15.45^2+12.92^2+19.19^2+19.36^2+21.83^2\)
\(=137.0241+0.3364+238.7025+166.9264+368.2561+374.8096+476.5489 = 1762.504\)
\(S_{yy}=7\times1762.504-(101.04)^2=12337.528 - 10209.0816 = 2128.4464\)
\(S_{xy}=n\sum_{i = 1}^{n}x_iy_i-\sum_{i = 1}^{n}x_i\sum_{i = 1}^{n}y_i=7\times677.9-42\times101.04 = 501.62\)
The formula for \(r\) is \(r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}\)
\(r=\frac{501.62}{\sqrt{126\times2128.4464}}\)
\(r=\frac{501.62}{\sqrt{268184.2464}}\)
\(r=\frac{501.62}{517.865}\approx0.976\)
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
\(y = 3.981x-9.452\)
\(r = 0.976\)