Average gas prices

Columbia, SC
Year Gas Price
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
Cabs use a valuable commodity-gas!
Use the linear regression equation to predict how much you expect gas to cost in 2025?

To predict the gas price in 2025 using linear regression, we can use the given data to create a linear regression model.

First, we need to calculate the slope and the y-intercept of the linear regression equation. The slope (m) can be calculated using the formula:

m = (NΣXY - ΣXΣY) / (NΣX^2 - (ΣX)^2)

where N is the number of data points (years), ΣX is the sum of the years, ΣY is the sum of gas prices, ΣXY is the sum of the products of each year and its corresponding gas price, and ΣX^2 is the sum of the squares of each year.

Similarly, the y-intercept (b) can be calculated using the formula:

b = (ΣY - mΣX) / N

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

N = 10 (number of data points)
ΣX = 2002 + 2003 + ... + 2011 = 20105
ΣY = 0.70 + 1.04 + ... + 2.56 = 14.04
ΣXY = (2002*0.70) + (2003*1.04) + ... + (2011*2.56) = 28915.32
ΣX^2 = (2002^2) + (2003^2) + ... + (2011^2) = 40402505

Now, we can substitute these values into the formulas to calculate the slope and y-intercept:

m = (10*28915.32 - 20105*14.04) / (10*40402505 - (20105)^2) ≈ 0.1039
b = (14.04 - 0.1039*20105) / 10 ≈ -200.604

Next, we can substitute the slope and y-intercept in the linear regression equation:

Gas Price = b + m * Year

Substituting Year = 2025 into the equation:

Gas Price = -200.604 + 0.1039 * 2025 ≈ $3.38

Therefore, based on the linear regression model, we can expect gas to cost approximately $3.38 in 2025.