What is a deviation vector?












1












$begingroup$


LINEAR ALGEBRA: I've looked online for this and can't find anything...
What is a deviation vector and how do I compute them? (specifically how did my teacher get those vectors in part b?)
Here is the problem I'm referring to:






  1. [4 points] Suppose we have nonnzero deviation vectors $vec x,vec y$ of two characteristics, such that $vec x=cvec y$. Show carefully what this implies about the correlation coefficient $r$ between the two characteristics.


  2. [6 points] Find the correlation coefficient between the daily profit and number of paintings inside three CA coffee shops.


$$begin{array}{|c|c|c|}
hline
text{Shop} & text{Profit (in 100s)} & text{Paintings} \hline
text{A} & -1 & 1 \hline
text{B} & -1 & 2 \hline
text{C} & 2 & 3 \hline
end{array}$$



Answer.




  1. We have that:


$$r=frac{vec xcdotvec y}{|vec x||vec y|}=frac{c(vec ycdotvec y)}{|c||vec y||vec y|}=frac{c}{|c|}=begin{cases} 1, & text{if }c>0, \ -1, & text{if }c<0. end{cases}$$





  1. [6 points] We find deviation vectors $vec x=(-1,-1,2)^T$ and $vec y=(-1,0,1)^T$. This gives:


$$r=frac{vec xcdotvec y}{|vec x||vec y|}=frac{3}{sqrt6sqrt2}left(=frac{sqrt3}{2}right).$$




Question image










share|cite|improve this question











$endgroup$

















    1












    $begingroup$


    LINEAR ALGEBRA: I've looked online for this and can't find anything...
    What is a deviation vector and how do I compute them? (specifically how did my teacher get those vectors in part b?)
    Here is the problem I'm referring to:






    1. [4 points] Suppose we have nonnzero deviation vectors $vec x,vec y$ of two characteristics, such that $vec x=cvec y$. Show carefully what this implies about the correlation coefficient $r$ between the two characteristics.


    2. [6 points] Find the correlation coefficient between the daily profit and number of paintings inside three CA coffee shops.


    $$begin{array}{|c|c|c|}
    hline
    text{Shop} & text{Profit (in 100s)} & text{Paintings} \hline
    text{A} & -1 & 1 \hline
    text{B} & -1 & 2 \hline
    text{C} & 2 & 3 \hline
    end{array}$$



    Answer.




    1. We have that:


    $$r=frac{vec xcdotvec y}{|vec x||vec y|}=frac{c(vec ycdotvec y)}{|c||vec y||vec y|}=frac{c}{|c|}=begin{cases} 1, & text{if }c>0, \ -1, & text{if }c<0. end{cases}$$





    1. [6 points] We find deviation vectors $vec x=(-1,-1,2)^T$ and $vec y=(-1,0,1)^T$. This gives:


    $$r=frac{vec xcdotvec y}{|vec x||vec y|}=frac{3}{sqrt6sqrt2}left(=frac{sqrt3}{2}right).$$




    Question image










    share|cite|improve this question











    $endgroup$















      1












      1








      1





      $begingroup$


      LINEAR ALGEBRA: I've looked online for this and can't find anything...
      What is a deviation vector and how do I compute them? (specifically how did my teacher get those vectors in part b?)
      Here is the problem I'm referring to:






      1. [4 points] Suppose we have nonnzero deviation vectors $vec x,vec y$ of two characteristics, such that $vec x=cvec y$. Show carefully what this implies about the correlation coefficient $r$ between the two characteristics.


      2. [6 points] Find the correlation coefficient between the daily profit and number of paintings inside three CA coffee shops.


      $$begin{array}{|c|c|c|}
      hline
      text{Shop} & text{Profit (in 100s)} & text{Paintings} \hline
      text{A} & -1 & 1 \hline
      text{B} & -1 & 2 \hline
      text{C} & 2 & 3 \hline
      end{array}$$



      Answer.




      1. We have that:


      $$r=frac{vec xcdotvec y}{|vec x||vec y|}=frac{c(vec ycdotvec y)}{|c||vec y||vec y|}=frac{c}{|c|}=begin{cases} 1, & text{if }c>0, \ -1, & text{if }c<0. end{cases}$$





      1. [6 points] We find deviation vectors $vec x=(-1,-1,2)^T$ and $vec y=(-1,0,1)^T$. This gives:


      $$r=frac{vec xcdotvec y}{|vec x||vec y|}=frac{3}{sqrt6sqrt2}left(=frac{sqrt3}{2}right).$$




      Question image










      share|cite|improve this question











      $endgroup$




      LINEAR ALGEBRA: I've looked online for this and can't find anything...
      What is a deviation vector and how do I compute them? (specifically how did my teacher get those vectors in part b?)
      Here is the problem I'm referring to:






      1. [4 points] Suppose we have nonnzero deviation vectors $vec x,vec y$ of two characteristics, such that $vec x=cvec y$. Show carefully what this implies about the correlation coefficient $r$ between the two characteristics.


      2. [6 points] Find the correlation coefficient between the daily profit and number of paintings inside three CA coffee shops.


      $$begin{array}{|c|c|c|}
      hline
      text{Shop} & text{Profit (in 100s)} & text{Paintings} \hline
      text{A} & -1 & 1 \hline
      text{B} & -1 & 2 \hline
      text{C} & 2 & 3 \hline
      end{array}$$



      Answer.




      1. We have that:


      $$r=frac{vec xcdotvec y}{|vec x||vec y|}=frac{c(vec ycdotvec y)}{|c||vec y||vec y|}=frac{c}{|c|}=begin{cases} 1, & text{if }c>0, \ -1, & text{if }c<0. end{cases}$$





      1. [6 points] We find deviation vectors $vec x=(-1,-1,2)^T$ and $vec y=(-1,0,1)^T$. This gives:


      $$r=frac{vec xcdotvec y}{|vec x||vec y|}=frac{3}{sqrt6sqrt2}left(=frac{sqrt3}{2}right).$$




      Question image







      linear-algebra correlation






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Jun 6 '16 at 14:00









      Martin Sleziak

      44.7k10118272




      44.7k10118272










      asked Jun 6 '16 at 8:59









      timtim

      61




      61






















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$

          Deviation typically means $X-E(X)$, where $E(X)$ is the expected value/mean.



          Notice that in the first column you have values $-1$, $-1$ and $2$. Their average is $0$, so after subtracting the average you get $vec x=(-1,-1,2)$.



          In the second column you have the values $1$, $2$ and $3$. The average of these values is $2$ after subtracting the average you get the values $1-2=-1$, $2-2=0$ and $3-2=1$. Your teacher written them into a single vector $vec y=(-1,0,1)$.



          The formula $$r=frac{vec xcdotvec y}{|vec x||vec y|}$$
          is then the formula for correlation coefficient. It is just written a bit differently. You can find this formula also in the Wikipedia article I linked above - in the section geometric interpretation. The example given there is very similar to this one. (Basically the only difference is that the Wikipedia article discusses uncentered and centered correlation coefficient.)






          share|cite|improve this answer











          $endgroup$













            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',
            autoActivateHeartbeat: false,
            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%2f1815602%2fwhat-is-a-deviation-vector%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









            0












            $begingroup$

            Deviation typically means $X-E(X)$, where $E(X)$ is the expected value/mean.



            Notice that in the first column you have values $-1$, $-1$ and $2$. Their average is $0$, so after subtracting the average you get $vec x=(-1,-1,2)$.



            In the second column you have the values $1$, $2$ and $3$. The average of these values is $2$ after subtracting the average you get the values $1-2=-1$, $2-2=0$ and $3-2=1$. Your teacher written them into a single vector $vec y=(-1,0,1)$.



            The formula $$r=frac{vec xcdotvec y}{|vec x||vec y|}$$
            is then the formula for correlation coefficient. It is just written a bit differently. You can find this formula also in the Wikipedia article I linked above - in the section geometric interpretation. The example given there is very similar to this one. (Basically the only difference is that the Wikipedia article discusses uncentered and centered correlation coefficient.)






            share|cite|improve this answer











            $endgroup$


















              0












              $begingroup$

              Deviation typically means $X-E(X)$, where $E(X)$ is the expected value/mean.



              Notice that in the first column you have values $-1$, $-1$ and $2$. Their average is $0$, so after subtracting the average you get $vec x=(-1,-1,2)$.



              In the second column you have the values $1$, $2$ and $3$. The average of these values is $2$ after subtracting the average you get the values $1-2=-1$, $2-2=0$ and $3-2=1$. Your teacher written them into a single vector $vec y=(-1,0,1)$.



              The formula $$r=frac{vec xcdotvec y}{|vec x||vec y|}$$
              is then the formula for correlation coefficient. It is just written a bit differently. You can find this formula also in the Wikipedia article I linked above - in the section geometric interpretation. The example given there is very similar to this one. (Basically the only difference is that the Wikipedia article discusses uncentered and centered correlation coefficient.)






              share|cite|improve this answer











              $endgroup$
















                0












                0








                0





                $begingroup$

                Deviation typically means $X-E(X)$, where $E(X)$ is the expected value/mean.



                Notice that in the first column you have values $-1$, $-1$ and $2$. Their average is $0$, so after subtracting the average you get $vec x=(-1,-1,2)$.



                In the second column you have the values $1$, $2$ and $3$. The average of these values is $2$ after subtracting the average you get the values $1-2=-1$, $2-2=0$ and $3-2=1$. Your teacher written them into a single vector $vec y=(-1,0,1)$.



                The formula $$r=frac{vec xcdotvec y}{|vec x||vec y|}$$
                is then the formula for correlation coefficient. It is just written a bit differently. You can find this formula also in the Wikipedia article I linked above - in the section geometric interpretation. The example given there is very similar to this one. (Basically the only difference is that the Wikipedia article discusses uncentered and centered correlation coefficient.)






                share|cite|improve this answer











                $endgroup$



                Deviation typically means $X-E(X)$, where $E(X)$ is the expected value/mean.



                Notice that in the first column you have values $-1$, $-1$ and $2$. Their average is $0$, so after subtracting the average you get $vec x=(-1,-1,2)$.



                In the second column you have the values $1$, $2$ and $3$. The average of these values is $2$ after subtracting the average you get the values $1-2=-1$, $2-2=0$ and $3-2=1$. Your teacher written them into a single vector $vec y=(-1,0,1)$.



                The formula $$r=frac{vec xcdotvec y}{|vec x||vec y|}$$
                is then the formula for correlation coefficient. It is just written a bit differently. You can find this formula also in the Wikipedia article I linked above - in the section geometric interpretation. The example given there is very similar to this one. (Basically the only difference is that the Wikipedia article discusses uncentered and centered correlation coefficient.)







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited Jun 6 '16 at 14:10

























                answered Jun 6 '16 at 14:05









                Martin SleziakMartin Sleziak

                44.7k10118272




                44.7k10118272






























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1815602%2fwhat-is-a-deviation-vector%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

                    Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

                    ts Property 'filter' does not exist on type '{}'

                    mat-slide-toggle shouldn't change it's state when I click cancel in confirmation window