What is the average distance between two points on the perimeter of a rectangle?











up vote
0
down vote

favorite












Was just wondering, no special reason.



Someone asked the corresponding question about a square, so this question is a generalization of that question: What is the average distance of two points chosen uniformly on a unit square?










share|cite|improve this question






















  • Uniformly distributed along the perimeter, I assume?
    – Frpzzd
    Nov 13 at 0:45






  • 1




    With aid of Mathematica, the average distance between two independent points chosen unformly at random from the perimeter of a unit square is $$frac{1}{12} left(3+sqrt{2}+5 operatorname{arcsinh}(1)right) approx 0.73509012478923418125cdots $$
    – Sangchul Lee
    Nov 13 at 0:59

















up vote
0
down vote

favorite












Was just wondering, no special reason.



Someone asked the corresponding question about a square, so this question is a generalization of that question: What is the average distance of two points chosen uniformly on a unit square?










share|cite|improve this question






















  • Uniformly distributed along the perimeter, I assume?
    – Frpzzd
    Nov 13 at 0:45






  • 1




    With aid of Mathematica, the average distance between two independent points chosen unformly at random from the perimeter of a unit square is $$frac{1}{12} left(3+sqrt{2}+5 operatorname{arcsinh}(1)right) approx 0.73509012478923418125cdots $$
    – Sangchul Lee
    Nov 13 at 0:59















up vote
0
down vote

favorite









up vote
0
down vote

favorite











Was just wondering, no special reason.



Someone asked the corresponding question about a square, so this question is a generalization of that question: What is the average distance of two points chosen uniformly on a unit square?










share|cite|improve this question













Was just wondering, no special reason.



Someone asked the corresponding question about a square, so this question is a generalization of that question: What is the average distance of two points chosen uniformly on a unit square?







geometry






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 13 at 0:35









EulerSpoiler

678




678












  • Uniformly distributed along the perimeter, I assume?
    – Frpzzd
    Nov 13 at 0:45






  • 1




    With aid of Mathematica, the average distance between two independent points chosen unformly at random from the perimeter of a unit square is $$frac{1}{12} left(3+sqrt{2}+5 operatorname{arcsinh}(1)right) approx 0.73509012478923418125cdots $$
    – Sangchul Lee
    Nov 13 at 0:59




















  • Uniformly distributed along the perimeter, I assume?
    – Frpzzd
    Nov 13 at 0:45






  • 1




    With aid of Mathematica, the average distance between two independent points chosen unformly at random from the perimeter of a unit square is $$frac{1}{12} left(3+sqrt{2}+5 operatorname{arcsinh}(1)right) approx 0.73509012478923418125cdots $$
    – Sangchul Lee
    Nov 13 at 0:59


















Uniformly distributed along the perimeter, I assume?
– Frpzzd
Nov 13 at 0:45




Uniformly distributed along the perimeter, I assume?
– Frpzzd
Nov 13 at 0:45




1




1




With aid of Mathematica, the average distance between two independent points chosen unformly at random from the perimeter of a unit square is $$frac{1}{12} left(3+sqrt{2}+5 operatorname{arcsinh}(1)right) approx 0.73509012478923418125cdots $$
– Sangchul Lee
Nov 13 at 0:59






With aid of Mathematica, the average distance between two independent points chosen unformly at random from the perimeter of a unit square is $$frac{1}{12} left(3+sqrt{2}+5 operatorname{arcsinh}(1)right) approx 0.73509012478923418125cdots $$
– Sangchul Lee
Nov 13 at 0:59












1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










I will show you how to do it with integrals, but I'll leave it up to you to evaluate the integrals.



Suppose the rectangle has length $l$ and width $w$, and that points $X$ and $Y$ are chosen uniformly along its perimeter. We have a total of $5$ cases:




  • Both points are on the same side of length $l$, with probability $p_1$

  • Both points are on different sides of length $l$, with probability $p_2$

  • Both points are on the same side of length $w$, with probability $p_3$

  • Both points are on different sides of length $w$, with probability $p_4$

  • One point is on a side of length $l$ and one is on a side of length $w$, with probability $p_5$


Consider the first case. If $x,y$ are the respective distances of $X$ and $Y$ from a given vertex of the side they are on, then their distance is $|x-y|$, and so the average distance is
$$I_1=frac{1}{l^2}iint_{[0,l]^2} |x-y|dxdy$$
Then consider the second case. Let $x,y$ be the respective distances of $X$ and $Y$ from a given side of length $w$ of the rectangle. Then the distance between $x$ and $y$ is given by $sqrt{(x-y)^2+w^2}$, and so the integral for their average distance is
$$I_2=frac{1}{l^2}iint_{[0,l]^2} sqrt{(x-y)^2+w^2}dxdy$$
Because the sides of length $l$ and those of length $w$ are indistinguishable in the context of the problem, the respective averages for case 3 and case 4 are analogously
$$I_3=frac{1}{w^2}iint_{[0,w]^2} |x-y|dxdy$$
$$I_4=frac{1}{w^2}iint_{[0,w]^2} sqrt{(x-y)^2+l^2}dxdy$$
Finally, for the fifth case, let $x$ and $y$ be the respective distances of $X$ and $Y$ from the vertex in common between their sides. Then, by the pythagorean theorem, the distance between them is $sqrt{x^2+y^2}$, so the integral is
$$I_5=frac{1}{lw}int_0^l int_0^w sqrt{x^2+y^2}dxdy$$
Now, the expected distance is simply
$$p_1 I_1+p_2I_2+p_3I_3+p_4I_4+p_5I_5$$
and so I'll leave it up to you to compute the integrals and the probabilities $p_i.$






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%2f2996115%2fwhat-is-the-average-distance-between-two-points-on-the-perimeter-of-a-rectangle%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
    3
    down vote



    accepted










    I will show you how to do it with integrals, but I'll leave it up to you to evaluate the integrals.



    Suppose the rectangle has length $l$ and width $w$, and that points $X$ and $Y$ are chosen uniformly along its perimeter. We have a total of $5$ cases:




    • Both points are on the same side of length $l$, with probability $p_1$

    • Both points are on different sides of length $l$, with probability $p_2$

    • Both points are on the same side of length $w$, with probability $p_3$

    • Both points are on different sides of length $w$, with probability $p_4$

    • One point is on a side of length $l$ and one is on a side of length $w$, with probability $p_5$


    Consider the first case. If $x,y$ are the respective distances of $X$ and $Y$ from a given vertex of the side they are on, then their distance is $|x-y|$, and so the average distance is
    $$I_1=frac{1}{l^2}iint_{[0,l]^2} |x-y|dxdy$$
    Then consider the second case. Let $x,y$ be the respective distances of $X$ and $Y$ from a given side of length $w$ of the rectangle. Then the distance between $x$ and $y$ is given by $sqrt{(x-y)^2+w^2}$, and so the integral for their average distance is
    $$I_2=frac{1}{l^2}iint_{[0,l]^2} sqrt{(x-y)^2+w^2}dxdy$$
    Because the sides of length $l$ and those of length $w$ are indistinguishable in the context of the problem, the respective averages for case 3 and case 4 are analogously
    $$I_3=frac{1}{w^2}iint_{[0,w]^2} |x-y|dxdy$$
    $$I_4=frac{1}{w^2}iint_{[0,w]^2} sqrt{(x-y)^2+l^2}dxdy$$
    Finally, for the fifth case, let $x$ and $y$ be the respective distances of $X$ and $Y$ from the vertex in common between their sides. Then, by the pythagorean theorem, the distance between them is $sqrt{x^2+y^2}$, so the integral is
    $$I_5=frac{1}{lw}int_0^l int_0^w sqrt{x^2+y^2}dxdy$$
    Now, the expected distance is simply
    $$p_1 I_1+p_2I_2+p_3I_3+p_4I_4+p_5I_5$$
    and so I'll leave it up to you to compute the integrals and the probabilities $p_i.$






    share|cite|improve this answer

























      up vote
      3
      down vote



      accepted










      I will show you how to do it with integrals, but I'll leave it up to you to evaluate the integrals.



      Suppose the rectangle has length $l$ and width $w$, and that points $X$ and $Y$ are chosen uniformly along its perimeter. We have a total of $5$ cases:




      • Both points are on the same side of length $l$, with probability $p_1$

      • Both points are on different sides of length $l$, with probability $p_2$

      • Both points are on the same side of length $w$, with probability $p_3$

      • Both points are on different sides of length $w$, with probability $p_4$

      • One point is on a side of length $l$ and one is on a side of length $w$, with probability $p_5$


      Consider the first case. If $x,y$ are the respective distances of $X$ and $Y$ from a given vertex of the side they are on, then their distance is $|x-y|$, and so the average distance is
      $$I_1=frac{1}{l^2}iint_{[0,l]^2} |x-y|dxdy$$
      Then consider the second case. Let $x,y$ be the respective distances of $X$ and $Y$ from a given side of length $w$ of the rectangle. Then the distance between $x$ and $y$ is given by $sqrt{(x-y)^2+w^2}$, and so the integral for their average distance is
      $$I_2=frac{1}{l^2}iint_{[0,l]^2} sqrt{(x-y)^2+w^2}dxdy$$
      Because the sides of length $l$ and those of length $w$ are indistinguishable in the context of the problem, the respective averages for case 3 and case 4 are analogously
      $$I_3=frac{1}{w^2}iint_{[0,w]^2} |x-y|dxdy$$
      $$I_4=frac{1}{w^2}iint_{[0,w]^2} sqrt{(x-y)^2+l^2}dxdy$$
      Finally, for the fifth case, let $x$ and $y$ be the respective distances of $X$ and $Y$ from the vertex in common between their sides. Then, by the pythagorean theorem, the distance between them is $sqrt{x^2+y^2}$, so the integral is
      $$I_5=frac{1}{lw}int_0^l int_0^w sqrt{x^2+y^2}dxdy$$
      Now, the expected distance is simply
      $$p_1 I_1+p_2I_2+p_3I_3+p_4I_4+p_5I_5$$
      and so I'll leave it up to you to compute the integrals and the probabilities $p_i.$






      share|cite|improve this answer























        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        I will show you how to do it with integrals, but I'll leave it up to you to evaluate the integrals.



        Suppose the rectangle has length $l$ and width $w$, and that points $X$ and $Y$ are chosen uniformly along its perimeter. We have a total of $5$ cases:




        • Both points are on the same side of length $l$, with probability $p_1$

        • Both points are on different sides of length $l$, with probability $p_2$

        • Both points are on the same side of length $w$, with probability $p_3$

        • Both points are on different sides of length $w$, with probability $p_4$

        • One point is on a side of length $l$ and one is on a side of length $w$, with probability $p_5$


        Consider the first case. If $x,y$ are the respective distances of $X$ and $Y$ from a given vertex of the side they are on, then their distance is $|x-y|$, and so the average distance is
        $$I_1=frac{1}{l^2}iint_{[0,l]^2} |x-y|dxdy$$
        Then consider the second case. Let $x,y$ be the respective distances of $X$ and $Y$ from a given side of length $w$ of the rectangle. Then the distance between $x$ and $y$ is given by $sqrt{(x-y)^2+w^2}$, and so the integral for their average distance is
        $$I_2=frac{1}{l^2}iint_{[0,l]^2} sqrt{(x-y)^2+w^2}dxdy$$
        Because the sides of length $l$ and those of length $w$ are indistinguishable in the context of the problem, the respective averages for case 3 and case 4 are analogously
        $$I_3=frac{1}{w^2}iint_{[0,w]^2} |x-y|dxdy$$
        $$I_4=frac{1}{w^2}iint_{[0,w]^2} sqrt{(x-y)^2+l^2}dxdy$$
        Finally, for the fifth case, let $x$ and $y$ be the respective distances of $X$ and $Y$ from the vertex in common between their sides. Then, by the pythagorean theorem, the distance between them is $sqrt{x^2+y^2}$, so the integral is
        $$I_5=frac{1}{lw}int_0^l int_0^w sqrt{x^2+y^2}dxdy$$
        Now, the expected distance is simply
        $$p_1 I_1+p_2I_2+p_3I_3+p_4I_4+p_5I_5$$
        and so I'll leave it up to you to compute the integrals and the probabilities $p_i.$






        share|cite|improve this answer












        I will show you how to do it with integrals, but I'll leave it up to you to evaluate the integrals.



        Suppose the rectangle has length $l$ and width $w$, and that points $X$ and $Y$ are chosen uniformly along its perimeter. We have a total of $5$ cases:




        • Both points are on the same side of length $l$, with probability $p_1$

        • Both points are on different sides of length $l$, with probability $p_2$

        • Both points are on the same side of length $w$, with probability $p_3$

        • Both points are on different sides of length $w$, with probability $p_4$

        • One point is on a side of length $l$ and one is on a side of length $w$, with probability $p_5$


        Consider the first case. If $x,y$ are the respective distances of $X$ and $Y$ from a given vertex of the side they are on, then their distance is $|x-y|$, and so the average distance is
        $$I_1=frac{1}{l^2}iint_{[0,l]^2} |x-y|dxdy$$
        Then consider the second case. Let $x,y$ be the respective distances of $X$ and $Y$ from a given side of length $w$ of the rectangle. Then the distance between $x$ and $y$ is given by $sqrt{(x-y)^2+w^2}$, and so the integral for their average distance is
        $$I_2=frac{1}{l^2}iint_{[0,l]^2} sqrt{(x-y)^2+w^2}dxdy$$
        Because the sides of length $l$ and those of length $w$ are indistinguishable in the context of the problem, the respective averages for case 3 and case 4 are analogously
        $$I_3=frac{1}{w^2}iint_{[0,w]^2} |x-y|dxdy$$
        $$I_4=frac{1}{w^2}iint_{[0,w]^2} sqrt{(x-y)^2+l^2}dxdy$$
        Finally, for the fifth case, let $x$ and $y$ be the respective distances of $X$ and $Y$ from the vertex in common between their sides. Then, by the pythagorean theorem, the distance between them is $sqrt{x^2+y^2}$, so the integral is
        $$I_5=frac{1}{lw}int_0^l int_0^w sqrt{x^2+y^2}dxdy$$
        Now, the expected distance is simply
        $$p_1 I_1+p_2I_2+p_3I_3+p_4I_4+p_5I_5$$
        and so I'll leave it up to you to compute the integrals and the probabilities $p_i.$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Nov 13 at 0:59









        Frpzzd

        19.7k638101




        19.7k638101






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2996115%2fwhat-is-the-average-distance-between-two-points-on-the-perimeter-of-a-rectangle%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

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?