Let's say we have a random variable X, but we would like to know how likely each outcome is to occur,
is each outcome equally as likely to occur like a toss of a coin?
We got the heads or tails will be 50 50 or some outcomes more likely to occur than others.
We want a way to describe and quantify this.
This is done through probability density functions.
Probability density functions can be classified into two different types based on whether they are continuous
or discrete.
So probability density functions or PD are used for continuous random variables.
Probability mass functions or PMS are used for discrete random variables.
And each of these functions is a measure of the relative likelihood or probability that a specific outcome
will occur.
So let's look at the probability mass function for the outcome of rolling the dice so the outcomes of
the dice are discrete.
So we're going to use a PMF rather than a PDF, and we write the probability mass function as is to
map here.
So we have the little P capital X, explain the random variable representing the dice roll and being
the discrete values.
So we know from basic probability that the likelihood of the random variable being one being a single
dot on the face is one of the six.
We also know that the likelihood of it happening to is another one over six.
And we can do this for all the different outcomes of the experiment, for the rolling the dice.
So what we actually end up here, if we look at the probability mass function, we can see that it's
a constant function.
Each of these values here are equally as likely as each other and the probability is just one over six.
So we can say that the probability mass function is just going to be the probability that the random
variable equals that particular number.
So in this case, of course, the whole function is just going to be constant.
One of the six.
Now, if we look at another example, what happens if we had a weighted dice, so each of the outcomes
not as equally likely.
So in this case, instead of having this PMF, we're going to say, well, the six face is more weighted.
It's more likely.
So we're going to have a likelihood of rolling a six point seventy five and the rest of the cases are
going to have this lower probability of zero point zero five.
So we can see from this probability mass function here that there's a lot more likelihood of rolling
a six than any of the other ones.
So we know from basic probability that some of all the different possibilities has to equal one.
And we can easily see that from here.
So if we have five times zero point five plus our point seventy five equals one.
So it just follows the basic laws of probability as well.
We might want to ask ourselves another question, what is the probability of rolling a fire, a number
between one and five?
Well, we can just use our basic probability laws and we can just sum up the probability of each of
these events.
So if we do that, we end up with point to five as expected.
And of course, like I was saying before, it still follows the basic probability laws.
So another way to come up with this number here is to say, well, we know the probability has to equal
one and we know the probability of six is point seven five.
Therefore, the probability of knowing anything other than a six has to be one minus the probability
of rolling a six.
And again, that's just give me one minus point seven five, which is point to five.
So on the left here, we have the probability mass function of PMF that we just looked at and this is
for this great random variables and we use the P of X to denote it.
Now, when we look at continuous random variables, we have to use a probability density function or
PDF.
And the notation now changes to this F of X, so a small F capital X X for the random variable.
So we've shown an example, probability distribution here and this is actually called a uniform distribution.
This just means that the random variable can take on any number between two different limits and each
number is equally as likely.
So this is basically saying that when we query this random variable X, we're going to get a random
number between negative one and one, and it could be any number in between these two limits.
Now, if the probability mass function, the actual value of the function at any of the given outcomes
is actually just the probability of the event.
So if you want to know what the probability of beginning a four here, we just read the value and is
going to be the probability of that event.
We also know that when we sum up all the different probabilities for the probability mass function,
it has to equal one.
This is just the basic laws of probability.
We have an equivalent relationship for the continuous function.
So if we basically integrate the probability density function between negative Phinney and Infinity,
the area under the curve of the probability density function has to equal one.
So basically, if we look at this uniform distribution here, if we know that the area between Nagler
one and one has to equal one in total, then this value here has to be point five.
This is just simple math, because the area here, yeah, this is the area like two by a three point
five equals one.
So if we want to work out the probability of getting a certain number, so let's say we want to work
out the value, the probability of getting negative point, turn five here.
Now, if we look at the value here, if we evaluate the PDF for this value, we get a value of five.
Now, this can't be the probability.
The probability point five means there's a 50/50 chance of getting it.
So this function here does not actually give us a probability.
And the reason for this can be actually quite simple if we think about it, because over here in the
discrete domain, we have options one to six on this example.
So the probability of getting any one of these events or options is just one of the six.
However, in the continuous domain, we have infinite amount of options between negative one and one.
This is because it's continuous.
So if we look at looking at basic probability, we would just be having we'll just be trying to get
one over infinity.
And this is actually equal to zero.
So this is basically saying the probability of getting the random variable to be equal to a specific
number in this case, negative point seven five zero.
So this value that dysfunction outputs is not the probability now to actually get the probability out
of this.
We actually have to look at the integration between two different limits.
So what this probability density function that you're giving us is giving us of the likelihood and to
convert the likelihood into the probability we have to integrate it between two limits because it's
easy to see in this case.
If we integrate it between negative one and one, we're going to get one.
If we integrate at between zero and one, we're going to get five.
And that's saying there's a 50/50 chance of getting a number between zero and one or between zero and
negative one.
So this is the main difference between the probability mass function and the probability density function.
In this great version, we can read off the probability directly from the function itself, but in the
continuous domain, since this infinite amount of options between each number on the real domain, we
have to look at the area under the curve to get the probability.