Welcome to our final lab on Monte-Carlo simulation. Let's call this model six. Here we are going to investigate some special cases. For example, in this case I'm going to assume something about weather events and how that affects the flow of customers and revenue. Of course, in the real world, you'll collect this data through interviews or direct observation and then you can simulate its effect. But here, the special case is listed in this red cells from cell A7 to B10. And basically it reflects that fewer customers come. So it says the maximum number of customers is about 400. Number of weather affected days is about 20 percent of the days. And in addition, as we discussed in earlier classes, when, for example, rain happens, people do tend to spend a little more because they perhaps tend to bend a little more time in the shop. So instead of a $1.75 minimum spend is more like, Let's see how we can simulate this particular case. So just for convenience, I'm going to make some assumptions that the underlying distribution of arrival and spenditure or expenditure does not change. However, you could collect that data and again simulate it based on that. Here, I'm going to assume that underlying distribution that we computed, for example, for customers spend where the mean was 5.125 and standard deviation was 1.31, remains the same, except nobody spends less than $4. So how can we simulate that? Let's look at that, suggest to make it clear, what we want to do is if we want to just draw numbers from the same distribution that we drew earlier numbers from, but draw unknown numbers below four because everyone spends at least $4. So what we want is we want, we want all our data to come from this particular area. And we don't want any data from this particular area. So how do we do that? So to do that, essentially what we're going to do is we're going to get the CDF. First of all, we have to find out how much of the probability lies below number 4. To do that, again, we'll just go to our normal distribution function that we have used before. And give it B8, which is for G6, which is our mean, and K6, which is our standard deviation. And we want the cumulative distribution function there. So if we just remove the single quote and calculate it, then we can see once we calculate this number as accumulative distribution for the number four, under this distribution, we get a probability of 0.195. So what that probability reflects is that our probability of being in this particular region is 0.195. So now our strategy is going to be that we're going to draw a probability from, what's this probability, this 1- 0.195. So we are going to get, let say 0.2. So we're going to generate a random number between 0.80 and add to it whatever we get, we add to it 0.195, because nothing is going to be drawn from there. So whatever we get between these two numbers, it'll be somewhere lying here. And we can then draw that number from the same distribution, making sure that nothing is below four. Incidentally, one of the techniques or the new techniques that I did not talk about that I'm using here is to not generate random numbers every time I change something in the cell. Because as you might have realized, if you've been doing the assignments that venue generate lot of random numbers, it takes quite a while before you can edit particular cell after you change something because all the random numbers have to be drawn. So to avoid that, what you can do is you can just create a dummy variable. For example, I'm calling it autocompute, and I'll set it to 0. Now, whenever I want to simulate, I can set this number to one and everything will be working the same way. What I've changed some of these numbers to, for example, customers spend is to something like this. Where I'm saying if B 14, which means if B 14, this particular number is equal to one or is true, then calculate the normal inverse fraud from a distribution G6, K6. Otherwise, just use whatever is in G6, which is this 5.125. So right now it's not drawing any random numbers. And if it, This is not drawing any random numbers, then anything that I have in my data table is not drawing any random number either, and therefore we get a very stable value. I can do the same thing for number of customers. And then this is the distribution which we're going to talk about how to generate Spend distribution for the case where the minimum value is four. So we're going to talk about maybe in the next segment. Let's stop this segment right here. In the next segment we'll talk about how do we get this trunk, this value from this truncated distribution, if you will? And how to use that for our simulation purposes.