1 of 22

Karl’s Pearson Correlation

Dr. Anshul Singh Thapa

2 of 22

Karl’s Pearson Correlation

  • The Pearson’s Correlation coefficient is usually calculated for two continuous variables. If either or both the variables are not continuous than some other statistical procedure are to be used.
  • Understanding product moment correlation requires understanding of mean, variance and covariance.

3 of 22

  • Mean: Mean of variable X and variable Y have to be calculated separately. Mean of variable is sum of scores divided by the number of observations.
  • Variance: The variance of variable X and variable Y have to be calculated separately. The variance of the variable is the sum of squares of the deviations of each score from the mean and divided by number of observation.
  • Covariance: the covariance is the number that indicates the association between the two variables. To compute covariance, deviation of each score of the variable from its mean and deviation of each score of the variable from its mean is initially calculated. Then product of these deviations are obtained. Then, these products are summated. This sum gives the numerator for covariance. Divide this sum by the number of observation. The resulting value is covariance.

4 of 22

Example

No. of years of schooling of farmers

X

Annual yield per acre in, 000 (Rs)

Y

0

4

2

4

4

6

6

10

8

10

10

8

12

7

5 of 22

Mean

(X)

Education

X

0

2

4

6

8

10

12

6 of 22

Mean

(X)

Education

X

(X - X)

0

-6

2

-4

4

-2

6

0

8

2

10

4

12

6

7 of 22

Mean

(X)

Variance

(X)

Education

X

(X - X)

(X - X)2

0

-6

36

2

-4

16

4

-2

4

6

0

0

8

2

4

10

4

16

12

6

36

8 of 22

Mean

(X)

Variance

(X)

Mean

(Y)

Education

X

(X - X)

(X - X)2

Annual Yield

Y

0

-6

36

4

2

-4

16

4

4

-2

4

6

6

0

0

10

8

2

4

10

10

4

16

8

12

6

36

7

9 of 22

Mean

(X)

Variance

(X)

Mean

(Y)

Education

X

(X - X)

(X - X)2

Annual Yield

Y

(Y - Y)

0

-6

36

4

-3

2

-4

16

4

-3

4

-2

4

6

-1

6

0

0

10

3

8

2

4

10

3

10

4

16

8

1

12

6

36

7

0

10 of 22

Mean

(X)

Variance

(X)

Mean

(Y)

Variance

(Y)

Education

X

(X - X)

(X - X)2

Annual Yield

Y

(Y - Y)

(Y – Y)2

0

-6

36

4

-3

9

2

-4

16

4

-3

9

4

-2

4

6

-1

1

6

0

0

10

3

9

8

2

4

10

3

9

10

4

16

8

1

1

12

6

36

7

0

0

11 of 22

Mean

(X)

Variance

(X)

Mean

(Y)

Variance

(Y)

Covariance

(XY)

Education

X

(X - X)

(X - X)2

Annual Yield

Y

(Y - Y)

(Y – Y)2

(X - X)

(Y - Y)

0

-6

36

4

-3

9

18

2

-4

16

4

-3

9

12

4

-2

4

6

-1

1

2

6

0

0

10

3

9

0

8

2

4

10

3

9

6

10

4

16

8

1

1

4

12

6

36

7

0

0

0

12 of 22

Mean

(X)

Variance

(X)

Mean

(Y)

Variance

(Y)

Covariance

(XY)

Education

X

(X - X)

(X - X)2

Annual Yield

Y

(Y - Y)

(Y – Y)2

(X - X)

(Y - Y)

0

-6

36

4

-3

9

18

2

-4

16

4

-3

9

12

4

-2

4

6

-1

1

2

6

0

0

10

3

9

0

8

2

4

10

3

9

6

10

4

16

8

1

1

4

12

6

36

7

0

0

0

ΣX = 42

Σ(X - X)2 = 112

ΣY = 49

Σ(Y – Y)2 = 38

Σ(X - X) (Y - Y) = 42

13 of 22

Mean

(X)

Variance

(X)

Mean

(Y)

Variance

(Y)

Covariance

(XY)

Education

X

(X - X)

(X - X)2

Annual Yield

Y

(Y - Y)

(Y – Y)2

(X - X)

(Y - Y)

0

-6

36

4

-3

9

18

2

-4

16

4

-3

9

12

4

-2

4

6

-1

1

2

6

0

0

10

3

9

0

8

2

4

10

3

9

6

10

4

16

8

1

1

4

12

6

36

7

0

0

0

ΣX = 42

Σ(X - X)2 = 112

ΣY = 49

Σ(Y – Y)2 = 38

Σ(X - X) (Y - Y) = 42

14 of 22

Mean

(X)

Variance

(X)

Mean

(Y)

Variance

(Y)

Covariance

(XY)

Education

X

(X - X)

(X - X)2

Annual Yield

Y

(Y - Y)

(Y – Y)2

(X - X)

(Y - Y)

0

-6

36

4

-3

9

18

2

-4

16

4

-3

9

12

4

-2

4

6

-1

1

2

6

0

0

10

3

9

0

8

2

4

10

3

9

6

10

4

16

8

1

1

4

12

6

36

7

0

0

0

ΣX = 42

Σ(X - X)2 = 112

ΣY = 49

Σ(Y – Y)2 = 38

Σ(X - X) (Y - Y) = 42

15 of 22

  • Where ;

ΣX = sum of all x scores

ΣY = sum of all y scores

ΣX2= sum of squared of all x scores

ΣY2 = sum of squared of all y scores

ΣXY = sum of multiplication of each x score by the corresponding y score

16 of 22

No. of years of schooling of farmers

X

Annual yield per acre in, 000 (Rs)

Y

0

4

2

4

4

6

6

10

8

10

10

8

12

7

17 of 22

X

Y

X2

0

4

0

2

4

4

4

6

16

6

10

36

8

10

64

10

8

100

12

7

144

18 of 22

X

Y

X2

Y2

0

4

0

16

2

4

4

16

4

6

16

36

6

10

36

100

8

10

64

100

10

8

100

64

12

7

144

49

19 of 22

X

Y

X2

Y2

XY

0

4

0

16

0

2

4

4

16

8

4

6

16

36

24

6

10

36

100

60

8

10

64

100

80

10

8

100

64

80

12

7

144

49

84

20 of 22

X

Y

X2

Y2

XY

0

4

0

16

0

2

4

4

16

8

4

6

16

36

24

6

10

36

100

60

8

10

64

100

80

10

8

100

64

80

12

7

144

49

84

ΣX = 42

ΣY = 49

ΣX2 = 364

ΣY2 = 381

ΣXY = 336

21 of 22

Calculate Correlation of Coefficient

X

Y

6

3

8

2

2

5

4

6

7

9

r = -0.151

22 of 22

Calculate Correlation of Coefficient

X

Y

1

5

5

6

6

7

8

9

10

12

r = 0.929