The newsvendor problem is a classical problem in operationsmanagement and applied economics used to determine optimal inventory levels. It[br]is (typically) characterized by fixed prices and uncertain demand for a[br]perishable product.[br][br]We assume that a newsvendor buys a quantity of newspapers with a given price[br]paid and sales price. Based on demand, we compute profit.[br][br]For this version of the applet we assume that the demand function is a uniform distribution.[br][br]In step 1 we set up the parameters of the graph.[br]High Profit, Low Profit, and High Quantity give the limits of the graph.[br]The Order Quantity, is limited to being between 0 and High Quantity.[br]We assume that demand is between 0 and High Quantity.[br][br]Dragging the purple Q lets you see the profit or loss for a given quantity of papers sold.[br][br]In step 2 we specify the high and low demand of the demand function.[br]Note that the blue density function is on a different scale from the profit function.[br][br]In step 3 we multiply Probability times Profit[br]to get expected profit at each demand value.[br][br]We lose the most money on a day when the demand is 0, [br]but since that is less than the minimal demand, those days don't happen[br]so we don't expect to lose any money on those days. We expect to lose[br]more money on days when demand is minimal, than on days when demand is 0.[br][br]In step 4 we add up the expected profit for each[br]demand value for our order size and get the expected profit for the order size.[br][br]In step 5 we can drag the order size and get the[br]curve of expected profit as a function of order size.[br]Step 6 lets us clear the trace and retry the problem with different parameters.[br]