Expectation of a function of a continuous random variable

In summary, when solving for FY(y), the function fX(x) needs to be taken into account. Furthermore, when solving for FY(y), the function fY(y) is reliant on FY(y). Finally, when solving for E[Y], the CDF and PDF of Y are incorrect.
  • #1
whitejac
169
0

Homework Statement


X ~ Uniform (0,1)
Y = e-X
Find FY (y) - or the CDF
Find fY(y) - or the PDF
Find E[Y]


2. Homework Equations

E[Y] = E[e-X] = ∫0 , 1 e-xfx(x)dx
FY(y) = P(Y < y)
fY(y) = F'Y(y)

The Attempt at a Solution


FX(x) =
{
0 for x<0
x for 0<x<1
1 for 1<x
}

fX(x) =
{
1 for 0<x<1
0 otherwise
}

Then use this information to solve:

FY(y) = P(Y < y) = P(e-X < y) = P(X < -lny)
^This is a negative function which violates one of the axioms of our continuous random variables (fX(x) ≥ 0)

fY(y) is reliant on FY(y)

E[Y] = E[e-X]
= ∫0 , 1 e^-xfx(x)dx
= -e-x | 0 , 1
= 1 - 1/e

I know this answer is corrrect, which means that my CDF and PDF of Y are incorrect because using those will give me the negativ of this answer. So I'm a little bit stumped, or misinterpretting how to continue the CDF equation.
 
Physics news on Phys.org
  • #2
whitejac said:

Homework Statement


X ~ Uniform (0,1)
Y = e-X
Find FY (y) - or the CDF
Find fY(y) - or the PDF
Find E[Y]


2. Homework Equations

E[Y] = E[e-X] = ∫0 , 1 e-xfx(x)dx
FY(y) = P(Y < y)
fY(y) = F'Y(y)

The Attempt at a Solution


FX(x) =
{
0 for x<0
x for 0<x<1
1 for 1<x
}

fX(x) =
{
1 for 0<x<1
0 otherwise
}

Then use this information to solve:

FY(y) = P(Y < y) = P(e-X < y) = P(X < -lny)
^This is a negative function which violates one of the axioms of our continuous random variables (fX(x) ≥ 0)

fY(y) is reliant on FY(y)

E[Y] = E[e-X]
= ∫0 , 1 e^-xfx(x)dx
= -e-x | 0 , 1
= 1 - 1/e

I know this answer is corrrect, which means that my CDF and PDF of Y are incorrect because using those will give me the negativ of this answer. So I'm a little bit stumped, or misinterpretting how to continue the CDF equation.

When you say "^This is a negative function ... " you are off base: there is nothing negative about ##P(X < - \ln y)##. Probabilities must always be >= 0, but X-values are certainly allowed to be negative. But in this case, not even that happens: we can have ##\ln y < 0##, which would make ##- \ln y > 0##. For what values of ##y## will that occur? Those would be the allowable values of ##y## in this example, since the non-zero-probability values of ##x## lie between 0 and 1.
 
  • #3
It looks like you have done just about everything correctly.
As Ray pointed out, there is nothing wrong with your function.
If ##y = e^{-x}##, what is the probability, P(Y < y)? It should be similar to the probability P(X>x), or 1-P(X<x).
 
  • #4
Oh, I see...
The Range of Y is found by plugging the Range of X into the function of Y -> So, 0 gives 1 and 1 gives 1/e, if I'm not mistaken.
Plugging in my new end points to the (-lny) in fact returns me to the Range of X, [0,1]. Is this one of the properties of transforming functions? I'm asking to see if it's a reliable way to check my work.

However, then, my continuation of the problem seems confusing.
if
FY(y) = -lny
then
fY(y) = d/dy FY(y) = -1/y
=>
E[Y] = ∫(1/e , 1)y*fY(y)dy = -y|(1/e , 1) = 1/e -1

which is backwards to my original answer. Should I switch my limits of integration around?
I figured RangeY was defined as [1/e, 1]. This would be smallest to greatest, however when you plug those into the equation, -lny, they would yield the opposite (1 to 0).
 
  • #5
whitejac said:
Oh, I see...
The Range of Y is found by plugging the Range of X into the function of Y -> So, 0 gives 1 and 1 gives 1/e, if I'm not mistaken.
Plugging in my new end points to the (-lny) in fact returns me to the Range of X, [0,1]. Is this one of the properties of transforming functions? I'm asking to see if it's a reliable way to check my work.

However, then, my continuation of the problem seems confusing.
if
FY(y) = -lny
then
fY(y) = d/dy FY(y) = -1/y
=>
E[Y] = ∫(1/e , 1)y*fY(y)dy = -y|(1/e , 1) = 1/e -1

which is backwards to my original answer. Should I switch my limits of integration around?
I figured RangeY was defined as [1/e, 1]. This would be smallest to greatest, however when you plug those into the equation, -lny, they would yield the opposite (1 to 0).

I always recommend drawing a graph of X vs Y whenever possible. In this case, doing that will show very clearly that ##P(Y \leq y) = P(X \geq - \ln y)##, NOT the ##P(X \leq - \ln y)## that you wrote. Your ##f_Y(y) = -1/y## is ##< 0##, so does, indeed, violate basic probability notions. That should have been a red flag that indicated to you that something was wrong.
 
  • #6
So, if i understand what you're saying, then...
We must convert ourr CDF in a sensible way:
FY(y) = P(Y<y) = P(e-X<y) = P(X > lny)
Or
FY(y) =
{
0 for y > 1
-lny for 1/e < y < 1
1 for y < 1/e
}

This is what I found to be the proper values after graphing it and entering in values for the range.
The graph of a uniform function are essentially y=x for [0,1]
The graph of y=e-x are a downward curve.
The graph of -lny is also a downward slope, but rotated it seems.

What I do not understand is the X > -lny... In my mind, from viewng the numbers, it has to be this way because as you start plugging in points (particularly the end points and a few in the middle) it appears to move in the opposite direction so you must take it from the opposite direction. However, I do not understand how this helps me find the pdf because I'd still have d/dx (FY(y)) = -1/y
Maybe that's an algebraic stupidity because if it's X>-lny then the integral would be taking it from (b -> a) instead of (a -> b)..?
 
  • #7
whitejac said:
However, I do not understand how this helps me find the pdf because I'd still have d/dx (FY(y)) = -1/y
Maybe that's an algebraic stupidity because if it's X>-lny then the integral would be taking it from (b -> a) instead of (a -> b)..?
What is the appropriate form for the CDF of y, such that when y is at its minimum F(y) = 0 and when it is at its maximum F(y) =1?
You know that y is functionally related to x by some form of ##y = e^{-x}##, right?
So you want your CDF to have the property that F(1) = 1 and F(1/e) = 0. What you have above is the opposite. F(1) = 0 and F(1/e) = 1. Can you think of any way to remedy that?
 
  • #8
whitejac said:
So, if i understand what you're saying, then...
We must convert ourr CDF in a sensible way:
FY(y) = P(Y<y) = P(e-X<y) = P(X > lny)
Or
FY(y) =
{
0 for y > 1
-lny for 1/e < y < 1
1 for y < 1/e
}

This is what I found to be the proper values after graphing it and entering in values for the range.
The graph of a uniform function are essentially y=x for [0,1]
The graph of y=e-x are a downward curve.
The graph of -lny is also a downward slope, but rotated it seems.

What I do not understand is the X > -lny... In my mind, from viewng the numbers, it has to be this way because as you start plugging in points (particularly the end points and a few in the middle) it appears to move in the opposite direction so you must take it from the opposite direction. However, I do not understand how this helps me find the pdf because I'd still have d/dx (FY(y)) = -1/y
Maybe that's an algebraic stupidity because if it's X>-lny then the integral would be taking it from (b -> a) instead of (a -> b)..?

If you really did plot ##Y = e^{-X}## over ##0 \leq X \leq 1## you would see that smaller ##Y## corresponds to larger ##X##, so ##\{ Y \leq y \}## corresponds to ##\{ X \geq x_y\}## for some value of ##x = x_y##. The value of ##x_y## is the solution of the equation ##e^{-x} = y##. Can you write ##x_y## in a simple formula involving ##y##?

Note that your ##F_Y(y) = - \ln y ## is still wrong: it gives ##f_Y(y) = dF_Y(y)/dy = - 1/y < 0## again! Go back to square 1, and proceed slowly and carefully.
 
  • #9
Ray Vickson said:
If you really did plot Y=e−XY = e^{-X} over 0≤X≤10 \leq X \leq 1 you would see that smaller YY corresponds to larger X

I really did plot Y = e -x.
Y = e-x = 1, 0.9, 0.82, 0.75... 0.55, 0.45, 0.36
for x = 0, 0.1, 0.2,... 0.8, 0.9, 1
this is a decreasing function bounded by [1, 1/e]. X = x which is just a linear function and the two intersect at a point roughly 0.6.

Ray Vickson said:
{Y≤y}\{ Y \leq y \} corresponds to {X≥xy}\{ X \geq x_y\} for some value of x=xyx = x_y. The value of xyx_y is the solution of the equation e−x=ye^{-x} = y. Can you write xyx_y in a simple formula involving yy?

If xy = x and e-x = y,
then
-x = lny
x = -ln y
x = xy = -lny
and {X > -lny}

I'm not trying to be difficult or lazy, it just really seems like you're asking me to do the same thing over and over... :frown:

Ray Vickson said:
Go back to square 1, and proceed slowly and carefully.
Okay. I know that the function is uniform probability over the range [0,1].
Y is a function of X = x for x = [0,1] in the form of Y = e-X.
We are asked to represent the same data in the form of the CDF of Y.
First step is to find the range of Y. I've done this by substituting the limits of X into the function of Y. -> RY = {1/e , 1}.
As stated above, plotting the two functions gives a linear graph y = x and a graph y = e-x.
One rises and one descends. Note that Y is high where X is low and vice versa.
Originlly I assumed that getting {X > y} would allow me to say FX(-lny) = -lny... however, from the responses, this appears to be where my illegality starts and I don't think I completely understand why other than the fact that its derrivative proves it to be incorrect. Taking the absolute value could solve that, but I can't justify it.
 
  • #10
RUber said:
So you want your CDF to have the property that F(1) = 1 and F(1/e) = 0. What you have above is the opposite. F(1) = 0 and F(1/e) = 1. Can you think of any way to remedy that?
Like i said to Ray, I could take the absolute value since it is strictly decreasing, but that's the only justification I really have for doing that. I can't see any other way, however, to achieve the same values in reverse by manipulating the function itself.

RUber said:
What is the appropriate form for the CDF of y, such that when y is at its minimum F(y) = 0 and when it is at its maximum F(y)=1
The appropriate form would be:
FY(y) {
0 for values less than RY
P(Y < y) for y∈RY
1 for values greater than RY }

Now, going back to P(y1 < Y < y2) = FY(y2) - FY(y1) in my section about CDF's and their general form, gives me a little bit more interest in taking the absolute value when the function is decreasing because clearly a decreasing function could never be probable then and that doesn't make sense at all.
 
  • #11
Don't think of y as a function of x, think of F(y) as a CDF. And a CDF must, by definition be an increasing function.
P(y<Y) = P(x>-ln(Y) = P(x > X) = 1-Fx(X).
** Fx(X) is P(x<X), so P(x>X) must be 1-Fx(X). **
Your attempt was Fy(Y) = -ln(y) ... but this is incorrect. You can see this clearly because at your minimum value for y at 1/e, your CDF is equal to 1 and at your maximum value for y at 1, your CDF is equal to zero.
If you have a function that is goes from 1 to 0, and you want it to go from 0 to 1, subtracting from 1 is a good method. And logically if fits the treatment you would give for P(x>X)...does that make sense?
 
  • #12
Oh...oh! I was thinking of it just in terms of graphs, for some reason.

Yes, I think I can see this. However, to what extent do two cdf's relate to each other then?
I mean, was this idea incorrect thinking: {Y>y}, {e^-X>y}... =-lny incorrect thinking? Because to that extent, I really do see them as two functions of x.

Also, wouldn't taking 1-FY(y) would give me compliment or does that not apply when it's not just a partition. The way I see it now is that if the graph is summed to 1 and read left to right but the numbers ought to be read right to left then 1-FY(y) makes the most sense because you are reading it backwards.
 
  • #13
whitejac said:
I really did plot Y = e -x.
Y = e-x = 1, 0.9, 0.82, 0.75... 0.55, 0.45, 0.36
for x = 0, 0.1, 0.2,... 0.8, 0.9, 1
this is a decreasing function bounded by [1, 1/e].X = x which is just a linear function and the two intersect at a point roughly 0.6.
If xy = x and e-x = y,
then
-x = lny
x = -ln y
x = xy = -lny
and {X > -lny}

I'm not trying to be difficult or lazy, it just really seems like you're asking me to do the same thing over and over... :frown:Okay. I know that the function is uniform probability over the range [0,1].
Y is a function of X = x for x = [0,1] in the form of Y = e-X.
We are asked to represent the same data in the form of the CDF of Y.
First step is to find the range of Y. I've done this by substituting the limits of X into the function of Y. -> RY = {1/e , 1}.
As stated above, plotting the two functions gives a linear graph y = x and a graph y = e-x.
One rises and one descends. Note that Y is high where X is low and vice versa.
Originlly I assumed that getting {X > y} would allow me to say FX(-lny) = -lny... however, from the responses, this appears to be where my illegality starts and I don't think I completely understand why other than the fact that its derrivative proves it to be incorrect. Taking the absolute value could solve that, but I can't justify it.

No, I am not asking you to do the same thing over and over; I am not asking you to keep repeating the same (or similar) mistakes. I am asking you to do it once, correctly. There is no need (and no justification) to resort to tricks like taking absolute values; just using correct formulas correctly will do the job.
 
Last edited:
  • #14
whitejac said:
I mean, was this idea incorrect thinking: {Y>y}, {e^-X>y}... =-lny incorrect thinking? Because to that extent, I really do see them as two functions of x.

Also, wouldn't taking 1-FY(y) would give me the compliment?
Remember that inequalities flip when you change the signs.

P(y<Y)= P(y < e^-X) = P(ln y < -X) = P(- ln y > X ) = 1 - P ( -ln y < X ) = *** EDIT *** 1-(- ln y)
 
Last edited:
  • #15
Right right, I think that's what I was trying to say when I edited my post, but you may have not gotten it in time or I didn't finish the thought out. I remembered the sign flipped, after some help from both of you, but I didn't make the connection ahead of time that that would be equivalent of saying 1-(the original sum of probabilities). I'm still not used to seeing these as cumulative graphs instead of fractions or sets like the previous chapters. My professor warned us at the beginning f the semester about this.
 
  • #16
This brings me to another question about your method - the pdf would also have to be 1-fY(y), yes? If not, we'd still have the -1/y problem. It it sounds like a catch-22 to me.
 
  • #17
whitejac said:
This brings me to another question about your method - the pdf would also have to be 1-fY(y), yes? If not, we'd still have the -1/y problem. It it sounds like a catch-22 to me.
Sorry--just edited post 14. That problem is solved.
 
  • Like
Likes whitejac
  • #18
RUber said:
Remember that inequalities flip when you change the signs.

P(y<Y)= P(y < e^-X) = P(ln y < -X) = P(- ln y > X ) = 1 - P ( -ln y < X ) = *** EDIT *** 1-(- ln y)

This still looks wonky to me: it is as though you are getting the correct answer for incorrect reasons. However, since you have now more-or-less "gotten" it, I feel I can now give the details of the solution, presented now for the sake of gathering together various strands and cleaning up the argument.

For ## 0 \leq X \leq 1##, the random variable ##Y = e^{-X}## ranges over ##1/e \leq Y \leq 1##, and for ##y## in that range we have
[tex] \begin{array}{l} F_Y(y) = P(Y \leq y) = P(e^{-X} \leq y ) = P(X \geq - \ln y)\\
= 1 - (- \ln y) = 1+ \ln y. \end{array} [/tex]
Here we have used the fact that for ##X \sim U(0,1)## we have ##P(X \geq t) = 1 - t## for ##t = - \ln y \in [0,1]##.

Note that as ##y## increases from ##1/e## to 1, ##F_Y(y) = 1 + \ln y## increases from 0 to 1, just as it should for a cdf. The pdf of ##Y## is
[tex] f_Y(y) = \frac{d}{dy} F_Y(y) = \frac{1}{y}, \; 1/e \leq y \leq 1 [/tex]
 

Related to Expectation of a function of a continuous random variable

1. What is the definition of expectation for a function of a continuous random variable?

The expectation of a function of a continuous random variable is a measure of the central tendency or average value of the function. It is calculated by taking the integral of the function multiplied by the probability density function of the random variable over its entire range.

2. How is the expectation of a function of a continuous random variable different from the expectation of a continuous random variable?

The expectation of a function of a continuous random variable is a function itself, while the expectation of a continuous random variable is a single numerical value. In other words, the expectation of a function represents the average value of the function, while the expectation of a continuous random variable represents the average value of the random variable.

3. Can the expectation of a function of a continuous random variable be negative?

Yes, the expectation of a function of a continuous random variable can be negative. This means that the function has values that are both positive and negative, and the average value of the function is negative.

4. How is the expectation of a function of a continuous random variable calculated?

The expectation of a function of a continuous random variable is calculated by taking the integral of the function multiplied by the probability density function of the random variable over its entire range. In other words, it is a weighted average of the values of the function, with the weights being the probabilities of each value occurring.

5. What is the relationship between the expectation of a function of a continuous random variable and the expectation of a linear transformation of the random variable?

The expectation of a function of a continuous random variable and the expectation of a linear transformation of the random variable are related by the linearity property. This means that the expectation of a linear transformation of a random variable can be calculated by multiplying the transformation by the expectation of the original random variable. In other words, the expectation of a linear transformation is a linear function of the expectation of the original random variable.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
2
Views
982
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
845
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
554
  • Precalculus Mathematics Homework Help
Replies
3
Views
2K
  • Precalculus Mathematics Homework Help
Replies
5
Views
1K
  • Computing and Technology
Replies
9
Views
567
  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
  • Math POTW for Graduate Students
Replies
4
Views
550
  • Precalculus Mathematics Homework Help
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
4K
Back
Top