At Westonci.ca, we connect you with the best answers from a community of experienced and knowledgeable individuals. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

The table below is a record of the number of miles driven between stops for gas and the amount of money spent to fill up the gas tank in Avery’s car over several months.

Avery’s Gas Fill Up Log
Miles Driven, x 318 285 324 302 338 326 300
Cost to Fill up ($), y 24.75 23.13 25.19 24.69 26.69 25.37 24.63

Step 1 of 2 : Find an equation of the least-squares regression line. Round your answer to three decimal places, if necessary.


Sagot :

Answer:

  y = 0.054x +8.018

Step-by-step explanation:

You want the least-squares regression line that fits the cost and miles data given.

Calculator

The equation of the best-fit line is most easily calculated using a spreadsheet or statistics calculator. The display in the attachment shows the equation to be ...

  y = 0.054x +8.018

Parameters

If you want to calculate this "by hand", you need some statistics for the data. You need mean(x), variance(x), mean(y), and covariance(x, y).

  µx = ∑x/n = 2193/7 ≈ 313.286
  µy = ∑y/n = 174.45/7 ≈ 24.921
  µx² = ∑x²/n = 689049/7 ≈ 98,435.571
  µxy = ∑xy/n = 54761.33/7 ≈ 7823.047

The slope of the line of best fit is ...

  m = cov(x, y)/var(x) = (µxy -µx·µy)/(µx² -(µx)²) ≈ 15.520/287.633 ≈ 0.054

Using the point-slope equation for the line with point (µx, µy), we have ...

  y -24.921 = 0.054(x -313.286)

  y = 0.054x +8.018

__

Additional comment

To get the hand-calculated result to match the stat calculator result, the full precision of all intermediate values must be used. The calculation of variance and covariance involves finding the relatively small difference of large numbers, so is prone to significant error if there is any intermediate rounding. (The 3 dp numbers shown immediately above are insufficiently precise to match the result of the first section.)

View image sqdancefan