Day 6: Correlation and Regression Lines #1

Sort 4 Discussions, By:

Sorry, you do not have a permission to answer to this question.

  • sarcalumenin 9 years ago + 1 comment

    Can someone explain why: r^2 = bxy × byx?

    Add Reply Preview cancel

    Sorry, you do not have a permission to answer to this question.

    • neild799 9 years ago + 0 comments

      Usually, we define

      b_xy = r * sy/sx

      where sy is the standard deviation of the y values and sx is the standard deviation of the x values.

      -

      Conversely, we could say that:

      b_yx = r * sx/sy

      -

      Rewrite both:

      r = b_xy * sx/sy

      r = b_yx * sy/sx

      -

      Then:

      r^2 = r*r = (b_xy * sx/sy)*(b_yx * sy/sx) = b_xy*b_yx

      as desired.

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

    • r49hu 9 years ago + 1 comment

      -0.75 is wrong answer, why?

      Add Reply Preview cancel

      Sorry, you do not have a permission to answer to this question.

      • rcolomina Asked to answer 9 years ago + 0 comments

        -0.75 is the right answer. I've got right when I submmited it.

        Add Reply Preview cancel

        Sorry, you do not have a permission to answer to this question.

      • Sepestious 9 years ago + 1 comment

        Im confused....isnt bxy -3/4 and byx -4/3? So if r is given by the root of the product of those two, shouldnt it be equal to 1?

        Add Reply Preview cancel

        Sorry, you do not have a permission to answer to this question.

        • AbhishekVermaIIT 9 years ago + 1 comment

          Actually byx is also -3/4 (not -4/3). Also, 'r' should be negative since both bxy and byx are negative !

          Add Reply Preview cancel

          Sorry, you do not have a permission to answer to this question.

          • Sepestious 9 years ago + 0 comments

            Thank you! I figured it out

            Add Reply Preview cancel

            Sorry, you do not have a permission to answer to this question.

        • tagore15 9 years ago + 2 comments

          What am I missing here?

          cor(x,y)^2=-4/3*-3/4=1
          cor(x,y)=-1  
          

          but it is not accepted this answer. Is it something related to output format?

          Add Reply Preview cancel

          Sorry, you do not have a permission to answer to this question.

          • rashmisethia89 9 years ago + 1 comment

            Even i am confused. Aren't you calculating the slope of the two lines? According the problem for the line of regression of y on x, slope should be -3/4 and for line of regression of x on y, the slope should be -3/4 also. Am I wrong?

            Add Reply Preview cancel

            Sorry, you do not have a permission to answer to this question.

            • AbhishekVermaIIT 9 years ago + 0 comments

              I guess you are missing the fact that sign of r would be same as that of bxy and byx. If you are submitting "k" as answer, try submitting "-k" !

              Add Reply Preview cancel

              Sorry, you do not have a permission to answer to this question.

            • AbhishekVermaIIT 9 years ago + 0 comments

              The slope (for both the lines) is -3/4. Correct that !

              Add Reply Preview cancel

              Sorry, you do not have a permission to answer to this question.

            1. Challenge Walkthrough
              Let's walk through this sample challenge and explore the features of the code editor.1 of 6
            2. Review the problem statement
              Each challenge has a problem statement that includes sample inputs and outputs. Some challenges include additional information to help you out.2 of 6
            3. Choose a language
              Select the language you wish to use to solve this challenge.3 of 6
            4. Enter your code
              Code your solution in our custom editor or code in your own environment and upload your solution as a file.4 of 6
            5. Test your code
              You can compile your code and test it for errors and accuracy before submitting.5 of 6
            6. Submit to see results
              When you're ready, submit your solution! Remember, you can go back and refine your code anytime.6 of 6
            1. Check your score