Computing the PDF of $X + Y$ if $X, Y sim text{U}(0, 1)$ using a convolution











up vote
1
down vote

favorite













Theorem: If $X$ and $Y$ are independent continuous random variables with density functions $f_{X}$ and $f_{Y}$, the probability
distribution $f_{X + Y}$ of $X + Y$ is given by



$$f_{X + Y}(a) = int_{-infty}^{infty} f_{X}(a - y) f_{Y}(y)
mathop{dy} $$




If $X$ and $Y$ are independent random variables, both uniformly distributed on $(0, 1)$, calculate the probability density of $X + Y$.





We have



$$f_{X}(a) = f_{Y}(a) = begin{cases}
1 & text{ if } 0 < a < 1 \
0 & text{ otherwise.}
end{cases} $$



So, we obtain



$$f_{X + Y}(a) = int_{-infty}^{infty} f_{X}(a - y)f_{Y}(y) mathop{dy}. $$



$$= int_{0}^{1} f_{X}(a - y) mathop{dy}. $$



(My first question here is what happened to the $f_{Y}(y)$ term? Did they just equate it to $1$ because a probability distribution has total area $1$ under the curve? Wouldn't this be assuming that the integral of the product of two functions is equal to the product of their integrals?).



Okay, from here, the book writes for $0 leq a leq 1$, this yields



$$f_{X + Y}(a) = int_{0}^{a} mathop{dy} = a $$



and for $1 < a < 2$, we get



$$f_{X + Y}(a) = int_{a - 1}^{1} mathop{dy} = 2 - a. $$



I am also lost here. How did they figure out to split it into two cases, and how did they know it is on the interval $0$ to $2$?










share|cite|improve this question




















  • 1




    The density of $f_Y$ is $1$ so there's no need to write it. It should be clear that adding two $(0, 1)$ variables means the sum can be at most $2.$ Also, uniform plus uniform is triangle.
    – Sean Roberson
    Nov 26 at 6:12










  • how'd they know to split it into the case where $0 leq a leq 1$ and $1 < a < 2$? why not like $0 leq a leq 1/2$ etc?
    – stackofhay42
    Nov 26 at 6:13















up vote
1
down vote

favorite













Theorem: If $X$ and $Y$ are independent continuous random variables with density functions $f_{X}$ and $f_{Y}$, the probability
distribution $f_{X + Y}$ of $X + Y$ is given by



$$f_{X + Y}(a) = int_{-infty}^{infty} f_{X}(a - y) f_{Y}(y)
mathop{dy} $$




If $X$ and $Y$ are independent random variables, both uniformly distributed on $(0, 1)$, calculate the probability density of $X + Y$.





We have



$$f_{X}(a) = f_{Y}(a) = begin{cases}
1 & text{ if } 0 < a < 1 \
0 & text{ otherwise.}
end{cases} $$



So, we obtain



$$f_{X + Y}(a) = int_{-infty}^{infty} f_{X}(a - y)f_{Y}(y) mathop{dy}. $$



$$= int_{0}^{1} f_{X}(a - y) mathop{dy}. $$



(My first question here is what happened to the $f_{Y}(y)$ term? Did they just equate it to $1$ because a probability distribution has total area $1$ under the curve? Wouldn't this be assuming that the integral of the product of two functions is equal to the product of their integrals?).



Okay, from here, the book writes for $0 leq a leq 1$, this yields



$$f_{X + Y}(a) = int_{0}^{a} mathop{dy} = a $$



and for $1 < a < 2$, we get



$$f_{X + Y}(a) = int_{a - 1}^{1} mathop{dy} = 2 - a. $$



I am also lost here. How did they figure out to split it into two cases, and how did they know it is on the interval $0$ to $2$?










share|cite|improve this question




















  • 1




    The density of $f_Y$ is $1$ so there's no need to write it. It should be clear that adding two $(0, 1)$ variables means the sum can be at most $2.$ Also, uniform plus uniform is triangle.
    – Sean Roberson
    Nov 26 at 6:12










  • how'd they know to split it into the case where $0 leq a leq 1$ and $1 < a < 2$? why not like $0 leq a leq 1/2$ etc?
    – stackofhay42
    Nov 26 at 6:13













up vote
1
down vote

favorite









up vote
1
down vote

favorite












Theorem: If $X$ and $Y$ are independent continuous random variables with density functions $f_{X}$ and $f_{Y}$, the probability
distribution $f_{X + Y}$ of $X + Y$ is given by



$$f_{X + Y}(a) = int_{-infty}^{infty} f_{X}(a - y) f_{Y}(y)
mathop{dy} $$




If $X$ and $Y$ are independent random variables, both uniformly distributed on $(0, 1)$, calculate the probability density of $X + Y$.





We have



$$f_{X}(a) = f_{Y}(a) = begin{cases}
1 & text{ if } 0 < a < 1 \
0 & text{ otherwise.}
end{cases} $$



So, we obtain



$$f_{X + Y}(a) = int_{-infty}^{infty} f_{X}(a - y)f_{Y}(y) mathop{dy}. $$



$$= int_{0}^{1} f_{X}(a - y) mathop{dy}. $$



(My first question here is what happened to the $f_{Y}(y)$ term? Did they just equate it to $1$ because a probability distribution has total area $1$ under the curve? Wouldn't this be assuming that the integral of the product of two functions is equal to the product of their integrals?).



Okay, from here, the book writes for $0 leq a leq 1$, this yields



$$f_{X + Y}(a) = int_{0}^{a} mathop{dy} = a $$



and for $1 < a < 2$, we get



$$f_{X + Y}(a) = int_{a - 1}^{1} mathop{dy} = 2 - a. $$



I am also lost here. How did they figure out to split it into two cases, and how did they know it is on the interval $0$ to $2$?










share|cite|improve this question
















Theorem: If $X$ and $Y$ are independent continuous random variables with density functions $f_{X}$ and $f_{Y}$, the probability
distribution $f_{X + Y}$ of $X + Y$ is given by



$$f_{X + Y}(a) = int_{-infty}^{infty} f_{X}(a - y) f_{Y}(y)
mathop{dy} $$




If $X$ and $Y$ are independent random variables, both uniformly distributed on $(0, 1)$, calculate the probability density of $X + Y$.





We have



$$f_{X}(a) = f_{Y}(a) = begin{cases}
1 & text{ if } 0 < a < 1 \
0 & text{ otherwise.}
end{cases} $$



So, we obtain



$$f_{X + Y}(a) = int_{-infty}^{infty} f_{X}(a - y)f_{Y}(y) mathop{dy}. $$



$$= int_{0}^{1} f_{X}(a - y) mathop{dy}. $$



(My first question here is what happened to the $f_{Y}(y)$ term? Did they just equate it to $1$ because a probability distribution has total area $1$ under the curve? Wouldn't this be assuming that the integral of the product of two functions is equal to the product of their integrals?).



Okay, from here, the book writes for $0 leq a leq 1$, this yields



$$f_{X + Y}(a) = int_{0}^{a} mathop{dy} = a $$



and for $1 < a < 2$, we get



$$f_{X + Y}(a) = int_{a - 1}^{1} mathop{dy} = 2 - a. $$



I am also lost here. How did they figure out to split it into two cases, and how did they know it is on the interval $0$ to $2$?







probability probability-theory probability-distributions convolution uniform-distribution






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 26 at 15:21









Davide Giraudo

124k16150259




124k16150259










asked Nov 26 at 6:04









stackofhay42

1424




1424








  • 1




    The density of $f_Y$ is $1$ so there's no need to write it. It should be clear that adding two $(0, 1)$ variables means the sum can be at most $2.$ Also, uniform plus uniform is triangle.
    – Sean Roberson
    Nov 26 at 6:12










  • how'd they know to split it into the case where $0 leq a leq 1$ and $1 < a < 2$? why not like $0 leq a leq 1/2$ etc?
    – stackofhay42
    Nov 26 at 6:13














  • 1




    The density of $f_Y$ is $1$ so there's no need to write it. It should be clear that adding two $(0, 1)$ variables means the sum can be at most $2.$ Also, uniform plus uniform is triangle.
    – Sean Roberson
    Nov 26 at 6:12










  • how'd they know to split it into the case where $0 leq a leq 1$ and $1 < a < 2$? why not like $0 leq a leq 1/2$ etc?
    – stackofhay42
    Nov 26 at 6:13








1




1




The density of $f_Y$ is $1$ so there's no need to write it. It should be clear that adding two $(0, 1)$ variables means the sum can be at most $2.$ Also, uniform plus uniform is triangle.
– Sean Roberson
Nov 26 at 6:12




The density of $f_Y$ is $1$ so there's no need to write it. It should be clear that adding two $(0, 1)$ variables means the sum can be at most $2.$ Also, uniform plus uniform is triangle.
– Sean Roberson
Nov 26 at 6:12












how'd they know to split it into the case where $0 leq a leq 1$ and $1 < a < 2$? why not like $0 leq a leq 1/2$ etc?
– stackofhay42
Nov 26 at 6:13




how'd they know to split it into the case where $0 leq a leq 1$ and $1 < a < 2$? why not like $0 leq a leq 1/2$ etc?
– stackofhay42
Nov 26 at 6:13










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Answer to your first question: As you yourself noted, $f_Y(a) = 1 ; forall a in [0,1]$, so the $f_Y(a)$ term disappears from the integration. It is not because $int_0^1 f_Y(a)da=1$, which is also true. Also, the limits of integration changed from $(-infty,infty)$ to $[0,1]$ because $f_Y(a)=0$ outside $[0,1]$.



Now you are left with the term $f_X(a-y)$, which equals 1 when $(a-y) in [0,1]$ and 0 otherwise. If $a leq 1$, this holds true when $y leq a$ and $a-y leq 1$. The latter condition can be rewritten as $y geq a-1$. Since $a leq 1$, the condition is equivalent to $y geq 0$. Hence, the limits of integration are $[0,a]$ and over this range $f_x(a-y)=1$, by definition.



By similar reasoning, if $a>1$, $f_X(a-y)=1$ only when $y geq (a-1)$ and $ y leq 1$, which explains the integration limits [you can fill in the blanks].



Finally, since $0 leq X leq 1$ and $0 leq Y leq 1$, you have $0 leq X+Y leq 2$.






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: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    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%2f3013908%2fcomputing-the-pdf-of-x-y-if-x-y-sim-textu0-1-using-a-convolution%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Answer to your first question: As you yourself noted, $f_Y(a) = 1 ; forall a in [0,1]$, so the $f_Y(a)$ term disappears from the integration. It is not because $int_0^1 f_Y(a)da=1$, which is also true. Also, the limits of integration changed from $(-infty,infty)$ to $[0,1]$ because $f_Y(a)=0$ outside $[0,1]$.



    Now you are left with the term $f_X(a-y)$, which equals 1 when $(a-y) in [0,1]$ and 0 otherwise. If $a leq 1$, this holds true when $y leq a$ and $a-y leq 1$. The latter condition can be rewritten as $y geq a-1$. Since $a leq 1$, the condition is equivalent to $y geq 0$. Hence, the limits of integration are $[0,a]$ and over this range $f_x(a-y)=1$, by definition.



    By similar reasoning, if $a>1$, $f_X(a-y)=1$ only when $y geq (a-1)$ and $ y leq 1$, which explains the integration limits [you can fill in the blanks].



    Finally, since $0 leq X leq 1$ and $0 leq Y leq 1$, you have $0 leq X+Y leq 2$.






    share|cite|improve this answer

























      up vote
      0
      down vote













      Answer to your first question: As you yourself noted, $f_Y(a) = 1 ; forall a in [0,1]$, so the $f_Y(a)$ term disappears from the integration. It is not because $int_0^1 f_Y(a)da=1$, which is also true. Also, the limits of integration changed from $(-infty,infty)$ to $[0,1]$ because $f_Y(a)=0$ outside $[0,1]$.



      Now you are left with the term $f_X(a-y)$, which equals 1 when $(a-y) in [0,1]$ and 0 otherwise. If $a leq 1$, this holds true when $y leq a$ and $a-y leq 1$. The latter condition can be rewritten as $y geq a-1$. Since $a leq 1$, the condition is equivalent to $y geq 0$. Hence, the limits of integration are $[0,a]$ and over this range $f_x(a-y)=1$, by definition.



      By similar reasoning, if $a>1$, $f_X(a-y)=1$ only when $y geq (a-1)$ and $ y leq 1$, which explains the integration limits [you can fill in the blanks].



      Finally, since $0 leq X leq 1$ and $0 leq Y leq 1$, you have $0 leq X+Y leq 2$.






      share|cite|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Answer to your first question: As you yourself noted, $f_Y(a) = 1 ; forall a in [0,1]$, so the $f_Y(a)$ term disappears from the integration. It is not because $int_0^1 f_Y(a)da=1$, which is also true. Also, the limits of integration changed from $(-infty,infty)$ to $[0,1]$ because $f_Y(a)=0$ outside $[0,1]$.



        Now you are left with the term $f_X(a-y)$, which equals 1 when $(a-y) in [0,1]$ and 0 otherwise. If $a leq 1$, this holds true when $y leq a$ and $a-y leq 1$. The latter condition can be rewritten as $y geq a-1$. Since $a leq 1$, the condition is equivalent to $y geq 0$. Hence, the limits of integration are $[0,a]$ and over this range $f_x(a-y)=1$, by definition.



        By similar reasoning, if $a>1$, $f_X(a-y)=1$ only when $y geq (a-1)$ and $ y leq 1$, which explains the integration limits [you can fill in the blanks].



        Finally, since $0 leq X leq 1$ and $0 leq Y leq 1$, you have $0 leq X+Y leq 2$.






        share|cite|improve this answer












        Answer to your first question: As you yourself noted, $f_Y(a) = 1 ; forall a in [0,1]$, so the $f_Y(a)$ term disappears from the integration. It is not because $int_0^1 f_Y(a)da=1$, which is also true. Also, the limits of integration changed from $(-infty,infty)$ to $[0,1]$ because $f_Y(a)=0$ outside $[0,1]$.



        Now you are left with the term $f_X(a-y)$, which equals 1 when $(a-y) in [0,1]$ and 0 otherwise. If $a leq 1$, this holds true when $y leq a$ and $a-y leq 1$. The latter condition can be rewritten as $y geq a-1$. Since $a leq 1$, the condition is equivalent to $y geq 0$. Hence, the limits of integration are $[0,a]$ and over this range $f_x(a-y)=1$, by definition.



        By similar reasoning, if $a>1$, $f_X(a-y)=1$ only when $y geq (a-1)$ and $ y leq 1$, which explains the integration limits [you can fill in the blanks].



        Finally, since $0 leq X leq 1$ and $0 leq Y leq 1$, you have $0 leq X+Y leq 2$.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Nov 26 at 6:32









        Aditya Dua

        7318




        7318






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3013908%2fcomputing-the-pdf-of-x-y-if-x-y-sim-textu0-1-using-a-convolution%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Wiesbaden

            Marschland

            Dieringhausen