AVERAGE GAS PRICES

Columbia, South Carolina

Year

Gas Price

Year

Gas Price

2002

$0.70

2007

$1.70

2003

$1.04

2008

$2.55

2004

$1.15

2009

$1.29

2005

$1.38

2010

$2.22

2006

$1.86

2011

$2.56

Use the linear regression equation to predict how much you expect gas to cost 2025?

1 answer

To predict the gas price in 2025, we can use the linear regression equation.

First, we need to calculate the slope (m) and y-intercept (b) of the regression line for the given data points. The equation for a regression line is y = mx + b, where y is the gas price and x is the year.

We can use the slope-intercept form of a line to calculate the slope and y-intercept:

m = (Σ(xy) - (Σx)(Σy) / n(Σx^2) - (Σx)^2)
b = (Σy - m(Σx)) / n

where Σxy is the sum of the products of x and y, Σx and Σy are the sums of x and y respectively, Σx^2 is the sum of the squares of x, and n is the number of data points.

Using the given data points, we can calculate the slope and y-intercept:

Σx = 2002 + 2003 + 2004 + 2005 + 2006 + 2007 + 2008 + 2009 + 2010 + 2011 = 20105
Σy = 0.70 + 1.04 + 1.15 + 1.38 + 1.86 + 1.70 + 2.55 + 1.29 + 2.22 + 2.56 = 16.85
Σxy = (2002 * 0.70) + (2003 * 1.04) + (2004 * 1.15) + (2005 * 1.38) + (2006 * 1.86) + (2007 * 1.70) + (2008 * 2.55) + (2009 * 1.29) + (2010 * 2.22) + (2011 * 2.56) = 40289.78
Σx^2 = (2002^2) + (2003^2) + (2004^2) + (2005^2) + (2006^2) + (2007^2) + (2008^2) + (2009^2) + (2010^2) + (2011^2) = 40584595

n = 10

Now, let's plug in the values into the slope and y-intercept formulas:

m = (Σ(xy) - (Σx)(Σy) / n(Σx^2) - (Σx)^2)
= (40289.78 - (20105)(16.85)) / (10(40584595) - (20105)^2)
= (-65459.85) / (40584595 - 40421025)
= (-65459.85) / 163570
≈ -0.40

b = (Σy - m(Σx)) / n
= (16.85 - (-0.40)(20105)) / 10
= (16.85 + 8042) / 10
≈ 805.27 / 10
≈ 80.53

So, the regression equation for the given data points is:
y = -0.40x + 80.53

Using this equation, we can find the predicted gas price for the year 2025 by substituting x = 2025 into the equation:

y = -0.40(2025) + 80.53
= -810 + 80.53
≈ -729.47

Therefore, we would expect the gas price in Columbia, South Carolina in 2025 to be approximately -$729.47.