Finding a correlation for a pair of discrete variables











up vote
0
down vote

favorite












The problem below is from the book Introduction to Probability Theory
by Hoel, Port and Stone. The answer I
computed is different from the back of the book. I am wondering where I went wrong or if the book is wrong.

Problem:

A box has $3$ red balls and $2$ black balls. A random sample of size
$2$ is drawn
without replacement. Let $U$ by the number of red balls selected and let $V$ be
the number of black balls selected. Compute $rho(U,V)$.

Answer:
begin{eqnarray*}
rho(U,V) &=& frac{ Cov(U,V) } {sigma_u sigma_v } \
u_u &=& 2 P(U = 2) + 1P(U = 1) \
P(U = 2) &=& frac{3}{5} left( frac{2}{4} right) = frac{3}{10} \
%
P(U = 1) &=& frac{2}{5} left( frac{3}{4} right) + frac{3}{5} left( frac{2}{4} right) \
P(U = 1) &=& frac{6}{20} + frac{6}{20} = frac{6}{5} \
%
u_u &=& 2 left( frac{3}{10} right) + frac{1}{2} = frac{6}{10} + frac{5}{10} \
u_u &=& frac{11}{10} \
u_v &=& 2 P(V = 2) + 1P(V = 1) \
P(V = 2) &=& frac{2}{5} left( frac{1}{4} right) = frac{1}{10} \
P(V = 1) &=& frac{2}{5} left( frac{3}{4} right) + frac{3}{5} left( frac{2}{4} right) =
frac{6}{20} + frac{6}{20} \
P(V = 1) &=& frac{3}{5} \
u_v &=& 2 left( frac{1}{10} right) + frac{3}{5} = frac{1}{5} + frac{3}{5} \
u_v &=& frac{4}{5} \
E( U^2 ) &=& 2^2 P(U = 2) + 1^2 P(U = 1) \
E( U^2 ) &=& 4 left(frac{3}{10}right) + frac{1}{2} = frac{6}{5} + frac{1}{2} \
E( U^2 ) &=& frac{17}{10} \
E( V^2 ) &=& 2^2 P(V = 2) + 1^2 P(V = 1) = 4 P(V = 2) + P(V = 1) \
E( V^2 ) &=& 4 left( frac{1}{10} right) + frac{3}{5} = frac{4}{10} + frac{6}{10} \
E( V^2 ) &=& 1 \
sigma_u^2 &=& E( U^2 ) - u_u^2 = frac{17}{10} - ( frac{6}{5} ) ^ 2\
sigma_u^2 &=& frac{17}{10} - frac{36}{25} = frac{17(5) - 36(2)}{50} \
sigma_u^2 &=& frac{105 - 72}{50} = frac{32}{50} = frac{16}{25} \
sigma_u &=& frac{4}{5} \
end{eqnarray*}

begin{eqnarray*}
sigma_v^2 &=& E( V^2 ) - u_v^2 = 1 - left( frac{4}{5} right)^2 = 1 - frac{16}{25} \
sigma_v^2 &=& frac{9}{25} \
sigma_v &=& frac{3}{5} \
Cov(U,V) &=& E(UV) - u_u u_v \
E(UV) &=& P(U=1)P(V=1)(1)(1) = left( frac{6}{5} right) left( frac{3}{5} right) \
E(UV) &=& frac{18}{25} \
Cov(U,V) &=& frac{18}{25} - left( frac{11}{10} right) left( frac{4}{5} right)
= frac{18}{25} - frac{44}{50} = frac{36-44}{50}\
Cov(U,V) &=& -frac{4}{25} \
rho(U,V) &=& frac{ -frac{4}{25} } { left( frac{4}{5} right) left( frac{3}{5} right) } =
frac{ -frac{4}{25} } { left( frac{12}{25} right) } \
rho(U,V) &=& -frac{1}{3} \
end{eqnarray*}

The book's answer is $-1$.










share|cite|improve this question






















  • As I said in my answer $u_u$ is not $11/10$ but $12/10$.
    – Jean Marie
    Nov 23 at 21:41















up vote
0
down vote

favorite












The problem below is from the book Introduction to Probability Theory
by Hoel, Port and Stone. The answer I
computed is different from the back of the book. I am wondering where I went wrong or if the book is wrong.

Problem:

A box has $3$ red balls and $2$ black balls. A random sample of size
$2$ is drawn
without replacement. Let $U$ by the number of red balls selected and let $V$ be
the number of black balls selected. Compute $rho(U,V)$.

Answer:
begin{eqnarray*}
rho(U,V) &=& frac{ Cov(U,V) } {sigma_u sigma_v } \
u_u &=& 2 P(U = 2) + 1P(U = 1) \
P(U = 2) &=& frac{3}{5} left( frac{2}{4} right) = frac{3}{10} \
%
P(U = 1) &=& frac{2}{5} left( frac{3}{4} right) + frac{3}{5} left( frac{2}{4} right) \
P(U = 1) &=& frac{6}{20} + frac{6}{20} = frac{6}{5} \
%
u_u &=& 2 left( frac{3}{10} right) + frac{1}{2} = frac{6}{10} + frac{5}{10} \
u_u &=& frac{11}{10} \
u_v &=& 2 P(V = 2) + 1P(V = 1) \
P(V = 2) &=& frac{2}{5} left( frac{1}{4} right) = frac{1}{10} \
P(V = 1) &=& frac{2}{5} left( frac{3}{4} right) + frac{3}{5} left( frac{2}{4} right) =
frac{6}{20} + frac{6}{20} \
P(V = 1) &=& frac{3}{5} \
u_v &=& 2 left( frac{1}{10} right) + frac{3}{5} = frac{1}{5} + frac{3}{5} \
u_v &=& frac{4}{5} \
E( U^2 ) &=& 2^2 P(U = 2) + 1^2 P(U = 1) \
E( U^2 ) &=& 4 left(frac{3}{10}right) + frac{1}{2} = frac{6}{5} + frac{1}{2} \
E( U^2 ) &=& frac{17}{10} \
E( V^2 ) &=& 2^2 P(V = 2) + 1^2 P(V = 1) = 4 P(V = 2) + P(V = 1) \
E( V^2 ) &=& 4 left( frac{1}{10} right) + frac{3}{5} = frac{4}{10} + frac{6}{10} \
E( V^2 ) &=& 1 \
sigma_u^2 &=& E( U^2 ) - u_u^2 = frac{17}{10} - ( frac{6}{5} ) ^ 2\
sigma_u^2 &=& frac{17}{10} - frac{36}{25} = frac{17(5) - 36(2)}{50} \
sigma_u^2 &=& frac{105 - 72}{50} = frac{32}{50} = frac{16}{25} \
sigma_u &=& frac{4}{5} \
end{eqnarray*}

begin{eqnarray*}
sigma_v^2 &=& E( V^2 ) - u_v^2 = 1 - left( frac{4}{5} right)^2 = 1 - frac{16}{25} \
sigma_v^2 &=& frac{9}{25} \
sigma_v &=& frac{3}{5} \
Cov(U,V) &=& E(UV) - u_u u_v \
E(UV) &=& P(U=1)P(V=1)(1)(1) = left( frac{6}{5} right) left( frac{3}{5} right) \
E(UV) &=& frac{18}{25} \
Cov(U,V) &=& frac{18}{25} - left( frac{11}{10} right) left( frac{4}{5} right)
= frac{18}{25} - frac{44}{50} = frac{36-44}{50}\
Cov(U,V) &=& -frac{4}{25} \
rho(U,V) &=& frac{ -frac{4}{25} } { left( frac{4}{5} right) left( frac{3}{5} right) } =
frac{ -frac{4}{25} } { left( frac{12}{25} right) } \
rho(U,V) &=& -frac{1}{3} \
end{eqnarray*}

The book's answer is $-1$.










share|cite|improve this question






















  • As I said in my answer $u_u$ is not $11/10$ but $12/10$.
    – Jean Marie
    Nov 23 at 21:41













up vote
0
down vote

favorite









up vote
0
down vote

favorite











The problem below is from the book Introduction to Probability Theory
by Hoel, Port and Stone. The answer I
computed is different from the back of the book. I am wondering where I went wrong or if the book is wrong.

Problem:

A box has $3$ red balls and $2$ black balls. A random sample of size
$2$ is drawn
without replacement. Let $U$ by the number of red balls selected and let $V$ be
the number of black balls selected. Compute $rho(U,V)$.

Answer:
begin{eqnarray*}
rho(U,V) &=& frac{ Cov(U,V) } {sigma_u sigma_v } \
u_u &=& 2 P(U = 2) + 1P(U = 1) \
P(U = 2) &=& frac{3}{5} left( frac{2}{4} right) = frac{3}{10} \
%
P(U = 1) &=& frac{2}{5} left( frac{3}{4} right) + frac{3}{5} left( frac{2}{4} right) \
P(U = 1) &=& frac{6}{20} + frac{6}{20} = frac{6}{5} \
%
u_u &=& 2 left( frac{3}{10} right) + frac{1}{2} = frac{6}{10} + frac{5}{10} \
u_u &=& frac{11}{10} \
u_v &=& 2 P(V = 2) + 1P(V = 1) \
P(V = 2) &=& frac{2}{5} left( frac{1}{4} right) = frac{1}{10} \
P(V = 1) &=& frac{2}{5} left( frac{3}{4} right) + frac{3}{5} left( frac{2}{4} right) =
frac{6}{20} + frac{6}{20} \
P(V = 1) &=& frac{3}{5} \
u_v &=& 2 left( frac{1}{10} right) + frac{3}{5} = frac{1}{5} + frac{3}{5} \
u_v &=& frac{4}{5} \
E( U^2 ) &=& 2^2 P(U = 2) + 1^2 P(U = 1) \
E( U^2 ) &=& 4 left(frac{3}{10}right) + frac{1}{2} = frac{6}{5} + frac{1}{2} \
E( U^2 ) &=& frac{17}{10} \
E( V^2 ) &=& 2^2 P(V = 2) + 1^2 P(V = 1) = 4 P(V = 2) + P(V = 1) \
E( V^2 ) &=& 4 left( frac{1}{10} right) + frac{3}{5} = frac{4}{10} + frac{6}{10} \
E( V^2 ) &=& 1 \
sigma_u^2 &=& E( U^2 ) - u_u^2 = frac{17}{10} - ( frac{6}{5} ) ^ 2\
sigma_u^2 &=& frac{17}{10} - frac{36}{25} = frac{17(5) - 36(2)}{50} \
sigma_u^2 &=& frac{105 - 72}{50} = frac{32}{50} = frac{16}{25} \
sigma_u &=& frac{4}{5} \
end{eqnarray*}

begin{eqnarray*}
sigma_v^2 &=& E( V^2 ) - u_v^2 = 1 - left( frac{4}{5} right)^2 = 1 - frac{16}{25} \
sigma_v^2 &=& frac{9}{25} \
sigma_v &=& frac{3}{5} \
Cov(U,V) &=& E(UV) - u_u u_v \
E(UV) &=& P(U=1)P(V=1)(1)(1) = left( frac{6}{5} right) left( frac{3}{5} right) \
E(UV) &=& frac{18}{25} \
Cov(U,V) &=& frac{18}{25} - left( frac{11}{10} right) left( frac{4}{5} right)
= frac{18}{25} - frac{44}{50} = frac{36-44}{50}\
Cov(U,V) &=& -frac{4}{25} \
rho(U,V) &=& frac{ -frac{4}{25} } { left( frac{4}{5} right) left( frac{3}{5} right) } =
frac{ -frac{4}{25} } { left( frac{12}{25} right) } \
rho(U,V) &=& -frac{1}{3} \
end{eqnarray*}

The book's answer is $-1$.










share|cite|improve this question













The problem below is from the book Introduction to Probability Theory
by Hoel, Port and Stone. The answer I
computed is different from the back of the book. I am wondering where I went wrong or if the book is wrong.

Problem:

A box has $3$ red balls and $2$ black balls. A random sample of size
$2$ is drawn
without replacement. Let $U$ by the number of red balls selected and let $V$ be
the number of black balls selected. Compute $rho(U,V)$.

Answer:
begin{eqnarray*}
rho(U,V) &=& frac{ Cov(U,V) } {sigma_u sigma_v } \
u_u &=& 2 P(U = 2) + 1P(U = 1) \
P(U = 2) &=& frac{3}{5} left( frac{2}{4} right) = frac{3}{10} \
%
P(U = 1) &=& frac{2}{5} left( frac{3}{4} right) + frac{3}{5} left( frac{2}{4} right) \
P(U = 1) &=& frac{6}{20} + frac{6}{20} = frac{6}{5} \
%
u_u &=& 2 left( frac{3}{10} right) + frac{1}{2} = frac{6}{10} + frac{5}{10} \
u_u &=& frac{11}{10} \
u_v &=& 2 P(V = 2) + 1P(V = 1) \
P(V = 2) &=& frac{2}{5} left( frac{1}{4} right) = frac{1}{10} \
P(V = 1) &=& frac{2}{5} left( frac{3}{4} right) + frac{3}{5} left( frac{2}{4} right) =
frac{6}{20} + frac{6}{20} \
P(V = 1) &=& frac{3}{5} \
u_v &=& 2 left( frac{1}{10} right) + frac{3}{5} = frac{1}{5} + frac{3}{5} \
u_v &=& frac{4}{5} \
E( U^2 ) &=& 2^2 P(U = 2) + 1^2 P(U = 1) \
E( U^2 ) &=& 4 left(frac{3}{10}right) + frac{1}{2} = frac{6}{5} + frac{1}{2} \
E( U^2 ) &=& frac{17}{10} \
E( V^2 ) &=& 2^2 P(V = 2) + 1^2 P(V = 1) = 4 P(V = 2) + P(V = 1) \
E( V^2 ) &=& 4 left( frac{1}{10} right) + frac{3}{5} = frac{4}{10} + frac{6}{10} \
E( V^2 ) &=& 1 \
sigma_u^2 &=& E( U^2 ) - u_u^2 = frac{17}{10} - ( frac{6}{5} ) ^ 2\
sigma_u^2 &=& frac{17}{10} - frac{36}{25} = frac{17(5) - 36(2)}{50} \
sigma_u^2 &=& frac{105 - 72}{50} = frac{32}{50} = frac{16}{25} \
sigma_u &=& frac{4}{5} \
end{eqnarray*}

begin{eqnarray*}
sigma_v^2 &=& E( V^2 ) - u_v^2 = 1 - left( frac{4}{5} right)^2 = 1 - frac{16}{25} \
sigma_v^2 &=& frac{9}{25} \
sigma_v &=& frac{3}{5} \
Cov(U,V) &=& E(UV) - u_u u_v \
E(UV) &=& P(U=1)P(V=1)(1)(1) = left( frac{6}{5} right) left( frac{3}{5} right) \
E(UV) &=& frac{18}{25} \
Cov(U,V) &=& frac{18}{25} - left( frac{11}{10} right) left( frac{4}{5} right)
= frac{18}{25} - frac{44}{50} = frac{36-44}{50}\
Cov(U,V) &=& -frac{4}{25} \
rho(U,V) &=& frac{ -frac{4}{25} } { left( frac{4}{5} right) left( frac{3}{5} right) } =
frac{ -frac{4}{25} } { left( frac{12}{25} right) } \
rho(U,V) &=& -frac{1}{3} \
end{eqnarray*}

The book's answer is $-1$.







probability statistics






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 20 at 21:14









Bob

881514




881514












  • As I said in my answer $u_u$ is not $11/10$ but $12/10$.
    – Jean Marie
    Nov 23 at 21:41


















  • As I said in my answer $u_u$ is not $11/10$ but $12/10$.
    – Jean Marie
    Nov 23 at 21:41
















As I said in my answer $u_u$ is not $11/10$ but $12/10$.
– Jean Marie
Nov 23 at 21:41




As I said in my answer $u_u$ is not $11/10$ but $12/10$.
– Jean Marie
Nov 23 at 21:41










2 Answers
2






active

oldest

votes

















up vote
0
down vote



accepted










TIP: Never begin calculations until you have simplified equations.



(It reduces both workload and error accumulation .)



Here, make use of the fact that the total number of balls selected is two, so clearly $V=2-U$ .



$$begin{align}rho &=dfrac{mathsf{Cov}(U,V)}{sqrt{mathsf{Var}(U)~mathsf{Var}(V)~}}\&=dfrac{mathsf{Cov}(U,2-U)}{sqrt{mathsf{Var}(U)~mathsf{Var}(2-U)~}}\&=dfrac{-mathsf {Cov}(U,U)}{sqrt{mathsf{Var}(U)mathsf{Var}(U)}}\ &=-1end{align}$$



Which should be anticipated, because $U,V$ are perfectly linearly correlated, and negatively so.   The coefficient is a measure of linearity of correlation.






share|cite|improve this answer





















  • I do not understand why $COV(U,2 - U)$ is $-COV(U,U)$.
    – Bob
    Nov 21 at 21:51






  • 1




    It is due to the Bilinearity of Covariance. Also the covariance of a R.V. and a constant is zero. $$begin{align}mathsf {Cov}(aW+bX, cY+dZ)&=acmathsf {Cov}(W,Y)+admathsf {Cov}(W,Z)+bcmathsf {Cov}(X,Y)+bdmathsf {Cov}(X,Z)\[2ex]mathsf {Cov}(U, 2-U)&=2mathsf {Cov}(U,1)+(-1)mathsf {Cov}(U,U)\[1ex] &= 0-mathsf{Cov}(U,U)\[1ex] &= -mathsf{Var}(U)end{align}$$
    – Graham Kemp
    Nov 21 at 23:16




















up vote
0
down vote













Remark : The error you have done is in the calculation of the mean $E(U)$ of $U$. Check your computations, you will find that it is not $11/10$ but $2 times 3/10 + 1 times 6/10 = 12/10$, spoiling the rest of your computations.



The main thing I would like to show you is that computations are not needed here, because $U$ and $V$ are related by $U+V=2$ whence $V=2-U$ (technical name : antithetic variables). See remark at the bottom.



How is it possible without computations ? Here is an explanation that could be considered a little as handwaving but I think that it is essential to develop some intuition in these issues.



Let us take a statistical point of view : all the samples you will have in a $(u,v)$ plane are $(U,V)=(0,2)$ or $(1,1)$ or $(2,0)$ (with resp probabilities $0.3, 0.6, 0.1$, but this is unimportant for the following). The corresponding points are aligned on the straight line with equation $v=2-u$ (note already the negative slope).



enter image description here



If you are accustomed to see samples of bivariate distributions as clouds of points (see for example http://www.analytictech.com/mb313/correlat.htm), you should know that the correlation coefficient $rho$ gives a measure of narrowness of these clouds : the narrower the cloud, the closer $|rho|$ to $1$, the sign of $rho$ being positive or negative according to the sign of the slope of the principal axis of the cloud.



Here the narrowness is extreme with a negative slope ; thus $rho=-1$.



Remark : $U+V=2 implies E(U)+E(V)=2$. You have here a fire alarm that rings when you try to check $11/10+8/10 neq 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%2f3006909%2ffinding-a-correlation-for-a-pair-of-discrete-variables%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    TIP: Never begin calculations until you have simplified equations.



    (It reduces both workload and error accumulation .)



    Here, make use of the fact that the total number of balls selected is two, so clearly $V=2-U$ .



    $$begin{align}rho &=dfrac{mathsf{Cov}(U,V)}{sqrt{mathsf{Var}(U)~mathsf{Var}(V)~}}\&=dfrac{mathsf{Cov}(U,2-U)}{sqrt{mathsf{Var}(U)~mathsf{Var}(2-U)~}}\&=dfrac{-mathsf {Cov}(U,U)}{sqrt{mathsf{Var}(U)mathsf{Var}(U)}}\ &=-1end{align}$$



    Which should be anticipated, because $U,V$ are perfectly linearly correlated, and negatively so.   The coefficient is a measure of linearity of correlation.






    share|cite|improve this answer





















    • I do not understand why $COV(U,2 - U)$ is $-COV(U,U)$.
      – Bob
      Nov 21 at 21:51






    • 1




      It is due to the Bilinearity of Covariance. Also the covariance of a R.V. and a constant is zero. $$begin{align}mathsf {Cov}(aW+bX, cY+dZ)&=acmathsf {Cov}(W,Y)+admathsf {Cov}(W,Z)+bcmathsf {Cov}(X,Y)+bdmathsf {Cov}(X,Z)\[2ex]mathsf {Cov}(U, 2-U)&=2mathsf {Cov}(U,1)+(-1)mathsf {Cov}(U,U)\[1ex] &= 0-mathsf{Cov}(U,U)\[1ex] &= -mathsf{Var}(U)end{align}$$
      – Graham Kemp
      Nov 21 at 23:16

















    up vote
    0
    down vote



    accepted










    TIP: Never begin calculations until you have simplified equations.



    (It reduces both workload and error accumulation .)



    Here, make use of the fact that the total number of balls selected is two, so clearly $V=2-U$ .



    $$begin{align}rho &=dfrac{mathsf{Cov}(U,V)}{sqrt{mathsf{Var}(U)~mathsf{Var}(V)~}}\&=dfrac{mathsf{Cov}(U,2-U)}{sqrt{mathsf{Var}(U)~mathsf{Var}(2-U)~}}\&=dfrac{-mathsf {Cov}(U,U)}{sqrt{mathsf{Var}(U)mathsf{Var}(U)}}\ &=-1end{align}$$



    Which should be anticipated, because $U,V$ are perfectly linearly correlated, and negatively so.   The coefficient is a measure of linearity of correlation.






    share|cite|improve this answer





















    • I do not understand why $COV(U,2 - U)$ is $-COV(U,U)$.
      – Bob
      Nov 21 at 21:51






    • 1




      It is due to the Bilinearity of Covariance. Also the covariance of a R.V. and a constant is zero. $$begin{align}mathsf {Cov}(aW+bX, cY+dZ)&=acmathsf {Cov}(W,Y)+admathsf {Cov}(W,Z)+bcmathsf {Cov}(X,Y)+bdmathsf {Cov}(X,Z)\[2ex]mathsf {Cov}(U, 2-U)&=2mathsf {Cov}(U,1)+(-1)mathsf {Cov}(U,U)\[1ex] &= 0-mathsf{Cov}(U,U)\[1ex] &= -mathsf{Var}(U)end{align}$$
      – Graham Kemp
      Nov 21 at 23:16















    up vote
    0
    down vote



    accepted







    up vote
    0
    down vote



    accepted






    TIP: Never begin calculations until you have simplified equations.



    (It reduces both workload and error accumulation .)



    Here, make use of the fact that the total number of balls selected is two, so clearly $V=2-U$ .



    $$begin{align}rho &=dfrac{mathsf{Cov}(U,V)}{sqrt{mathsf{Var}(U)~mathsf{Var}(V)~}}\&=dfrac{mathsf{Cov}(U,2-U)}{sqrt{mathsf{Var}(U)~mathsf{Var}(2-U)~}}\&=dfrac{-mathsf {Cov}(U,U)}{sqrt{mathsf{Var}(U)mathsf{Var}(U)}}\ &=-1end{align}$$



    Which should be anticipated, because $U,V$ are perfectly linearly correlated, and negatively so.   The coefficient is a measure of linearity of correlation.






    share|cite|improve this answer












    TIP: Never begin calculations until you have simplified equations.



    (It reduces both workload and error accumulation .)



    Here, make use of the fact that the total number of balls selected is two, so clearly $V=2-U$ .



    $$begin{align}rho &=dfrac{mathsf{Cov}(U,V)}{sqrt{mathsf{Var}(U)~mathsf{Var}(V)~}}\&=dfrac{mathsf{Cov}(U,2-U)}{sqrt{mathsf{Var}(U)~mathsf{Var}(2-U)~}}\&=dfrac{-mathsf {Cov}(U,U)}{sqrt{mathsf{Var}(U)mathsf{Var}(U)}}\ &=-1end{align}$$



    Which should be anticipated, because $U,V$ are perfectly linearly correlated, and negatively so.   The coefficient is a measure of linearity of correlation.







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Nov 21 at 0:52









    Graham Kemp

    84.7k43378




    84.7k43378












    • I do not understand why $COV(U,2 - U)$ is $-COV(U,U)$.
      – Bob
      Nov 21 at 21:51






    • 1




      It is due to the Bilinearity of Covariance. Also the covariance of a R.V. and a constant is zero. $$begin{align}mathsf {Cov}(aW+bX, cY+dZ)&=acmathsf {Cov}(W,Y)+admathsf {Cov}(W,Z)+bcmathsf {Cov}(X,Y)+bdmathsf {Cov}(X,Z)\[2ex]mathsf {Cov}(U, 2-U)&=2mathsf {Cov}(U,1)+(-1)mathsf {Cov}(U,U)\[1ex] &= 0-mathsf{Cov}(U,U)\[1ex] &= -mathsf{Var}(U)end{align}$$
      – Graham Kemp
      Nov 21 at 23:16




















    • I do not understand why $COV(U,2 - U)$ is $-COV(U,U)$.
      – Bob
      Nov 21 at 21:51






    • 1




      It is due to the Bilinearity of Covariance. Also the covariance of a R.V. and a constant is zero. $$begin{align}mathsf {Cov}(aW+bX, cY+dZ)&=acmathsf {Cov}(W,Y)+admathsf {Cov}(W,Z)+bcmathsf {Cov}(X,Y)+bdmathsf {Cov}(X,Z)\[2ex]mathsf {Cov}(U, 2-U)&=2mathsf {Cov}(U,1)+(-1)mathsf {Cov}(U,U)\[1ex] &= 0-mathsf{Cov}(U,U)\[1ex] &= -mathsf{Var}(U)end{align}$$
      – Graham Kemp
      Nov 21 at 23:16


















    I do not understand why $COV(U,2 - U)$ is $-COV(U,U)$.
    – Bob
    Nov 21 at 21:51




    I do not understand why $COV(U,2 - U)$ is $-COV(U,U)$.
    – Bob
    Nov 21 at 21:51




    1




    1




    It is due to the Bilinearity of Covariance. Also the covariance of a R.V. and a constant is zero. $$begin{align}mathsf {Cov}(aW+bX, cY+dZ)&=acmathsf {Cov}(W,Y)+admathsf {Cov}(W,Z)+bcmathsf {Cov}(X,Y)+bdmathsf {Cov}(X,Z)\[2ex]mathsf {Cov}(U, 2-U)&=2mathsf {Cov}(U,1)+(-1)mathsf {Cov}(U,U)\[1ex] &= 0-mathsf{Cov}(U,U)\[1ex] &= -mathsf{Var}(U)end{align}$$
    – Graham Kemp
    Nov 21 at 23:16






    It is due to the Bilinearity of Covariance. Also the covariance of a R.V. and a constant is zero. $$begin{align}mathsf {Cov}(aW+bX, cY+dZ)&=acmathsf {Cov}(W,Y)+admathsf {Cov}(W,Z)+bcmathsf {Cov}(X,Y)+bdmathsf {Cov}(X,Z)\[2ex]mathsf {Cov}(U, 2-U)&=2mathsf {Cov}(U,1)+(-1)mathsf {Cov}(U,U)\[1ex] &= 0-mathsf{Cov}(U,U)\[1ex] &= -mathsf{Var}(U)end{align}$$
    – Graham Kemp
    Nov 21 at 23:16












    up vote
    0
    down vote













    Remark : The error you have done is in the calculation of the mean $E(U)$ of $U$. Check your computations, you will find that it is not $11/10$ but $2 times 3/10 + 1 times 6/10 = 12/10$, spoiling the rest of your computations.



    The main thing I would like to show you is that computations are not needed here, because $U$ and $V$ are related by $U+V=2$ whence $V=2-U$ (technical name : antithetic variables). See remark at the bottom.



    How is it possible without computations ? Here is an explanation that could be considered a little as handwaving but I think that it is essential to develop some intuition in these issues.



    Let us take a statistical point of view : all the samples you will have in a $(u,v)$ plane are $(U,V)=(0,2)$ or $(1,1)$ or $(2,0)$ (with resp probabilities $0.3, 0.6, 0.1$, but this is unimportant for the following). The corresponding points are aligned on the straight line with equation $v=2-u$ (note already the negative slope).



    enter image description here



    If you are accustomed to see samples of bivariate distributions as clouds of points (see for example http://www.analytictech.com/mb313/correlat.htm), you should know that the correlation coefficient $rho$ gives a measure of narrowness of these clouds : the narrower the cloud, the closer $|rho|$ to $1$, the sign of $rho$ being positive or negative according to the sign of the slope of the principal axis of the cloud.



    Here the narrowness is extreme with a negative slope ; thus $rho=-1$.



    Remark : $U+V=2 implies E(U)+E(V)=2$. You have here a fire alarm that rings when you try to check $11/10+8/10 neq 2$...






    share|cite|improve this answer



























      up vote
      0
      down vote













      Remark : The error you have done is in the calculation of the mean $E(U)$ of $U$. Check your computations, you will find that it is not $11/10$ but $2 times 3/10 + 1 times 6/10 = 12/10$, spoiling the rest of your computations.



      The main thing I would like to show you is that computations are not needed here, because $U$ and $V$ are related by $U+V=2$ whence $V=2-U$ (technical name : antithetic variables). See remark at the bottom.



      How is it possible without computations ? Here is an explanation that could be considered a little as handwaving but I think that it is essential to develop some intuition in these issues.



      Let us take a statistical point of view : all the samples you will have in a $(u,v)$ plane are $(U,V)=(0,2)$ or $(1,1)$ or $(2,0)$ (with resp probabilities $0.3, 0.6, 0.1$, but this is unimportant for the following). The corresponding points are aligned on the straight line with equation $v=2-u$ (note already the negative slope).



      enter image description here



      If you are accustomed to see samples of bivariate distributions as clouds of points (see for example http://www.analytictech.com/mb313/correlat.htm), you should know that the correlation coefficient $rho$ gives a measure of narrowness of these clouds : the narrower the cloud, the closer $|rho|$ to $1$, the sign of $rho$ being positive or negative according to the sign of the slope of the principal axis of the cloud.



      Here the narrowness is extreme with a negative slope ; thus $rho=-1$.



      Remark : $U+V=2 implies E(U)+E(V)=2$. You have here a fire alarm that rings when you try to check $11/10+8/10 neq 2$...






      share|cite|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        Remark : The error you have done is in the calculation of the mean $E(U)$ of $U$. Check your computations, you will find that it is not $11/10$ but $2 times 3/10 + 1 times 6/10 = 12/10$, spoiling the rest of your computations.



        The main thing I would like to show you is that computations are not needed here, because $U$ and $V$ are related by $U+V=2$ whence $V=2-U$ (technical name : antithetic variables). See remark at the bottom.



        How is it possible without computations ? Here is an explanation that could be considered a little as handwaving but I think that it is essential to develop some intuition in these issues.



        Let us take a statistical point of view : all the samples you will have in a $(u,v)$ plane are $(U,V)=(0,2)$ or $(1,1)$ or $(2,0)$ (with resp probabilities $0.3, 0.6, 0.1$, but this is unimportant for the following). The corresponding points are aligned on the straight line with equation $v=2-u$ (note already the negative slope).



        enter image description here



        If you are accustomed to see samples of bivariate distributions as clouds of points (see for example http://www.analytictech.com/mb313/correlat.htm), you should know that the correlation coefficient $rho$ gives a measure of narrowness of these clouds : the narrower the cloud, the closer $|rho|$ to $1$, the sign of $rho$ being positive or negative according to the sign of the slope of the principal axis of the cloud.



        Here the narrowness is extreme with a negative slope ; thus $rho=-1$.



        Remark : $U+V=2 implies E(U)+E(V)=2$. You have here a fire alarm that rings when you try to check $11/10+8/10 neq 2$...






        share|cite|improve this answer














        Remark : The error you have done is in the calculation of the mean $E(U)$ of $U$. Check your computations, you will find that it is not $11/10$ but $2 times 3/10 + 1 times 6/10 = 12/10$, spoiling the rest of your computations.



        The main thing I would like to show you is that computations are not needed here, because $U$ and $V$ are related by $U+V=2$ whence $V=2-U$ (technical name : antithetic variables). See remark at the bottom.



        How is it possible without computations ? Here is an explanation that could be considered a little as handwaving but I think that it is essential to develop some intuition in these issues.



        Let us take a statistical point of view : all the samples you will have in a $(u,v)$ plane are $(U,V)=(0,2)$ or $(1,1)$ or $(2,0)$ (with resp probabilities $0.3, 0.6, 0.1$, but this is unimportant for the following). The corresponding points are aligned on the straight line with equation $v=2-u$ (note already the negative slope).



        enter image description here



        If you are accustomed to see samples of bivariate distributions as clouds of points (see for example http://www.analytictech.com/mb313/correlat.htm), you should know that the correlation coefficient $rho$ gives a measure of narrowness of these clouds : the narrower the cloud, the closer $|rho|$ to $1$, the sign of $rho$ being positive or negative according to the sign of the slope of the principal axis of the cloud.



        Here the narrowness is extreme with a negative slope ; thus $rho=-1$.



        Remark : $U+V=2 implies E(U)+E(V)=2$. You have here a fire alarm that rings when you try to check $11/10+8/10 neq 2$...







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Nov 23 at 21:42

























        answered Nov 21 at 0:07









        Jean Marie

        28.6k41849




        28.6k41849






























            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%2f3006909%2ffinding-a-correlation-for-a-pair-of-discrete-variables%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

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...