Correlation coefficient formula: Explanation and Solved Question

Jasmine Grover logo

Jasmine Grover

Education Journalist | Study Abroad Lead

The Correlation Coefficient formula in statistics is used to mathematically measure the relationship between two variables. The correlation coefficient can be calculated by various formulas, the most commonly used one is the Pearson’s correlation for linear regression. The other correlation coefficient formulas include Linear Correlation Coefficient Formula, Sample Correlation Coefficient Formula, and Population Correlation Coefficient Formula.

In this article, we will discuss about correlation coefficient formula and solve examples based on the correlation coefficient.

Keyterms: Correlation, Coefficient, Statistics, Linear Correlation, Sample Correlation, Population Correlation, Linear regression, Variables


What is coefficient of correlation?

[Click Here for Sample Questions]

The coefficient of correlation gives us a general idea about the relationship between two variables, whether or not they are correlated with each other. As we look into the correlation coefficient formula in the next sections you will notice that the returned value for the coefficient of correlation is always between -1 to +1.

Click here to learn other formulas of statistics.

  • The value of the correlation coefficient is positive (i.e. r > 0) when the two values in question are positively correlated to each other. In other words, with an increase in the value of one variable, the value of the other variable will increase as well.
  • Whereas, a negative correlation coefficient (r < 0) shows that the two values in question are negatively correlated to each other. In simple words, as the value of one variable increases the value of the other variable decreases.
  • When the correlation coefficient is equal to zero (r = 0), it shows that the variables are not correlated to each other at all.

Graph showing positive, negative, and no correlation

Graph showing positive, negative, and no correlation


Pearson’s correlation coefficient formula

[Click Here for Sample Questions]

Pearson’s correlation coefficient is the most commonly used correlation coefficient formula. The value of correlation coefficient is denoted by ‘r’ which lies between -1 to +1.

The Pearson’s correlation coefficient formula is also known as the linear correlation coefficient formula.

Pearson’s correlation coefficient formula

\(r = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2] [n\sum y^2 - (\sum y)^2]}}\)

Where,

n = Quantity of Information

Σx = sum of values of x

Σy = sum of values of y

Σxy = Sum of the Product of first & Second Value

Σx2 = Sum of the Squares of the First Value

Σy2 = Sum of the Squares of the Second Value


Sample correlation coefficient formula

[Click Here for Sample Questions]

The Sample correlation coefficient formula is given below –

\(r_{xy} = \frac{S_{xy}}{S_xS_y}\)

Where,

Sx = sample standard deviation of x

Sy = sample standard deviation of y

Sxy = sample covariance


Population correlation coefficient formula

[Click Here for Sample Questions]

The population correlation coefficient is denoted by ρ (rho). The population correlation coefficient formula is –

\(\rho _{xy} = \frac{\sigma _{xy}}{\sigma _x \sigma_y}\)

Where,

σx and ρy = population standard deviations

σxy = population covariance


Relationship between covariance and correlation coefficient formula

[Click Here for Sample Questions]

Both covariance and correlation coefficient are methods to measure the relationship between two variables. The relation between correlation and covariance is given below:

Correlation = \(\frac{Cov (x,y)}{\sigma x * \sigma y}\)

Where,

σx and σy = standard deviations of x and y respectively

cov(x,y) = covariance

Learn more about variance and covariance here.


Things to remember

  • Correlation coefficient is typically used to measure the relationship between two variables.
  • The most commonly used correlation coefficient formula is the Pearson’s correlation coefficient formula also known as the linear correlation coefficient. The other two formulas are the sample correlation coefficient and the population correlation coefficient.
  • The value of correlation coefficient lies between +1 to -1. Positive value of the correlation coefficient indicates the two variables are positively correlated whereas, a negative value of the correlation coefficient indicates the variables are negatively correlated.
  • When the correlation coefficient is equal to zero, it indicates that the two variables are not correlated to each other.
  • The Pearson’s correlation coefficient is given by
\(r = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2] [n\sum y^2 - (\sum y)^2]}}\)
  • Sample correlation coefficient formula is given by-
\(r_{xy} = \frac{S_{xy}}{S_xS_y}\)
  • The population correlation coefficient formula is –
\(\rho _{xy} = \frac{\sigma _{xy}}{\sigma _x \sigma_y}\)
  • The relation between correlation and covariance is given below:
Correlation = \(\frac{Cov (x,y)}{\sigma x * \sigma y}\)

Solved questions

Ques 1. Calculate the correlation coefficient for the following data. X = 4, 8 ,12, 16 and Y = 5, 10, 15, 20. (5 marks)

Ans. Given variables are,

X = 4, 8 ,12, 16 and Y = 5, 10, 15, 20

Table for the required values.

x y x2 y2 xy
4 5 16 25 20
8 10 64 100 80
12 15 144 225 180
16 20 256 400 320
Σ x = 40 Σ y =50 480 750 600

According to the formula of Pearson’s correlation we have,

r(xy)= [(4×600)−(40×50)] / [√4(480)−402√4(750)−502]

Or, r(xy)=(2400−2000) / [√(1920−1600) x √(3000−2500)]

Or, r(xy)=400 / √320√500

Or, r(xy)=400 / 17.89×22.36

Or, r(xy)=400 / 400=1

Therefore, r(xy) = 1

Ques 2: Find the value of the correlation coefficient from the data given in the following table: (5 marks)
Find the value of the correlation coefficient from the data given in the following table

Ans. To calculate the correlation coefficient of the data given in the table, we need to construct a table with the values we need to put in the correlation coefficient formula:

\(r = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2] [n\sum y^2 - (\sum y)^2]}}\)

SUBJECT AGE (x) GLUCOSE LEVEL (y) xy x2 y2
1 43 99 4257 1849 9801
2 21 65 1365 441 4225
3 25 79 1975 625 6241
4 42 75 3150 1764 5625
5 57 87 4959 3249 7569
6 59 81 4779 3481 6561
Σ 247 486 20485 11409 40022

So, from the table we have,

  • n = 6
  • Σx = 247
  • Σy = 486
  • Σxy = 20,485
  • Σx2 = 11,409
  • Σy2 = 40,022

So, r(xy) = 6(20,485) – (247 × 486) / [√[[6(11,409) – (2472)] × [6(40,022) – 4862]]]

Or, = 2868 / 5413.36

Or, = 0.5298

Ques 3. The correlation coefficient of a set of data is found to be 0.8. The standard deviation of data set x (σx) = 1 , and standard deviation of data set y (σy) = 1.4. Find out the covariance of the data. (4 marks)

Ans. The relationship between correlation and covariance is given by –

Correlation = \(\frac{Cov (x,y)}{\sigma x * \sigma y}\)

Values given in the question are,

Correlation = 0.8

σx = 1

σy = 1.4

Therefore, cov(x,y) = 0.8 x 1 x 1.4

= 1.12

Ques 4. Calculate the correlation coefficient for the following data. X = 4, 10, 11, 15 and Y = 5, 9, 13, 14. (5 marks)

Ans. Given variables are,

X = 4, 10, 11, 15 and Y = 5, 9, 13, 14.

Table for the required values.

x y x2 y2 xy
4 5 16 25 20
10 9 100 81 90
11 13 121 169 143
15 24 225 576 360
Σ x = 40 Σ y =41 462 851 613

Putting the values in the correlation coefficient formula,

\(r = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2] [n\sum y^2 - (\sum y)^2]}}\)

Or, r = [(4 x 613) - (40 x 41)] / [√(4 x 462 - 402)(4 x 851 - 412)]

Or, r = 812 / 248 x 1723

Or, r = 812 / 427304

Or, r = 0.002

Ques 5. What is the significance of coefficient of correlation? (5 marks)

Ans. The coefficient of correlation tells us about how the two variables under observation are correlated to each other. The Pearson’s correlation coefficient is one of the most commonly used correlation coefficients. The value of the coefficient of correlation lies between -1 to +1.

When the value of the correlation coefficient is near -1, the two variables are said to be negatively correlated. Meaning with an increase in the value of one variable, the value of the second variable decreases.

Correlation coefficient equal to zero or near zero means that the variables are not correlated or weakly correlated.

The correlation coefficient value near 1 indicates that the variables are positively correlated. Meaning they are directly proportional to each other.

Ques 6. What does an r-value between – 0.2 to + 0.2 indicate? (5 marks)

Ans. The value of coefficient of correlation near 0 implies that the values are very weakly correlated with each other. When a dataset gives an r in the range -0.2 to +0.2, it indicates that they are weakly correlated to each other.

The correlation coefficient of -0.8 and 0.8 indicates that the dependent and independent variables are strongly correlated to each other.

Read Also: 

CBSE CLASS XII Related Questions

  • 1.
    Find:

    The principal value of \[ \sec^{-1}(\sqrt{2})+2\csc^{-1}(-2) \] is:

      • \(-\frac{\pi}{2}\)
      • \(-\frac{\pi}{4}\)
      • \(\frac{\pi}{4}\)
      • \(\frac{\pi}{2}\)

    • 2.

      Evaluate:
      \[ \int_{0}^{1} \frac{x \tan^{-1}x}{(1+x^2)^{3/2}}\,dx \]


        • 3.
          Differentiate \( \tan^{-1}\left( \frac{\sqrt{1 + x^2} + \sqrt{1 - x^2}}{\sqrt{1 + x^2} - \sqrt{1 - x^2}} \right) \) with respect to \( \cos^{-1}(x^2) \).


            • 4.
              Find: \[ \int \frac{x^2}{(x^2-1)(x^2+4)}\,dx \]


                • 5.
                  Find a point on the line \( \frac{x - 2}{3} = \frac{1 - y}{2} = \frac{z - 3}{2} \) at a distance of \( \sqrt{2} \) units from the point \( (1, 2, 3) \).


                    • 6.
                      If \( xy = e^{x - y} \), then find \( \frac{dy}{dx} \).

                        CBSE CLASS XII Previous Year Papers

                        Comments


                        No Comments To Show