Modeling Cab Fare: Linear Equation from Two Data Points

Given:

  • 2 miles → $4.25
  • 7 miles → $8.50

Assume linear model: y = mx + b (y = cost, x = miles).

Calculate Slope (m = cost per mile)

m = (8.50 − 4.25) / (7 − 2) = 4.25 / 5 = 0.875 dollars/mile.

Find Base Fare (b)

Using point (2, 4.25):
4.25 = 0.875(2) + b
4.25 = 1.75 + b
b = 2.50

Equation: y = 0.875x + 2.50

Verification

  • x = 2: 0.875(2) + 2.50 = 1.75 + 2.50 = 4.25 ✓
  • x = 7: 0.875(7) + 2.50 = 6.125 + 2.50 = 8.625 ≈ 8.50 (rounding)

Note: The original solution used b = 1.75, which gives y(2) = 3.50 ≠ 4.25. Correct base fare is $2.50.

Copyright Wanderlust World © https://www.ynyoo.com