QUESTION IMAGE
Question
find the equation for the least squares regression line of the data described below. faced with budget cuts, a state commission is looking into closing some of its public libraries. to help minimize the negative impact of the closures, the commission gathered data on local school and library facilities. the number of schools, x, and the number of libraries, y, were recorded for each town.
| schools | libraries |
|---|---|
| 7 | 2 |
| 12 | 8 |
| 14 | 9 |
| 15 | 5 |
round your answers to the nearest thousandth. y = x +
Step1: Calculate sums
Let \(n = 5\) (number of data - points).
\(\sum_{i = 1}^{n}x_{i}=3 + 7+12 + 14+15=51\)
\(\sum_{i = 1}^{n}y_{i}=3 + 2+8 + 9+5=27\)
\(\sum_{i = 1}^{n}x_{i}^{2}=3^{2}+7^{2}+12^{2}+14^{2}+15^{2}=9 + 49+144+196+225 = 623\)
\(\sum_{i = 1}^{n}x_{i}y_{i}=3\times3+7\times2 + 12\times8+14\times9+15\times5=9+14 + 96+126+75 = 320\)
Step2: Calculate slope \(m\)
The formula for the slope \(m\) of the least - squares regression line is \(m=\frac{n\sum_{i = 1}^{n}x_{i}y_{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}}\)
\[
\]
Step3: Calculate intercept \(b\)
The formula for the intercept \(b\) is \(b=\bar{y}-m\bar{x}\), where \(\bar{x}=\frac{\sum_{i = 1}^{n}x_{i}}{n}=\frac{51}{5}=10.2\) and \(\bar{y}=\frac{\sum_{i = 1}^{n}y_{i}}{n}=\frac{27}{5}=5.4\)
\[
\]
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 = 0.434x+0.973\)