134k views
5 votes
Emma recently purchased a new car. She decided to keep track of how many gallons of gas she used on five of her business trips. The results are shown in the table below: Miles Driven Number of Gallons Used 160 19.0 410 20.0 580 9.95 Determine the equation of the line of best fit using linear regression for the following data. Round all values to the nearest hundredth

1 Answer

1 vote

Final answer:

The equation of the line of best fit is y = 0.0628x - 17.15.

Step-by-step explanation:

To determine the equation of the line of best fit using linear regression, we need to find the slope and y-intercept. We can use the formula for the slope of a line: slope = (Σ(x * y) - (Σx * Σy) / n) / (Σ(x^2) - (Σx)^2 / n). First, calculate the values for Σ(x * y), Σx, Σy, Σ(x^2), and n. Then substitute these values into the formula to find the slope. Next, calculate the y-intercept using the equation: y-intercept = (Σy - slope * Σx) / n. The equation of the line of best fit will be in the form y = mx + b, where m is the slope and b is the y-intercept.

Let's calculate the values:

Σ(x * y) = (160 * 19.0) + (410 * 20.0) + (580 * 9.95) = 53560.5

Σx = 160 + 410 + 580 = 1150

Σy = 19.0 + 20.0 + 9.95 = 48.95

Σ(x^2) = 160^2 + 410^2 + 580^2 = 499000

n = 3 (since we have data for 3 business trips)

Now, substitute these values into the formula:

slope = (53560.5 - (1150 * 48.95) / 3) / (499000 - (1150)^2 / 3) = 0.0628

Next, calculate the y-intercept:

y-intercept = (48.95 - 0.0628 * 1150) / 3 = -17.15

Therefore, the equation of the line of best fit is y = 0.0628x - 17.15.

User Resolution
by
7.9k points