# Continuous Distributions and the Uniform Distribution

This is a video on continuous This is a video on continuous probability distributions I will start out today by talking about the definition of a continuous random variable. Then we will move on and I will talk about the most important, maybe not the most important but the simplest of all distributions for continuous random variables. And that’s called the Uniform distribution. After going over the Uniform distribution We will look at probabilities that involve the Uniform distribution. Then we’ll move on and we will say, how we find a quartile? How do we find the first or the third quartile? Or how do we find a percentile in general if we know that a variable follows a Uniform distribution? And then finally we will go over the mean, the standard deviation, and we will use those to find the z-score when we know that a continuous random variable follows a Uniform distribution today won’t be that long but it is pretty important and it’s going to set the stage for what we will be doing for the rest of the class and particularly for Normal distributions which are a little more complex than the Uniform distribution, but they are the important distributions for continuous random variables. Now we talk about what a continuous distribution is. The equation for a continuous probability distribution is called the probability density function remember that a variable is a continuous random variable, that means it could come up and be any number within an interval. That interval could either be like between zero and one or can even be between negative Infinity and Infinity. So we’re not talking about discrete random variables anymore where we only had maybe 10 different possibilities or only the whole numbers as possibilities. Now the possibilities are all numbers on the number line or all numbers between two fix points. There will be an infinite uncountable number of answers that you can get when you are selecting your random variable. For the function, now we can’t draw a table anymore because it’s just an infinite number to draw on the table, we can’t even use “…” notation. But what we can do is we can sketch a graph or we can show an equation that will represent that probability density function and it will look like some picture like this where you have a curve above the x-axis. I’m going to define the cumulative distribution function as the area to the left of some value. So here’s a value b. The cumulative distribution function is the area to the left of b above the x-axis and below the curve. On the other hand we will say the probability that x is between a and b, so it is greater than a and less than b, will be the area above some value a that might be here at a and below some value b under the curve and above the x-axis. by the way if you want the probability the x is greater than b that would be this white area or the area to the right of the value b below the curve and above the x-axis. Now let’s look at some properties of continuous distributions the first property is that the probability density function can never be negative. It can be zero at some values, but it can never be negative. It just doesn’t make any sense when we’re talking about probabilities to talk about negative numbers. Probabilities being negative never happen. We’re not even going to go there. The probability density function can be zero or positive. The total area bounded by the probability density function and the x axis is always equal to one. We will be using that over and over and over again. That makes sense because that says the probability of something happening is 100%. If you throw a dart at a number line then the probability it will hit somewhere between negative infinity and infinity is 1. that makes sense because that’s everything. but there’s one thing that you may feel that’s true that’s not. That is the probability density function can reach values greater than one that feels wrong because we learn for discrete probabilities that you can never have values greater than one for discrete probabilities. But for continuous distributions you can. That’s because we’re talking about the area under a curve. For example, if we’re only between 0 and 1/2 you have to get bigger than 1 because if you stay under one the the area between 0 1/2 would be less than 1/2, but the area for all values must be equal to 1, and you can’t be restricted to 1/2 so it will have to average at 2, for example. So don’t be surprised if a probability density function gets higher than one. Now I have an example. The number of seconds after the exact minute that classes end follows a Uniform distribution. The graph below shows this distribution curve. Find h. A Uniform distribution means that it’s the same for all values so when a function is the same number for all values of x, then the graph of that function is a horizontal line. If we’re talking about the seconds after the class ends, that seconds hand can only be between 0 and 60 because when you hit 60 you start over again at 1 second, for example, or 1/2 second. So this Uniform distribution is between zero and 60. We want to find out what the height is. We will use the big formula that states that the area under the entire curve must be equal to 1. So we can say that the area is 1. Because we have a Uniform distribution we’re talking about a rectangle here. Areas are hard in general to compute, but the area of a rectangle is very easy to compute. If you remember from your basic basic geometry the area of a rectangle is the base times the height. The base times the height is 1. The base of this rectangle we can compute as 60 or 60 – 0 if you want. That’s the base of this rectangle. The height of this rectangle is h, so we can say 60 times 8 equals 1. Now we get to do some very basic algebra. Don’t you wish this is the hardest problem you would ever get in algebra, but that wasn’t true in your algebra classes, but for us you don’t have to do some real difficult algebra just 60 times h equals 1. To solve that we just divide both sides by 60. and what we get is h equals 1/60. And there’s the height of the rectangle. Now let’s use that to answer some questions. Let’s find the probability that a randomly selected class will end with seconds hand between 10 and 30 seconds. I will start by drawing this picture. Again, we have this rectangle between zero and 60 but we also have another rectangle between 10 and 30, because remember the probability that x is between 10 and 30 is the area under the curve or in this case the area under the straight line segment between 10 and 30 above the x-axis, and that area is the probability that x is between 10 and 30 which is a rectangle and areas of rectangles are again the base times the height. The base of this rectangle is 30 -10 and the height of the rectangle we’ve already found was 1/60. Now we just do the arithmetic. 30 – 10 times 1/60, 30 – 10 is 20 20 divided by 60 is the same as 2/6 which is 1/3. So we can say that the probability that the seconds hand will be between 10 and 30 is equal to 1/3. Let’s look at another example. Let’s find the first quartile for the same question, and by the way, this notation X~U(0,60) X means the variable x. The ~ means has the distribution. U means Uniform. 0 means with a low value or the lower bounded at 0. and 60 in this case means the upper bound is 60. The question is “Find the first quartile.” The first quartile means that we will pick this value right here which we call Q1 and we know that the area to the left of Q1 must be 25% because the first quartile is the 25th percentile. So the area is 0.25. So let’s set that up recalling that the probability that x is between 0 and this first quartile which I will call Q1 is equal to the area. But the area again is 0.25, but since we have a rectangle the area is the base times the height. The base of this rectangle will be Q1 – 0 and the height is 1/60. We are talking about the same problem with the seconds hand. Now we just do a little algebra. Q1 – 0 is Q1 and I multiply left and right by 60. I get that Q1 is 0.25 times 60 and 0.25 times 60 is 15. Q1 is 15. That should totally make sense because a quarter of an hour is 15 minutes and a quarter of a minute is 15 seconds. That says that the first quartile is at 15 seconds. So from 0 to 15 seconds takes up 1/4 of a minute. Let’s take a look at another question. This is one of those that can be very difficult for you to wrap your heads around. we want to find out the probability that a randomly selected class will end with seconds hand at exactly 40 seconds. That could happen. It could happen that you’re in class, the professor says “The class is over”, you the look of the clock and that’s it exactly 40. Hopefully, you agree that’s a possibility. On the other hand, let’s find the probability. Again the probability is always area. In this case to be exactly 40 seconds means that it is greater than equal to 40 seconds but it is also less than are equal to 40 seconds. It can’t be bigger than 40 but it is also less than are equal to 40 seconds. It can’t be bigger than 40 and they can’t be less than 40 books between 40 and 40 and that’s the area under this rectangle. In this case when we the picture that is a line segment. and the area of a rectangle is the base times the height but the base is going to be 40 – 40 that base is just 0. The height is still 1/60. and 40 – 40 is 0 times 1/60 is still just zero. The probability that a randomly selected class will end with seconds hand exactly 40 seconds is equal to zero. That just feels wrong, but it is right. even though it’s possible for that seconds hand to be at 40 when class is over the probability is 0. that just feels weird. Here’s what going on. We’re talking about a continuous random variable. When you have a continuous random variable you have an infinite number of possibilities. and remember before, you thought about a probability being a number of ways of making you win divided by the total number of ways that something happen. Here there is only one way that can make you win and that’s exactly 40 but there’s an infinite number of possibilities between 0 and 60 seconds. One over infinity is kind of a weird thing. You may not have thought about it before but when you get into calculus,you realize that 1 over infinity goes to 0. It’s kind of a weird idea but it really is true that the probability that the seconds hand will be exactly 40 is 0 even though it can happen. It turns out that it makes life easier for us. When we’re dealing with probabilities with this little=below the