I am trying to understand the pricing model of a cab firm from looking at quotes generated on their app. They charge like this; there is a minimum fare for a set number of miles (say £12.00 for 3 miles), and after that a flat rate per mile (say £2.00 per mile thereafter). That must mean there are three unknown variables:
Minimum Fare: x
Number of miles: y
Price per mile thereafter: z
What I do have, though, is a couple of quotes:
Where the journey distance is 7 miles, the quoted fare is £18.29
Where the journey distance is 22 miles and the quoted fare is £35.49
I did think more than two quotes might be needed, but maybe it’s not even possible given the fact of three variables.
Anyway, I’d be very grateful for any thoughts. Cheers.
Can’t be done with this info. Also need the number of miles for the fixed minimum after that, all you need is EITHER of those two examples. (OR, if you had a third example, that would work too, I think.)
It is definitely underdetermined with just those two quotes. Assuming y < 7, any number of quotes for trips 7 miles or longer will be insufficient to determine what y and x are exactly.
Basically the pricing scheme has a flat region and a non-flat linear region, and you need two quotes from the non-flat region, and one from the flat region to make the determination (at least assuming the pricing is continuous).
If I understand correctly, the OP’s situation yields the following two equations:
x + (7-y)z = 18.29, or x + 7z - yz = 18.29
x + (22-y)z = 35.49, or x + 22 - yz = 35.49
By subtracting one from another, we can eliminate the x and the yz terms, and get
15z = 17.20
but this would yield a fractional value for z (1.146666…)
He’s saying 4.64 is the minimum x, 1.95 is the per mile charge z. The slight twist here is that there is no small amount of travel that you get for 4.64, that is the charge for zero distance. All travel is charged at 1.95 per mile plus the fixed fee of 4.64.
So the formula is X + (Y*Z) or Fare = 4.64 + (1.95 * Y).
Still not enough information to establish y, since we don’t see two trips that are at the same price, or that don’t fit on the same slope. x could be 4.64 for a y of 0, or y could be any value up to 5, and then you’d raise x by (1.95 * y)
Thank you everyone who piped up earlier, and thatk you Crotalus for your explanation.
chrisk - as far as I’m concerned, you should get the Nobel prize! I guess I was maybe asking for the impossible and what you have offered is really so helpful. Thanks.
On a varitaion of the modern theme, is there a formula for that?
eta: sorry, I see Crotalus has added a formula. Cheers.
Okay, I’ll take you through my entire process in Excel, as best I can remember it, including the graph, which was the important bit.
First, I typed in all four pairs of values, miles in column A, pounds in column B:
A B
5 14.39
7 18.29
13 29.99
22 47.54
Then I highlighted the entire block, chose Insert, Chart, X-Y (Scatter), and just finished with the default options from there. That shows the graph of the four trips, with cost up the left axis, miles along the bottom axis, and shows that they all fall along a fairly straight, diagonal line, which intersected the left axis.
From there, I went into the next column, cell C2, and typed in =A2-A1 as a formula. Copied this formula two cells down and one cell to the right. So now column C shows the difference in miles between adjacent trips, and column D shows the difference in price. Finally, in E2, I entered = D2/C2, and copied that down to row 4. So column E shows the ratio of marginal price over marginal distance. If I was right that the line on the graph was straight, the values in column E would be constant, and they are, at 1.95 – that’s our cost per additional mile.
Then I probably went down to A6, typed in =1.95 * 5 to see how much the cost for 5 miles would be at 1.95 a mile, and then punched = b1-a6 into cell B2 to see how much higher the total for the 5 mile trip was. That gave me the fixed fee of 4.64 for a 0 mile trip
A B C D E
5 14.39
7 18.29 2 3.9 1.95
13 29.99 6 11.7 1.95
22 47.54 9 17.55 1.95
9.75 4.64
This isn’t the proper way to solve a linear equation, it just seemed to make sense as I was doing it.