Next topic I want to talk about is Probability Distributions. And here we'll talk about a number of topics and in this segment we'll look at probability density functions. So first some definitions as given here in the extract from the reference handbook. We have, first of all, let's suppose we have some capital X, is a discrete random variable which can take on some value from discrete values XI. Then the first thing we define is a so called Probability Mass Function. F of xk which is the probability that x is equal to the value xk where k is 1 to n, the number of possibilities. We also have the, so this is the discrete probability that x is equal to some value XI. And of course the sum of all probabilities is one because one of them must occur. If X is a continuous function, then we use the probability density function where we define the probability of the value being between a and b, is the integral from a to b. In other words the probability that X lies between a and b is the integral of a to b of f of x DX, and this defines the function f of x. So for example if we had some arbitrary function shaped like this, the probability density function, in other words the probability of X being zero is very low, and the probability out here Is very low, then the probability that the value falls between the values a and b is just equal to this area, the area under the curve from a to b. And we also note that the value must take on some value in this range. In other words the total area under this curve, total area under this curve must be equal to 1 because some value must occur. We also have cumulative distribution functions and the cumulative distribution function is that the probability that an event less than some specified value will occur. And again, we have to consider discrete and continuous functions. So, if it's discrete, the cumulative distribution function is defined like this. In other words, it's the summation of the individual probabilities up to that value. Or, if it's continuous, it's the area under that curve, all the way from minus infinity up to the particular value in question. But often this will be given in table form, for example, the binomial distribution or binomial probability that we'll look at later so you won't have to actually compute the integral in those cases. So how would we write these functions? A simple example, in a university bookstore it is observed that students buy either a hardback or paperback version of a textbook. And 20% of them buy the hardback version. How do you write the probability mass function for this? Well, we would do it like this. That x our variable let's suppose takes on the value zero if it's a hardback or one if it's a paperback and those are the only two possibilities. So therefore, function of xk, a general definition is equal to the probability x equals xk. That's our general definition of the probability mass function. So in this case, function of zero, in other words, the probability that x equals zero, or the probability that the student buys the hardback is 20% or 0.2. But the probability that he or she buys the paperback version, function of 1, is the probability that X=1 is equal to 1 minus problem function of zero, which is .8. And finally, all other values are zero. Function of x, the probability that x is equal to x is equal to zero effects is not equal to zero or one. And that would be the answer. We can write that a little more neatly in this form. That function of x is equal to 0.2 if x is equal to both 0.8 if x is equal to 1 and 0 if x is not equal to 0 or 1. That would be our probability mass function. Another example for a continuous variable we've given that the probability density function for some random variable x is shown. And the question is what is the probability that x is less than 0.5? So, in this case we have a simple linear function and the answer is one of these alternatives. So, what we're looking for is the probability that x is less than 0.5. And this is we know is going to be this area, the area under the curve, up to .5. So in this case, we have a very high probability of this event occurring if X is equal to zero and the probability goes to zero if X is equal to one. Now to evaluate this, we've got to get the area under the curve. We note that we're only given that this value here is 1. We're not given the height here. How do we find that? Well, we use the fact that the total area under the curve, this total area here, must be equal to 1 because the cumulative probability of this occurring when x is less than 1 Is equal to one. So, we use that fact, let's suppose that I call this height here h, and the area of the triangle is half the base times the perpendicular height. or one half times H is therefore equal to one, from which we see that H is equal to two. And now, by inspection, we can get the equation of this line here is function of X is equal to minus two X plus two. So I have the equation of this line here is minus two X plus two, plus two is equal to function of X. So the probability that x is less than .5 then, I can write like this. Function of x less than 5 is the integral from minus infinity to .5 of f(x)dx. But this in turn, I can change from the limits zero because overall the curve here is zero here goes up, comes down. So in other words, the integral of the curve over this range from minus infinity to zero is zero. So I can split the integral up this way and take my limits from zero to .5. Of the integral of minus two X plus two. So expanding out that integral, is minus X squared plus two X, evaluated between zero and .5. Is equal to .75, is the answer. The answer is B. In other words, there is a 75% probability That an event will occur with X less than 0.5. And this of course you could easily have evaluated by taking the average height of this area here, and computing the average height. So this concludes my first discussion of probability density functions.