Orders for clothing from a particular manufacturer for this year's Christmas shopping season must be placed in February. The cost per unit for a particular dress is $20 while the anticipated selling price is $50. Demand is projected to be 50, 60, or 70 units. There is a 40 percent chance that demand will be 50 units, a 50 percent chance that demand will be 60 units, and a 10 percent chance that demand will be 70 units. The company believes that any leftover goods will have to be scrapped. How many units should be ordered in February?
Let X be the number to buy. Since at the worst you can sell 50, and at the most 70, assume 50 < X < 70. We don't know yet whether X should be less or greater than 60, so we will have to consider two cases.
Every unit sold gives a profit of $30, and every unit not sold is a loss of $20.
The expectation value is the sum of P(demand) * profit/loss given that demand
First case: suppose X < 60.
Then if demand is fifty we sell 50 and scrap (X-50), and if demand is higher we sell all X that we have
E[profit] = P(50)*[X*($30) + (X-50)*(-$20)] + P(60)*X*($30) + P(70)*X*($30)
Second case, suppose X > 60
Then if demand is seventy we sell all X that we have, but if demand is lower we scrap some.
E[profit] = P(50)*[50*($30) + (X-50)*(-$20)] + P(60)*[60*($30) + (X-60)*(-$20)] + P(70)*X*($30)
Check if those expressions are correct, and solve each for maximum X