Hey guys, in this video I'm going to do this statistics and probability problem. It says
suppose that Y has pdf the following and then it gives me a function that's defined from 0 to 1
as ky times 1 minus y and 0 elsewhere. Then it says find the value of k that makes f(y) a probability
density function. So we're given a function and we want to determine what constant k will make
this function f(y) a pdf. To be defined as a probability density function, there have to be two
conditions that are met. For a function to be a pdf f(y) has to be greater than or equal to 0
for all y. So y defined from negative infinity to infinity has to be positive, so greater than
or equal to zero. That's the first condition. And then the second condition is that from negative
infinity to infinity f(y) dy has to be equal to one. So if you integrate over the entire function,
that area under the curve of your function has to be equal to one. Let's go ahead and check these
two assumptions for this function and determine which value of k will meet these two conditions.
For the first condition where the entire function has to be positive over all the range
of y, if we plot the original function it's going to be zero everywhere except for from zero to one
and then from zero to one if we ignore k for a moment and we just plot y times one minus y
that's basically going to give us a function that looks something like this. From zero to one the
function is going to be positive, everywhere else it's just going to be zero, and basically you
have a half circle that is reaching a peak at one quarter. Any positive value of k is just going
to have a function that is positive everywhere from 0 to 1. As long as k the constant that
we're multiplying this part by is positive then the function will be positive everywhere from
the entire range of y. From negative infinity to infinity it will always be positive as long
as k is greater than or equal to zero. So our first condition for now is met. Then we actually want
to find it the exact value of k and we're going to use the second definition of a pdf to determine
the exact value of k. We're going to integrate from negative infinity to infinity f(y) dy, set
that equal to one, and then the only unknown will be the value of k and that's how we're going to
solve for the value of k. For this function we only have to integrate from zero to one because
everywhere else the function is going to be zero. If you just integrate over zero you're
still going to get zero. If we do the integral from negative infinity to infinity of f(y)
dy, that's going to be equal to the integral from zero to one of k times y times 1 minus y
dy and we're going to set that equal to 1. I'm going to distribute the y and the k to the 1 minus y.
That's going to give us the integral from 0 to 1 of ky minus ky squared dy equal to 1. If we
integrate this, that's going to give us ky squared over 2 minus ky to the third power divided by 3
and we're going to set that from zero to one is equal to one. So the integral of ky is ky squared
over two minus the integral of ky squared is going to be ky cubed over three. We're going to solve for
that from zero to one. So if we plug in 1 that's going to give us k over 2 minus k over 3 minus and
then when we plug in a 0 that's just going to be 0 minus 0. So we're going to have k over 2 minus k
over three is equal to one. K over two minus k over three is equal to k over six is equal to one and
then when we solve a for k, that's going to give us that k is equal to six. Six is greater than
zero, so our first condition is going to be met where we're going to have f(y) is greater than
or equal to zero over the entire existence of y. And our second condition is going to be met when k
is exactly equal to six because that will give us that the integral over the entire range of the
function is equal to one. Our final answer is k is equal to six and we are done with this problem.
*chiptune music*