We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Tutorials
  3. 10 Days of Statistics
  4. Day 7: Pearson Correlation Coefficient I
  5. Tutorial

Day 7: Pearson Correlation Coefficient I

Problem
Submissions
Leaderboard
Discussions
Editorial
Tutorial

Covariance

This is a measure of how two random variables change together, or the strength of their correlation.

Consider two random variables, and , each with values (i.e., , , , and , , , ). The covariance of and can be found using either of the following equivalent formulas:

Here, is the mean of (or ) and is the mean of (or ).

Pearson Correlation Coefficient

The Pearson correlation coefficient, , is given by:

Here, is the standard deviation of and is the standard deviation of . You may also see written as .

tutorial details


Tutorial By

AvimanyuSingh

Need Help?


View discussions
View editorial
View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy