All right, just some properties of random variables and some features that we're going to take advantage of. If I add a constant to a particular outcome, if I take sales and instead of looking at sales, I'm looking at sales plus some constant. Well, my expected value is going to shift by that constant. Variants and standard deviation, because these are measures of dispersion around the average aren't going to be affected. What about if I re-scale things? Let's say demand is random to me but revenue is based on price. So, price times demand is going to give me that revenue piece. So if I can make my prediction for demand, how do I translate that to a prediction for revenue? Well, as we see in this first line here, if I come up with my prediction for revenue is going to be that price multiplied by my prediction for demand when we're looking at measures of dispersion, in the case of variance we're going to multiply it by that constant squared. In the case of the standard deviation we're just going to multiply it by the absolute value of that constant. So these are some characteristics that we do want to bear in mind when we're working with these random variables, two random variables that are independent of each other, we can just add their expected values together. When the variables are independent of each other, we can also add their variances together. If there's a relationship between these random variables, for example demand for two different products, there is a more general calculation that can be used for the extent of variation that we're seeing. You'll notice that the main difference when there's a relationship is this co-variance term and that's directly related to the correlation. And we'll take a look at this. Very common in financial applications when you've got correlated financial instruments they tend to move in the same direction. What does that do to the extent of risk that you're taking on with a portfolio? That co-variance is going to play a critical role there. All right, so if we take the case where, and just as an example, where two stocks, we've got the returns of 5% and 3%. We've got standard deviation the levels of risk of three percent and one percent. If we're making the assumption of independent and I make the assumption that I'm going to divide my assets between these two investments. Well what's my expected return for that portfolio. Well for the first piece what we're going to look at is 50% is going into investment x, 50% is going into investment y. So that's the first term that we've got in each of these. So that's my allocation multiplied by the expected returns of 5% and 3% gives us our expected portfolio return of 4%. No surprises there. How much variation do we have? In the portfolio, we're just going to follow our formula. So the constants squared on each of these multiplied by the variants associated with each of the stocks yields my variance the square root of that is going to give me the standard deviation. So that is under the assumption that x and y are independent of each other other. But what can happen here if we've got, let's say a negative correlation? Well negative correlation tells us that when one goes up, the other goes down. Well that's actually going to reduce the level of risk that we have and the place where that's going to happen is in this variance calculation. We're going to have an additional term that takes into account the co-variance. So we can play out different scenarios where we change the allocation, where you know here is we put a 100% in one product we put 100% in the other product. And what's interesting is at least initially as we start to diversify we actually get less risk than putting everything into one product. All right, so that's just an illustration of taking two random variables and how they're going to work together when we try to combine them. All right, so you know, what does this have to do with forecasting ultimately with decision making? If here's our historical data. What's demand going to be tomorrow? And that's going to be something that's going to factor into inventory decisions, it may factor into pricing decisions depending on the industry that we're talking about. May factor into staffing decisions. If we're looking back at all of this data, what's my best guess for what's going to happen? All right well, a logical approach for us would be to say, let's take the average. Now whether we want to take the average over, let's say, this entire horizon or perhaps when you say, you know what? Let's just focus on recently. Let's just focus on the more recent time periods and take the average. So, maybe it's just over this more recent period. But that's what our instinct is telling us, and that makes sense is to say let's take the average. But again the average doesn't tell us how much volatility we are experiencing, so that's what we want to factor into things. All right, well how can we go about doing that? One approach is to use what is referred to as the empirical distribution. So this is the distribution of the observed outcomes that we've had. And so we try to explain what we're seeing here. The height of each blue bar represents how frequently in our data we've observed, in this case, a particular level of demand. So, yeah, this bar here telling us that about 2% of the time we've observed three units of demand and about 1% of the time we've observed 59 units of demand. So the blue bar is using this particular axis. Now what if we were to say what's the likelihood that I've observed a demand that's greater than or a demand that's less than a particular number of units. That's what the red line is picking up for us, the cumulative frequency. So for example, if we look at this particular point, what we're seeing here is demand is less than it looks around 33, 34 units About 70% of the time. All right, so demand is going to be less than 20 units. About 20% of the time. So in this case what we can do is, well, let's look at what we've seen in the past and use that to characterize the likelihood of different outcomes being observed. It's not a bad idea. The one potential shortcoming that we run into though is you can see that there's some gaps in this plot. You know, for example, we don't observe any observations in the 50 to 55 range. We don't observe it looks like 56 or 58. Does that mean that demand could never take on that value, that's unlikely. It may just be given the number of observations that we have, we just haven't observed demand at that particular level, but it could happen. That's going to be one of our limitations if we were just to rely on the historical data and say we're going to expect values to repeat themselves with some frequency. So if I take the last 100 days. Each observation corresponds to 1% of my data. We're only going to allow the values that we've observed in the past. So is there something we can do that's a little bit more flexible? Well that's where the probability distributions or probability functions are going to come into play and in this case looks somewhat reasonable for us to assume the normal distribution. So for example, if I were to try to approximate a normal distribution over this, I might approximate a bell curve that looks something like this, where the center of my bell curve, that's the average, and we're saying that there's going to be variation around that average. So I'm going to characterize it based on the properties of a normal distribution. The nice thing about this approach is we're going to allow each possible outcome to occur with some probability even if we haven't observed it historically.