You are on page 1of 16

DPB1013 STATISTICS

CHAPTER 6 CORRELATION AND


REGRESSION
NAME : TEOH WEN QUIEN
REGISTRATION NUMBER :03DAT16F1008
CLASS : DAT1C
LECTURER : ZURINA BINTI ABDUL
KADIR

6.3 LINEAR CORRELATION


COEFFICIENT
Scatter gives some information on
relationship between two variables.
measures to evaluate the strength of
relationship.
Two methods are commonly used to
measure the strength of relationship:
-Pearsons product moment correlation
coefficient
-Spearmans rank correlation coefficient


*Pearsons

Product moment
correlation coefficient
*Normally denoted by r
*Used to measure the strength of the relationship

between two variables that are quantitative in


nature
*Formula of PPM
r=
*Magnitude of correlation lies between -1.0 to 1.0
(-1.0 r 1.0 )

The value of correlation coefficient


Value of r

Conclusion

-0.5-1

Perfect negative linear


correlation
Negative linear
correlation
Zero correlation/
non-linear correlation

-0.1-0.49
0
0.1-0.49
0.5-1

Positive linear
correlation
Perfect positive linear
correlation

Example
AGE X

GLUCOS
E LEVEL
Y

XY

X2

Y2

43

99

4257

1849

9801

21

65

1365

441

4225

25

79

1975

625

6241

42

75

3150

1764

5625

57

87

4959

3249

7569

59

81

4779

3481

6561

247

486

20485

11409

40022

SUBJEC
T

From our table:

x = 247
y = 486
y2= 40,022 n= 6

xy = 20,485x2= 11,409

The correlation coefficient = r=


=0.5298 (Perfectly positive linear correlation)

Example
The local ice cream shop keeps track of how much ice cream they sell
versus the temperature on that day, here are their figures for the last 5
days:

Ice Cream Sales vs Temperature


Temperature C
Ice Cream Sales (RM) xy
3053
14.2
215
5330
16.4
325
2201.5
11.9
185
15.2
332
5046.4
18.5
406
7511
76.2

1463

23141.9

201.64

46225

268.96

105625

141.61

34225

231.04

110224

342.25

164836

1185.5 461135

N=5 (x)(y)=111480.6
r=

r=0.95 (Perfectly positive linear correlation)

Spearman's rank correlation


coefficient
**Measure of association between two variables that
are at least of ordinal scale.
*Suitable for qualitative data
*Normally denoted by
*Formula for Spearmans rank Correlation
i= the
coefficient:
difference
between two
ranks

*The value of

is betweek -1.0 to 1.0 (-1.0 1.0 )

Value of p

Conclusion

P close to 1.0

Strong positive
linear association
between two
variables

P close to -1.0

Strong negative
association betwwen
two variables

P=0

Two variables not


related

Example
English
(mark)

Maths
(mark)

Rank
Rank
d
(English) (maths)

d2

56

66

25

75

70

45

40

10

10

71

60

62

65

64

56

16

58

59

80

77

76

67

61

63

2= 25+1+9+1+16+1+1
*d

=54
So, using the format

IQ,

86
97
99
100
101
103
106
110
112
113

Hours
ofTVper Rank(i)
week
0
20
28
27
50
29
7
17
6
12

1
2
3
4
5
6
7
8
9
10

Rank(ii)

1
6
8
7
10
9
3
5
2
4

0
4
5
3
5
3
4
3
7
6

0
16
25
9
25
9
16
9
49
36
=194

= -0.18(Strong positive linear


association between two
variables)

6.4 REGRESSION LINE


*In a scatter diagram, TWO axis are drawn on the

graph
*Value of independent variable(x) are plotted on
the horizontal axis ; value of dependent variable
(y) plotted on vertical axis.
*Scatter are enable to access if there is a
relationship between two variables.

*
Format
of Regression Line

slope of the line isb, andais the


intercept (the value ofywhenx= 0)
Format to find out

Format to find out


-

X Value

Y Value

X*Y

X*X

60

3.1

60 * 3.1 =186

60 * 60 =
3600

61

3.6

61 * 3.6 =
219.6

61 * 61 =
3721

62

3.8

62 * 3.8 =
235.6

62 * 62 =
3844

63

63 * 4 = 252

63 * 63 =
3969

65

4.1

65 * 4.1 =
266.5

65 * 65 =
4225

approximate
y value for the variable x = 64
*
X = 311 Y = 18.6 XY = 1159.7 X2 =
19359

= 8.098 + 0.19(64)
= 20.258

You might also like