 Welcome back everyone. Today we're going to talk about continuous random variables. So continuous random variables basically are the most easy to understand if you think about a graph. Okay, so if you think about some type of distribution on a graph, continuous random variables are the probability that some event is going to happen based on whatever distribution you're looking at. Now that might sound confusing. We'll take a look at some graphs and some distributions to try to clarify what's going on here. So the graph of a continuous probability distribution is a curve and we'll look at those. Probability is represented by area under the curve. So whenever we have some sort of distribution or we have a graph, the continuous probability is the area underneath the graph and that'll become clear in a second. The curve is the probability density function. So you have some sort of probability distribution and we can be we can represent that curve or that distribution as a particular function. It's normally represented as fx. So we see this fx here. So the area underneath the curve is the cumulative distribution function, cumulative distribution function, and that's where we can get the probability for these continuous random variables. So cumulative distribution function, the outcomes are measured. The entire area under and above the curve is equal to one. So whenever you're looking at a distribution, each point on the graph, if you add up all of the probability, that probability has to equal one. Now that doesn't mean that let's say the probability that something happens is definitely going to happen. It could be the combination of something happening and something not happening. Again, that'll make a lot more sense once we look at a graph. So the entire area under and above the curve are equal to one. Probability is found for intervals of x values rather than individual x values. So instead of trying to figure out the probability that somebody picks a number seven, we're trying to figure out what's the probability that a number that somebody picks is within a certain range. So we're looking at the range of distributions instead of a particular value. So that's what the distribution is for. So looking at the uniform distribution, this is the first distribution we're looking at. A uniform distribution essentially is all possible values have the same probability of being true. So in this case, the values two, three, four through eight point something all have the same probability of happening. And that's why it's a uniform distribution because there's actually no curve here. This is a uniform line. And you notice that there is zero probability and zero probability of nine and 10 or zero probability of one or zero. So here we have no probability of something happening. Nine and 10, we have no probability of something happening. And then two through eight point something have the same probability of happening. Now, what we're actually interested in. So this is the distribution. But what we're interested in with continuous random variables is calculating the probability that let's say some value is x value is less than three or no, sorry, greater than three and less than six. So we want to know what's the probability that x falls in this area in the middle. So this uniform distribution, x has the same probability of actually being any of these values. And we want to know what's the probability that x falls within from three to six. Now with a uniform distribution, this is relatively easy to calculate, but don't worry about the calculation for now. What we're interested in is understanding the distribution and where a random variable x, what's the probability that it's going to land between some interval. So what we're calculating is the probability that it lands anywhere within this interval. So this is a uniform distribution, exponential distribution, which you've actually probably seen quite a bit in the news now because these days we're talking about exponential distributions a lot. You notice instead of having all values having an equal probability of happening, there's actually a curve and this is an exponential curve here and it's exponentially going down actually. So that means that the probability that you get a larger number is less than getting a smaller number. So for example, you have a much, much, much greater chance of pulling a one than you have a chance of pulling an eight in this graph. So this is an exponential distribution. It just is basically going down and getting smaller and smaller. And again, what we're interested in here is not what's my chances of getting an eight or what's my chances of getting a one. We can calculate that, but what we're really interested in with continuous random variables is the probability within a given interval. So here the interval is two and four and we want to calculate the probability of x landing within this area. Now within this area, we can see that four has a lower probability of happening than two. So two has a much greater probability of happening, but actually what we're interested in is anywhere in this area, what is the probability that x will land within that area? So the probability that the value of the random variable x is in the interval between two numbers and that is in this case two and four. So the shaded area. Now normal distribution and normal distribution is what you will see a lot. We are talking a lot about exponential distributions these days, but normal distributions are actually really, really common. They happen in lots of different areas. A lot of distributions that you'll find end up being some type of normal distribution. For example, grades. So grades in a classroom are normally in some type of normal distribution. Now if we look at the normal distribution, what is it telling us? We have this curve going up in the center and down on both sides. Forget about the numbers at the bottom for a second. This curve is what's really important because this is a normal curve where in the center you have the greatest probability of landing in the center and the lowest probability of landing on either side. So imagine that this was course grades. On the left hand side you would have, for example, your A pluses and on the right hand side you would have Fs. So what you end up getting in a normal class, what's good to see at least, is a normal distribution where a few people have A pluses and very few people have Fs. So there should be a low chance of getting an F and a low chance of getting an A plus and a, let's say, the greatest chance of getting whatever is in the middle, which is usually a C. So if you have a normally distributed grade chart, that actually shows that your grading is right on track. It's where it should be. Of course, everyone's going to grade differently, but the normal distribution is a good example. Then you might have heard about curving the grade. So what happens sometimes is if the class is really, really hard and then you see a distribution that's mostly towards failing, the normal distribution curve is on the failing side or a lot of people failed, then what you can do is move the curve where basically the center becomes passing so that the center again becomes a C even though everyone kind of did bad. The middle becomes a C, few people have As, but actually the As also move up. So you can move the curve along and that's curving up. Similarly, if I guess if the professor was really mean, if the class was too easy and everyone had As, then they can move the curve back where the center is C's and then that changes the distribution of the grades in class relative to everyone else. So normal distributions are very useful for a lot of different things, although grades are just an easy example. We see normal distributions in a lot of different areas. For example, heights are also normally distributed in a given population. Yeah, so a lot of things you measure, you'll end up with a normal distribution. So whenever we're talking about calculating the probability, imagine that we want to know what is the probability of a given height, like we choose some random person. So we have a random person X, we want to know what's the probability that their height is going to land within this particular area. And that's what we're talking about with continuous random variables. We're measuring the probability that the value of the random variable X or the person's height in this case will be between these two numbers. So you'll very often see normal distributions and then we want to calculate the probability that something happens underneath these normal distributions and that'll become really important later whenever we're talking again about normal distributions in our analysis. So continuous probability functions, so we've talked about the function and basically the function can describe this curve. Whenever we say a function, it's just a mathematical model to describe how this line curves. That's really all we're talking about. So the function f of X, description of how the line is curving or what our distribution is, is defined so that the area between it and the X axis is equal to a given probability. Now what that means is that this line is curving and everything under it corresponds to a given probability in your distribution. So again, you'll be able to ask the question, what is the probability that X will land between one and two? Well, it only makes sense if this whole area is defined as some sort of probability value. And that's what we're doing with the functions. Since the maximum probability is one, the maximum area is also one. One just means that something will definitely happen or is definitely true. So for example, what's the probability that X is between one and two? If that probability equals one, then that means X will definitely be between one and two. Okay? One is the maximum probability you can get. So X will definitely be between one and two. But with this curve, we know that that cannot be true because we have this area, and then we have all of this area that X could also be in. And it's actually very likely that X is zero. It's the most likely that X lands on zero, but then zero to one has a huge likelihood. Zero to negative one has a huge likelihood. So actually, the chance or the probability that X is not between one and two is much greater than the probability that X is between one and two. Okay? So we know that this area cannot equal one because there's this huge area over here and this little area to the right-hand side that could also be where X lands. So the probability that X is this distribution shows where X can possibly land and the probability that it will land in that area. And then we're trying to calculate under this area what is the probability between a particular point. Okay? So since the maximum probability is one, the maximum area underneath the entire distribution is also one. Okay? So probability equals area. And that is the area underneath this entire distribution. If we remove this purple piece, if we said, what's the probability that X lands in any of these areas, we would say one. What's the probability that X lands greater than zero? Well, it's probably half, actually, because zero is right in the center. And then this is half, so 0.5. And then the other half is 0.5. So if it was zero to the end of this three, it would be probability of 0.5. Work trying to calculate between one and two. So we need to know actually how this curve flows to calculate the probability that X is going to land in that area. Yeah. Okay? So uniform distribution, like we talked about before, it's a continuous probability distribution. As we saw in the curve, if something's landing within a particular point in the curve, if it's more likely, then the curve raises up. If it's less likely, the curve goes down. In this case, it's completely flat. We just have a straight line, which means that the probability that we end up with any of these values is the same. So it's a uniform distribution. We're concerned with events that are equally likely to occur. So basically rolling between two and almost nine has an equal chance of happening. So X is equally likely to be within that chance at that area. Exponential distribution often deals with the amount of time until an event occurs or events over time. So how, for example, how rapidly a virus spreads. So whenever you hear about reducing the curve, the way that a virus spreads would actually look a little bit like reverse of this graph where we start out low and then it just goes up really, really, really quickly. So this exponential curve goes directly up almost. And what that means is that you essentially have people who are, let's say, infecting other people. So how quickly do other people infect other people? You might have heard for the virus, for example, that one person normally infects like 2.5 other people. That's a huge exponential increase, which is why everyone's so worried about it, because the virus has an exponential growth. And if that's the case, then it'll spread through the entire population very quickly. So exponential distributions, talking about the time basically as an event occurs through time, and we want to try, especially if it's in the case of a pandemic, we do not want the curve to go up exponentially. We want to try to blunt it so it actually curves back down and looks something more like a normal distribution if we can get it there or just flat. We want it to flatten off completely. So in an exponential distribution, there are fewer large values and more small values for this graph. Like I said before, you're less likely to that x will be 8 and you're more likely that x will be 1 because the curve is bigger here. If this chart were flipped, then you would have a low curve around 1 and it would exponentially grow to 8 and then 8 would be way more likely and 1 would be less likely. So exponential curves basically just go one direction and usually go up really quickly or down really quickly. So memorylessness of exponential distributions, basically it's the knowledge of what has occurred in the past has no effect on the future probabilities. So this is another problem that when you're trying to predict something with exponential growth, the past doesn't necessarily reflect what's going to happen in the future and there is a limit for some things on how exponential growth can work. Eventually, usually hits a plateau fairly quickly. But in the case of a virus again, you probably don't want it to get to the complete saturation point. An old part is not more, sorry, an old part is not more likely to break down than a new part. What I mean by this is imagine that you have a part in your car. If that car, if you replace that part, you're not guaranteed that that part will last 10 years. But if you keep the part in there for 10 years, you're not guaranteed that it will fail. So basically the past doesn't necessarily affect the future that much. The likelihood of something randomly breaking isn't more, isn't more or less based on what happened in the past. And we'll talk more about that later. Yeah, just think of it as it has no memory. Okay, normal distributions hopefully make a lot more sense. Very common continuous probability distribution. Normal distribution is useful because of the central limit theorem, where random variables independently drawn from an independent distributions converge in distribution to the normal one. What that means is that around some sort of normal or middle ground is where you will have them where x is most likely to be. So whatever you're measuring is most likely to be within this region. And then on both sides, as it gets further away from the center, as it gets further away from the center, the likelihood goes down, gets less likely on both sides. Whenever you see that it's a really good indication that first off the curve is normal. And there's a lot of really interesting analyses you can do using normal distributions that you can't really do with some other types of distributions. So we'll talk a lot more about those later. So those are three major types of distributions. And then calculating continuous random variables, we're looking at the probability within a given region underneath a distribution function. Okay. Yep. So that's it for today. Thank you very much.