 Hi, this is Dr. Don. I want to go over the process for constructing in Excel an expected monetary value payoff table. Now, these tables you may see just in routine problems about expected monetary value, but they're also linked sometimes to decision tree models and also to Monte Carlo method models. So this problem I'm going to show you should be helpful to learn the technique. And I'm violating PowerPoint rule number one. A lot of words, but let's read the problem here just so you'll understand. Fast bakery specializes in croissants. Early each morning, the bakery manager, Fred, must decide how many croissants to bake for the day. Each croissant cost $1.10 to make and sells for $2.85. Croissants left over at the end of the day can be sold the next day for 75 cents. Good old Fred has captured a lot of data and he's recorded the daily demand over the last year and he's calculated the associated probabilities with the techniques that we've seen before for discrete distributions. And he's come up with a table here that shows an increments of 100, the probability for those particular demands on any given day. You have to do two things. We need to help Fred determine the optimal quantity to bake each day, assuming that the unsold croissants, the leftovers can be sold in the day old store. And then we need to recalculate it assuming they cannot be sold. Given the title of this video, we're gonna construct a payoff table and determine expected monetary values. And we're gonna use the basic, basic model in finance and business, revenue minus cost, equal profit. Now I've taken that data and transferred it into Excel and already built out the table and I'll show you how it's constructed. Up here in the left, we've got our historical demand table, which is the number of croissants sold on a given day and the probability of selling that amount, that demand. Down here, we've got the unit costs, how much they ask when the croissants are fresh, and then what the leftover price. And we've got two variances there. One, they can sell it for 75 cents in the day old store and the other option, they can't sell it so it's got a zero leftover price. So let's break down that basic model, profit, equal revenue minus cost. In this problem, revenue has two components. The asking price revenue plus the leftover price revenue. Asking price is if they can get, they sell at the asking price, they're fresh and that's the asking price times demand or the number of baked, whichever is smaller. The leftover price revenue component is just the number leftover times the leftover price and of course cost is equal to the number of baked times the unit costs. Looking at this asking price revenue, we've got to find the smaller of the two, demand or the number of baked. You can use a men's statement to do that. And you want the minimum of baked or demand. And we multiply that by the asking price and that's the asking price revenue. On the leftover revenue, we need an if statement. If baked is greater than demand, then we have leftovers. If we have leftovers, the number leftover is baked minus demand. We multiply that times the leftover price. If baked is less than demand, then we don't have any leftovers so the leftover revenue would be zero and that's when we put a zero in the if statement. Taking that concept and then converting it into a formula to get the sale profit, we just have the asking price revenue which is the men of baked or demand times the asking price minus the cost which is baked times unit costs plus our if statement to get the leftover revenue. If baked greater than demand, then we take the difference and multiply that times leftover price otherwise we just have a zero times leftover price which means we have no leftover revenue. And then we convert that into the typical Excel formulas. This is the formula in this first payoff sale which is the intersection of a baked amount of 1500 and a demand of 1500 which means there would be no leftovers. The formula that we've converted into Excel terminology is just the minimum of the baked or the demand times the asking price minus the cost which is the baked times the unit costs plus the revenue from the leftover which is if the baked is greater than demand then we have a difference and we multiply that difference the leftovers times the leftover price otherwise we have a zero times the leftover price and that gives us $1,725 of profit for that particular sale, that intersection. And through the use of locking down either the columns or the rows, you can see that in some cases we froze everything and other cases we just again lock either the column or the row and you can figure that out you know how to do that. Copy that across to get the sale profits for each one of these intersections of a baked quantity and a demand. I wanted to pause right here for a second in our ongoing problem about the bakery and talk about this profit matrix or this table that we have. This is the part you would use if you're going to connect to a decision tree. Remember in the decision tree we're looking for payouts or profits at the end of the branches and the branches have probabilities assigned to them so we will get our expected value in the decision tree if we just work with this information. You don't want to have the expected monetary values in your decision tree end points because then you'd be using the probabilities twice. So just use these basic profits for each one of the sales in your decision trees if you're using this as a prep for decision tree model. Okay let's talk about the expected monetary value though for this problem that we need in order to tell Fred what to order. The expected monetary value for the baked quantity and the demand is a sum product. It's just multiplying the probabilities for each demand times the row profits for those demands. It's just in other words 0.01 times 17.25 plus 0.05 times 17.25. And it sums those up to give a total value there of 17.42. We copy that formula down each row for our baked quantity by looking for the largest, the maximum value in this column that would be the order quantity for Fred to order would be to this case order 2000 our baked 2000 would give him more profit than any others. The second half of this problem, we would do the exact same thing except instead of using the leftover price of 75 cents we would change the cell reference to this zero leftover price. Use the exact same formulas just change the cell reference to that cell and it would calculate and give us probably a new optimal order quantity or baked quantity if Fred cannot sell unsold things in the Dale store. So this is the payoff table for generating the expected monetary value for this particular problem to help Fred pick the best path. Hope this helps.