Expectation of a continuous random variable

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am looking at a math problem that is asking me to determine $mathbbE[e^X]$ given that $X$ is a random variable, and the probability density function of $X$ is given by



$$ f(x) =begincases
1 & 0 leq x leq 1 \
0 & textotherwise.
endcases
$$



The solution from the answer key is below:



Let $Y = e^X.$ Then we wish to determine $mathbbE[Y]$. But first, we need to find the probability density function $f_y$ of $Y$. To do that, we begin with the probability cumulative distribution function $F_Y$ of $Y$:



$$
beginalign
F_Y = PY leq x \
= Pe^X leq x \
= PX leq log(x) \
= int_0^log(x) f(y) mathopdy \
= log(x).
endalign
$$



Differentiating, we obtain $f_Y = dfrac1x$. Then we have $$mathbbE[e^X] = mathbbE[Y] = int_-infty^infty xf_Y(x) mathopdx $$



$$= e - 1.$$



My question:



I don't understand why the integrand is $f(y)$ and not $f(x)$ when we're determining $F_Y$. I thought $PX leq log(x) = int_-infty^log(x) f_X(x)$, where $f_X$ is the probability density function of $X$.







share|cite|improve this question















  • 1




    Limit of the integral depends on $x$, so it is better to use $y$ as a dummy variable instead of $x$ itself to avoid confusion. And when one writes $f(y)$, it means the exact same pdf of $X$ as defined in the beginning.
    – StubbornAtom
    yesterday






  • 1




    Instead of finding the density of $Y$, it is simpler to say $E(e^X)=int_0^1 e^x f(x),dx$ using the Law of the unconscious statistician.
    – StubbornAtom
    yesterday










  • Your explanation makes sense. I did not know about that law. It looks much faster that way. Thank you!
    – Hat
    yesterday






  • 1




    @StubbornAtom: I have never heard that theorem given a name. About as good as any, I guess!
    – Brian Tung
    yesterday














up vote
1
down vote

favorite












I am looking at a math problem that is asking me to determine $mathbbE[e^X]$ given that $X$ is a random variable, and the probability density function of $X$ is given by



$$ f(x) =begincases
1 & 0 leq x leq 1 \
0 & textotherwise.
endcases
$$



The solution from the answer key is below:



Let $Y = e^X.$ Then we wish to determine $mathbbE[Y]$. But first, we need to find the probability density function $f_y$ of $Y$. To do that, we begin with the probability cumulative distribution function $F_Y$ of $Y$:



$$
beginalign
F_Y = PY leq x \
= Pe^X leq x \
= PX leq log(x) \
= int_0^log(x) f(y) mathopdy \
= log(x).
endalign
$$



Differentiating, we obtain $f_Y = dfrac1x$. Then we have $$mathbbE[e^X] = mathbbE[Y] = int_-infty^infty xf_Y(x) mathopdx $$



$$= e - 1.$$



My question:



I don't understand why the integrand is $f(y)$ and not $f(x)$ when we're determining $F_Y$. I thought $PX leq log(x) = int_-infty^log(x) f_X(x)$, where $f_X$ is the probability density function of $X$.







share|cite|improve this question















  • 1




    Limit of the integral depends on $x$, so it is better to use $y$ as a dummy variable instead of $x$ itself to avoid confusion. And when one writes $f(y)$, it means the exact same pdf of $X$ as defined in the beginning.
    – StubbornAtom
    yesterday






  • 1




    Instead of finding the density of $Y$, it is simpler to say $E(e^X)=int_0^1 e^x f(x),dx$ using the Law of the unconscious statistician.
    – StubbornAtom
    yesterday










  • Your explanation makes sense. I did not know about that law. It looks much faster that way. Thank you!
    – Hat
    yesterday






  • 1




    @StubbornAtom: I have never heard that theorem given a name. About as good as any, I guess!
    – Brian Tung
    yesterday












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am looking at a math problem that is asking me to determine $mathbbE[e^X]$ given that $X$ is a random variable, and the probability density function of $X$ is given by



$$ f(x) =begincases
1 & 0 leq x leq 1 \
0 & textotherwise.
endcases
$$



The solution from the answer key is below:



Let $Y = e^X.$ Then we wish to determine $mathbbE[Y]$. But first, we need to find the probability density function $f_y$ of $Y$. To do that, we begin with the probability cumulative distribution function $F_Y$ of $Y$:



$$
beginalign
F_Y = PY leq x \
= Pe^X leq x \
= PX leq log(x) \
= int_0^log(x) f(y) mathopdy \
= log(x).
endalign
$$



Differentiating, we obtain $f_Y = dfrac1x$. Then we have $$mathbbE[e^X] = mathbbE[Y] = int_-infty^infty xf_Y(x) mathopdx $$



$$= e - 1.$$



My question:



I don't understand why the integrand is $f(y)$ and not $f(x)$ when we're determining $F_Y$. I thought $PX leq log(x) = int_-infty^log(x) f_X(x)$, where $f_X$ is the probability density function of $X$.







share|cite|improve this question











I am looking at a math problem that is asking me to determine $mathbbE[e^X]$ given that $X$ is a random variable, and the probability density function of $X$ is given by



$$ f(x) =begincases
1 & 0 leq x leq 1 \
0 & textotherwise.
endcases
$$



The solution from the answer key is below:



Let $Y = e^X.$ Then we wish to determine $mathbbE[Y]$. But first, we need to find the probability density function $f_y$ of $Y$. To do that, we begin with the probability cumulative distribution function $F_Y$ of $Y$:



$$
beginalign
F_Y = PY leq x \
= Pe^X leq x \
= PX leq log(x) \
= int_0^log(x) f(y) mathopdy \
= log(x).
endalign
$$



Differentiating, we obtain $f_Y = dfrac1x$. Then we have $$mathbbE[e^X] = mathbbE[Y] = int_-infty^infty xf_Y(x) mathopdx $$



$$= e - 1.$$



My question:



I don't understand why the integrand is $f(y)$ and not $f(x)$ when we're determining $F_Y$. I thought $PX leq log(x) = int_-infty^log(x) f_X(x)$, where $f_X$ is the probability density function of $X$.









share|cite|improve this question










share|cite|improve this question




share|cite|improve this question









asked yesterday









Hat

745115




745115







  • 1




    Limit of the integral depends on $x$, so it is better to use $y$ as a dummy variable instead of $x$ itself to avoid confusion. And when one writes $f(y)$, it means the exact same pdf of $X$ as defined in the beginning.
    – StubbornAtom
    yesterday






  • 1




    Instead of finding the density of $Y$, it is simpler to say $E(e^X)=int_0^1 e^x f(x),dx$ using the Law of the unconscious statistician.
    – StubbornAtom
    yesterday










  • Your explanation makes sense. I did not know about that law. It looks much faster that way. Thank you!
    – Hat
    yesterday






  • 1




    @StubbornAtom: I have never heard that theorem given a name. About as good as any, I guess!
    – Brian Tung
    yesterday












  • 1




    Limit of the integral depends on $x$, so it is better to use $y$ as a dummy variable instead of $x$ itself to avoid confusion. And when one writes $f(y)$, it means the exact same pdf of $X$ as defined in the beginning.
    – StubbornAtom
    yesterday






  • 1




    Instead of finding the density of $Y$, it is simpler to say $E(e^X)=int_0^1 e^x f(x),dx$ using the Law of the unconscious statistician.
    – StubbornAtom
    yesterday










  • Your explanation makes sense. I did not know about that law. It looks much faster that way. Thank you!
    – Hat
    yesterday






  • 1




    @StubbornAtom: I have never heard that theorem given a name. About as good as any, I guess!
    – Brian Tung
    yesterday







1




1




Limit of the integral depends on $x$, so it is better to use $y$ as a dummy variable instead of $x$ itself to avoid confusion. And when one writes $f(y)$, it means the exact same pdf of $X$ as defined in the beginning.
– StubbornAtom
yesterday




Limit of the integral depends on $x$, so it is better to use $y$ as a dummy variable instead of $x$ itself to avoid confusion. And when one writes $f(y)$, it means the exact same pdf of $X$ as defined in the beginning.
– StubbornAtom
yesterday




1




1




Instead of finding the density of $Y$, it is simpler to say $E(e^X)=int_0^1 e^x f(x),dx$ using the Law of the unconscious statistician.
– StubbornAtom
yesterday




Instead of finding the density of $Y$, it is simpler to say $E(e^X)=int_0^1 e^x f(x),dx$ using the Law of the unconscious statistician.
– StubbornAtom
yesterday












Your explanation makes sense. I did not know about that law. It looks much faster that way. Thank you!
– Hat
yesterday




Your explanation makes sense. I did not know about that law. It looks much faster that way. Thank you!
– Hat
yesterday




1




1




@StubbornAtom: I have never heard that theorem given a name. About as good as any, I guess!
– Brian Tung
yesterday




@StubbornAtom: I have never heard that theorem given a name. About as good as any, I guess!
– Brian Tung
yesterday










1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










The solution is confusing you by using $y$ for two different things. In the integral, $y$ is just a dummy variable. They could just as easily have used $t$ instead of $y$.






share|cite|improve this answer





















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2872404%2fexpectation-of-a-continuous-random-variable%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote



    accepted










    The solution is confusing you by using $y$ for two different things. In the integral, $y$ is just a dummy variable. They could just as easily have used $t$ instead of $y$.






    share|cite|improve this answer

























      up vote
      3
      down vote



      accepted










      The solution is confusing you by using $y$ for two different things. In the integral, $y$ is just a dummy variable. They could just as easily have used $t$ instead of $y$.






      share|cite|improve this answer























        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        The solution is confusing you by using $y$ for two different things. In the integral, $y$ is just a dummy variable. They could just as easily have used $t$ instead of $y$.






        share|cite|improve this answer













        The solution is confusing you by using $y$ for two different things. In the integral, $y$ is just a dummy variable. They could just as easily have used $t$ instead of $y$.







        share|cite|improve this answer













        share|cite|improve this answer



        share|cite|improve this answer











        answered yesterday









        Brian Tung

        25.1k32353




        25.1k32353






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2872404%2fexpectation-of-a-continuous-random-variable%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?