The maximum height X of flood water each year on a certain river is a random variable with density function
f(x)={exp(−x)0if x⩾0,otherwise. It costs y megadollars each year to prepare for flood water of height y or less. If X⩽y no further costs are incurred but if X⩾y the cost of flood damage is r+s(X−y) megadollars where r,s>0. The total cost T megadollars is thus given by
T={yy+r+s(X−y)if X⩽y,if X>y. Show that, if r+s⩾1, we can minimise the expected total cost by taking
y=ln(r+s). What should the river authorities do to minimise the expected cost if r+s<1?