QUESTION IMAGE
Question
oil and gas prices the average gasoline price per gallon (in cities) and the cost of a barrel of oil are shown below for a random selection of weeks in 2015. oil ($) 43.57 40.54 53.69 41.85 86.03 55.35 gasoline ($) 2.450 2.547 2.794 2.622 3.103 2.604 send data to excel the correlation coefficient for the data is ( r = 0.918 ) and ( alpha = 0.05 ). should regression analysis be done? the regression analysis should not be done. the regression analysis should be done. find the equation of the regression line. round the coefficients to at least three decimal places. ( y = a + bx ) ( a = ) ( b = )
Step1: Calculate the means
Let \(x\) be the oil prices and \(y\) be the gasoline prices.
\(\bar{x}=\frac{43.57 + 40.54+53.69+41.85+86.03+55.35}{6}=\frac{321.03}{6}=53.505\)
\(\bar{y}=\frac{2.450 + 2.547+2.794+2.622+3.103+2.604}{6}=\frac{16.12}{6}\approx2.687\)
Step2: Calculate \(b\)
The formula for \(b\) is \(b = r\frac{s_{y}}{s_{x}}\)
First, calculate \(s_{x}\) and \(s_{y}\)
\(s_{x}=\sqrt{\frac{\sum(x - \bar{x})^{2}}{n-1}}\)
\(\sum(x - \bar{x})^{2}=(43.57 - 53.505)^{2}+(40.54 - 53.505)^{2}+(53.69 - 53.505)^{2}+(41.85 - 53.505)^{2}+(86.03 - 53.505)^{2}+(55.35 - 53.505)^{2}\)
\(=(-9.935)^{2}+(-12.965)^{2}+(0.185)^{2}+(-11.655)^{2}+(32.525)^{2}+(1.845)^{2}\)
\(=98.704 + 168.092+0.034+135.801+1057.966+3.404\)
\(=1463.991\)
\(s_{x}=\sqrt{\frac{1463.991}{5}}\approx\sqrt{292.798}\approx17.111\)
\(s_{y}=\sqrt{\frac{\sum(y - \bar{y})^{2}}{n - 1}}\)
\(\sum(y - \bar{y})^{2}=(2.450 - 2.687)^{2}+(2.547 - 2.687)^{2}+(2.794 - 2.687)^{2}+(2.622 - 2.687)^{2}+(3.103 - 2.687)^{2}+(2.604 - 2.687)^{2}\)
\(=(-0.237)^{2}+(-0.14)^{2}+(0.107)^{2}+(-0.065)^{2}+(0.416)^{2}+(-0.083)^{2}\)
\(=0.056+0.0196+0.0114+0.0042+0.173+0.0069\)
\(=0.2711\)
\(s_{y}=\sqrt{\frac{0.2711}{5}}\approx\sqrt{0.0542}\approx0.233\)
Since \(r = 0.918\), \(b=0.918\times\frac{0.233}{17.111}\approx0.918\times0.0136\approx0.0125\)
Another formula for \(b\) is \(b=\frac{n\sum(xy)-\sum x\sum y}{n\sum(x^{2})-(\sum x)^{2}}\)
\(\sum x = 321.03\), \(\sum y=16.12\), \(\sum(xy)=43.57\times2.450+40.54\times2.547+53.69\times2.794+41.85\times2.622+86.03\times3.103+55.35\times2.604\)
\(=106.747+103.256+150.900+109.721+267.951+144.131\)
\(=882.706\)
\(\sum(x^{2})=43.57^{2}+40.54^{2}+53.69^{2}+41.85^{2}+86.03^{2}+55.35^{2}\)
\(=1898.34+1643.49+2882.61+1751.42+7399.16+3063.62\)
\(=18638.64\)
\(b=\frac{6\times882.706-321.03\times16.12}{6\times18638.64-(321.03)^{2}}\)
\(=\frac{5296.236 - 5175.004}{111831.84 - 103050.26}\)
\(=\frac{121.232}{8781.58}\approx0.014\)
Also, \(a=\bar{y}-b\bar{x}\)
\(a = 2.687-0.014\times53.505\)
\(a=2.687 - 0.749\)
\(a = 1.938\)
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
\(a = 1.938\)
\(b=0.014\)