Ask The Wizard #416
A swimming pool is full of saltwater. A hose lets fresh water into the pool at a constant rate. As fresh water pours in, water flows out at the other end at the same rate. After an amount of water equal to the volume of the pool has poured into the pool, what ratio of saltwater will remain?
On a game show you are offered a prize of $0 - $20, to be determined randomly according to a uniform and continuous distribution. After the prize is offered you may keep it or pay $1 to draw a new offer. You may do this as many times as you wish.
What is the optimal strategy and what is the expected win following this strategy?
Let x = minimum value you will accept.
The average value over x is (20+x)/2.
The probability you accept any given offer is (20-x)/20.
The average number of offers you will refuse is 1/((20-x)/20) = 20/(20-x).
Let f(x) = The average final win = (20+x)/2 - 20/(20-x).
To find the maximum win, solve for x when f'(x)=0.
f'(x) = 1/2 - 20/(20-x)^2 = 0
20/(x^2 - 40x + 400) = 1/2
x^2 - 40x + 400 = 40
x^2 - 40x + 360 = 0
Solve for x using the Quadratic Formula...
x = (40 - 4*sqrt(10))/2 = 20 - 2*sqrt(10) = 13.67544468.
That makes the average win (20 + 13.67544468)/2 - 20/(20-13.67544468) =~ 14.675445.
sqrt(3-x) = 3-x2
Solve for x.
Square both sides to get 3-x = x4 - 6x2 + 9
f(x) = x4 - 6x2 + x + 6 = 0
Next, use the Rational Root Theorem to find a factor of x.
The possible roots are x = +/- (1/1, 2/1, 3/1, 6/1)
If x=-1, then f(x) = 0. So (x+1) is a factor.
x4 - 6x2 + x + 6 = (x+1)(x3 - x2 -5x + 6)
Applying the Rational Root Theorem Theorem again we get possible roots of x = +/- (1/1, 2/1, 3/1, 6/1).
Some trial and error shows that x=2 is a solution. Thus (x-2) is a factor.
x3 - x2 -5x + 6 = (x-2)(x2 + x + 3)
Using the quadratic formula to solve for x2 + x + 3 = 0 we get x = (-1 +/- sqrt(13))/2.
Thus, all solutions are x = -1, 2, (-1 + sqrt(13))/2, (-1 - sqrt(13))/2.