00:00Hi guys, so in this
00:02video we're going to take
00:02a look in more detail
00:04at continuous random variables. Now
00:06I've called it a continuous
00:07random variables intro and I
00:09say more detail because you
00:11have looked at continuous random
00:12variables before. You looked at
00:15them when we studied the
00:17normal distribution. This is assuming
00:20you've done normal distribution before
00:21this lesson, but I normally
00:24teach it that way because
00:25the normal distribution is part
00:26of the standard level course.
00:28They don't have to do
00:29well this bit that's coming.
00:33Anyway, the normal distribution, this
00:35was a normal distribution. Well,
00:37let's say we were talking
00:38about height. Well, we said,
00:40imagine that mean height was
00:42150. We said the way
00:44we, the way to find
00:46the probability that someone's height
00:48was more than, I don't
00:49know, 180 or whatever it
00:51happens to be, as you
00:52go to 180 and you
00:54get the area
00:56the area under the curve
00:58gives us the probability. And
01:02the reason for that is
01:03because the y -axis here
01:05is not a, it's not
01:06the probability. It's the probability
01:09density. So this is the
01:12probability density. Let's see, p
01:16probability density. And then I
01:19need to write that again.
01:21I'll try to mean that.
01:24So this is the probability
01:27density. That's what the y
01:29-axis is. And what that
01:31means is it is designed
01:34in such a way that
01:36the area gives us the
01:39probability. So if I want
01:40the probability that someone is
01:41between 150 and 180 centimeters,
01:44I find this area. If
01:45I want to find the
01:46probability that they're less than
01:47150, well that's 50 %
01:49this area would be 0
01:51.5.
01:52Now, the way we calculate
01:55those areas is, luckily, in
01:58normal distribution, you just use
02:00your calculator. It's actually a
02:02really, really, really complicated function
02:05because that the normal distribution
02:08function, the probability density function,
02:13or PDF for short, is
02:14a really, really horrible function.
02:16Luckily, we don't have to
02:17integrate it. But the way
02:19we'd normally find
02:20areas is by integrating. And
02:23that's why we have the
02:24probability that x, x being
02:27your continuous run variable is
02:29between a and b is
02:31the integral of f of
02:33x. That's your function. So,
02:35imagine this curve is your
02:36f of x. This is
02:37your y was f of
02:38x. It's the integral of
02:40f of x from a
02:41to b. Now, if you
02:43studied integration, which if you
02:46haven't stopped this lesson immediately,
02:47go back and
02:48to study that first. But
02:50once you've studied integration, this
02:53makes sense because that's what
02:54area is. It's the integral
02:57between a, the integral of
03:02the curve. So this is,
03:04let's say this curve is
03:05y equals f of x.
03:07It's the integral of this
03:09curve from a to b
03:11that gives me this area
03:12and that is the probability.
03:16Now what's
03:16It's this second curve here
03:17why I've drawn this. Well,
03:20normal distribution, fine, but not
03:22all distributions are normal. And
03:25what we're going to look
03:26at is probability density functions
03:30that are not normal at
03:31all. We're going to be
03:33looking at functions that you're
03:34familiar with and we're going
03:36to be using integration to
03:37find these probabilities. So that's
03:39what that first formula here
03:41is. It's the probability
03:44is the integral and the
03:46reason for that is because
03:48the probability is the integral.
03:51Sorry, the probability is the
03:53area and the area is
03:54the integral and this here,
03:58this is also your y
03:59-axis here is probability, probability
04:03density. It is not, it
04:07is not the probability and
04:10that's why you may
04:12If you're saying the past
04:13never use, never try to
04:16find normal PDF because all
04:18you're going to be getting
04:19is this probability density value
04:23that doesn't make a whole
04:24lot of, but doesn't have
04:26a whole lot of meaning.
04:27If you're trying to find
04:28a probability, it's the area
04:29that has the meaning. That's
04:30the, that is the probability
04:32that you're looking for. It's
04:34also the reason that you
04:35might hear, you might have
04:36heard me say, for a
04:40continuous,
04:40variable, the probability of any,
04:44the probability of any value,
04:47the probability that x, I
04:49should maybe write this in
04:51red as well, for a
04:55continuous random variable, the probability
04:57that x equals zero, sorry,
05:00the probability that x equals
05:02anything, so any value, I'm
05:06going to write the probability
05:08that x equals
05:08any value equals zero. You
05:14cannot, the probability that someone
05:16is 180 centimeters tall is
05:18zero. It cannot happen because
05:21remember some of these are
05:22tiny little bit more than
05:24180 or tiny little bit
05:25less. No one is exactly
05:27180. And that's why we're
05:29only interested in a range
05:30of values. We're interested in
05:33greater than 180 or between
05:35150 and 180 or less
05:36than 180.
05:36and 100 or whatever it
05:38is, are between A and
05:40B, hence we have the
05:42integral. The second one that
05:45I had written down here
05:46at the start is that
05:48the integral of f of
05:51x, the area under the
05:52curve from negative infinity to
05:54infinity equals 1. And again,
05:58if you remember your normal
05:59distribution, that makes sense, because
06:02the probability, the total
06:04The global probability is 1.
06:07Now you're rarely going to
06:08see negative infinity to infinity
06:10because I mean most real
06:15life examples won't go on
06:17to negative infinity to infinity
06:18but just be aware this
06:21well a normal distribution technically
06:24in theory can go on
06:27to negative infinity and positive
06:28infinity even though obviously height
06:31can't be negative.
06:33Okay, so that that's kind
06:35of my introduction. I'll do
06:36one example To kind of
06:39explain what the whole thing
06:41is put to kind of
06:42one last summary of what
06:44I just said there the
06:46area under the curve gives
06:48you the probability and Defying
06:52the area under the curve.
06:53We integrate. That's it Okay
06:56example one. Let's do it.
06:58I think I'm only doing
06:59one example so example
07:01A continuous random variable has
07:03the probability density function, pdf,
07:06of this, f of x
07:08equals this. So it's kx
07:10squared for x is between
07:12zero and three. And it's
07:16zero otherwise. Now, get familiar
07:20with piecewise functions. I mean,
07:23I've seen exam questions with
07:24like five pieces in the
07:25functions of five different things
07:27at,
07:29but in five different domains,
07:31all the same function. So,
07:34get used to this. Now
07:35this is, luckily there's only
07:37one that actually seems to
07:39matter because it's zero, otherwise.
07:41So really, the whole thing
07:42is happening between zero and
07:44three. Now if you can
07:47draw this, you might as
07:48well draw it, see what's
07:50actually happening. So here we
07:52have our, this is our
07:54probability density. Let's just call
07:56it y for now.
07:57And this is our x
07:58value, whatever this random variable
08:00is. This is a quadratic.
08:03It's a k quadratic, so
08:09because it's probably, that k
08:12has to be positive. So
08:14what's actually going to happen
08:15is it's something like this.
08:19Now I don't know. Let
08:22me just remove that. I
08:23don't know exactly what's going
08:25happening here yet but let's
08:26say there's one two three
08:30so let's say this is
08:33this here is three and
08:38this function let me just
08:40change that color so the
08:46the blue curve this is
08:52my y
08:53equals f of x. This
08:57is my probability density function.
09:00So if I find the
09:00area underneath this, I can
09:03get any probability that I
09:05want. The first question that
09:06says find the value of
09:07k. Now, I'm not sure
09:09what the value of k
09:09is, but we can figure
09:11it out. Because it's between
09:18zero and three. So this
09:19is zero, and this is
09:21three.
09:21It's zero otherwise, which means
09:23there's no other There's no
09:26other function. It has to
09:27be the variable has to
09:29be between zero and three.
09:31There's nothing over here and
09:32there's nothing over here. Which
09:34tells me that this total
09:36area, well, here's a question
09:38for you, what does this
09:39total area have to be?
09:42Well, the answer is one,
09:45because the total area, it
09:47has to be between zero
09:49and three,
09:49probability that it's between zero
09:50and three is one, because
09:52it's guaranteed, has to be
09:53that. So I can say
09:55that the integral of Kx
09:59squared, which is my f
10:00of x, between zero and
10:04three dx, the integral of
10:06this dx has to equal
10:08one. Now, let's just do
10:11this, so it's, this is
10:14Kx cubed
10:17Okay, x cubed over three
10:20between three and zero equals
10:25one. I am going to
10:28sub in my three, so
10:29this is going to be
10:30k times three cubed over
10:34three minus zero, because when
10:36I sub in the zero
10:37it just becomes zero, equals
10:39one. Divide here, whatever, that's
10:4327 k over three.
10:45which is, what's 27 divided
10:48by three is nine. So
10:49nine k equals one k
10:53equals one over nine. So
10:57that's part a done. k
10:59is equal to one over
11:01nine. So part b. Now
11:05I have k, it's just
11:06find the probability that x
11:07is between one and two.
11:09So this goes back to
11:10that first rule that I
11:11was talking about. The probability
11:12that x
11:13is between 1 and 2
11:15is the area, let's shade
11:18it, is the area between
11:191 and 2. This is
11:25the area that I'm trying
11:26to find. This will give
11:27me the probability that this
11:29thing is between 1 and
11:292. So it's the integral
11:311 and 2. I now
11:33know that's a 9th. So
11:35this is a 9th x
11:40squared.
11:41dx and this equals That
11:48is going to be a
11:49ninth x x 9th x
11:54cubed over three from two
11:58to one which is actually
12:00equal to That's x cubed
12:04over 27 so I'm going
12:06to go to cubed over
12:0827 to
12:09cubed over 27. Subbing in
12:14my two, two cubed over
12:1527. Minus one cubed over
12:1827, which is actually equal
12:21to eight over 27 minus
12:24one over 27, which is
12:25seven over 27. So this
12:29is the probability that x
12:33is between one and two.
12:36Okay, that's
12:37a fairly straightforward example. I
12:42wanted it to be a
12:42fairly straightforward example because this
12:44is kind of my introduction
12:46to to continuous random variables.
12:49This is how we find
12:52the probability we find the
12:53area. Yes, this is I
12:55put this question in there
12:56to find K because look,
12:57you often see that type
12:59of question. But essentially that
13:04is
13:06your introduction to continuous random
13:09variables. In the next lesson,
13:11we're going to look at
13:12how to find the expected
13:14value, how to find the
13:15variance. Obviously, if this is
13:19a paper too, when you
13:19have your calculator, you can
13:21go, well, look, this one,
13:22yeah, you won't be able
13:24to use your calculator from
13:26here straight away. But this
13:28one you would, if he
13:29says, if you get a
13:32probability density function of
13:34a 9th x squared and
13:36it says find the probability
13:37that x is between 1
13:38and 2. You write that
13:41down and you literally sub
13:42-in the calculator, press enter
13:43and you get your answer.
13:45Okay, see you guys in
13:45the next lesson.