Professional Documents
Culture Documents
Scatter diagram
➢ A plot to illustrate diagrammatically any relationship that
may exist between two variables, namely the dependent
variable (Y) and the independent variable (X).
•
X
• •
• •
• •
•
BAMS1743 QUANTITATIVE METHODS
• •
••
• ••
No linear correlation
• •
•• • • •
• • • •
• • • • • •
28 8
25 9
BAMS1743 QUANTITATIVE METHODS
Scatter diagram
16
14
12
Food Expenditures
10
0
0 10 20 30 40 50 60
Income
(5m)
Comment: Strong positive linear correlation (2m)
𝑛 ∑ 𝑋𝑌−∑ 𝑋 ∑ 𝑌
r=
√[𝑛 ∑ 𝑋 2 −(∑ 𝑋)2 ] [𝑛 ∑ 𝑌 2 −(∑ 𝑌)2 ]
Eg 2: Given the sales calls and the number of units sold for 10
salesperson. Determine the correlation coefficient and
interpret the value.
Sales A B C D E F G H I J
person
Sales 14 35 22 29 6 15 17 20 12 29
calls
(X)
Unit 28 66 38 70 22 27 28 47 14 68
sold
(Y)
Soln:
X Y XY X2 Y2
14 28 392 196 784
35 66 2310 1225 4356
22 38 836 484 1444
29 70 2030 841 4900
6 22 132 36 484
15 27 405 225 729
17 28 476 289 784
20 47 940 400 2209
12 14 168 144 196
29 68 1972 841 4624
BAMS1743 QUANTITATIVE METHODS
X= 199 Y= 408 XY= 9661 X2= 4681 Y2= 20510
(0.5m) (0.5m) (1m) (1m) (1m)
𝑛 ∑ 𝑋𝑌−∑ 𝑋 ∑ 𝑌 10(9661)−(199)(408)
r= = √[10(4681)−(199) 2 ][10(20510)−(408)2 ]
(2m)
√[𝑛 ∑ 𝑋 2 −(∑ 𝑋)2 ] [𝑛 ∑ 𝑌 2 −(∑ 𝑌)2 ]
15418
= = 0.9238 (1m)
√(7209)(38636)
Soln:
X Y XY X2 Y2
5 190 950 25 36100
10 240 2400 100 57600
15 250 3750 225 62500
20 300 6000 400 90000
30 310 9300 900 96100
30 335 10050 900 112225
30 300 9000 900 90000
50 300 15000 2500 90000
50 350 17500 2500 122500
60 395 23700 3600 156025
X= 300 Y= 2970 XY= 97650 X2= 12050 Y2= 913050
𝑛 ∑ 𝑋𝑌−∑ 𝑋 ∑ 𝑌 10(97650)−(300)(2970)
r= = √[10(12050)−(300) 2 ][10(913050)−(2970)2 ]
√[𝑛 ∑ 𝑋 2 −(∑ 𝑋)2 ] [𝑛 ∑ 𝑌 2 −(∑ 𝑌)2 ]
85500
= = 0.8799
√(30500)(309600)
➢ Procedure:
Eg 5:
X R1 Y R2 d = (R1-R2) or (R2-R1) d2
23 6 245 4 2 4
35 5 236 6 -1 1
18 7 238 5 2 4
36 4 232 7 -3 9
41 3 250 2 1 1
43 2 247 3 -1 1
48 1 252 1 0 0
d 2 = 20
6 ∑ 𝑑2 6(20) 120
𝑟𝑠 = 1 − 𝑛(𝑛2 −1) = 1 - 7(72 −1) = 1 - 336 = 0.6429
Soln: a)
Scatter diagram
6
Female Ranking, Y 5
4
3
2
1
0
0 1 2 3 4 5 6
Male Ranking, X
R1 R2 d d2
b)
1 5 -4 16
4 1 3 9
3 2 1 1
2 4 -2 4
5 3 2 4 d 2= 34
6 ∑ 𝑑2 6(34) 204
𝑟𝑠 = 1 − 𝑛(𝑛2 −1)= 1 - 5(52 −1) = 1 - 120 = -0.7
Negative correlation
Soln:
X R1 Y R2 d d2
805 5.5 23 10 -4.5 20.25
777 8 62 2 6 36
820 2.5 60 3 -0.5 0.25
628 10 40 7 3 9
777 8 70 1 7 49
810 4 28 9 -5 25
805 5.5 30 8 -2.5 6.25
840 1 42 6 -5 25
777 8 55 4 4 16
820 2.5 51 5 -2.5 6.25
1m 1m d 2= 193 2m
6 ∑ 𝑑2 6(193) 1158
𝑟𝑠 = 1 − 𝑛(𝑛2 −1)= 1 - 10(102 −1) = 1 - = -0.17 2m
990
𝑛 ∑ 𝑋𝑌−∑ 𝑋 ∑ 𝑌
where b = (slope of the line)
𝑛 ∑ 𝑋 2 −(∑ 𝑋)2
∑𝑌 ∑𝑋
a= −𝑏 (y-intercept)
𝑛 𝑛
n = number of sample
BAMS1743 QUANTITATIVE METHODS
Eg 8: Refer to Eg 3.
(a) Find the least squares regression line of
maintenance cost on age and use this to predict
the maintenance cost for a machine of this type,
which is 40 months old.
(b) Plot the regression line.
(c) Predict the maintenance cost for a 40 months
old machine of this type graphically.
Soln:
(a) Least squares regression line of maintenance cost on
age: 𝑌̂ = 𝑎 + 𝑏𝑋 n = 10, X = Age,
Y=cost
BAMS1743 QUANTITATIVE METHODS
= 2.803
∑𝑌 ∑𝑋 2970 300
a= −𝑏 = − 2.803 ( 10 ) = 212.91
𝑛 𝑛 10
Scatter diagram
450
300
250
200
150
0 10 20 30 40 50 60 70
Age
BAMS1743 QUANTITATIVE METHODS
Scatter diagram
90
80
Marks obtained 70
60
50
40
30
20
10
0
0 10 20 30 40 50
No. hours
𝑛 ∑ 𝑋𝑌−∑ 𝑋 ∑ 𝑌 10(16636)−(272)(547)
r= = √[10(8596)−(272) 2 ][10(32993)−(547)2 ]
√[𝑛 ∑ 𝑋 2 −(∑ 𝑋)2 ] [𝑛 ∑ 𝑌 2 −(∑ 𝑌)2 ]
BAMS1743 QUANTITATIVE METHODS
17576
= = 0.9163
√(11976)(30721)
= 1.468
∑𝑌 ∑𝑋 547 272
a= −𝑏 = − 1.468 ( 10 ) = 14.770
𝑛 𝑛 10
Student 1 2 3 4 5 6 7 8 9 10
Push-ups 27 22 15 35 30 52 35 55 40 40
(X)
Sit-ups (Y) 30 26 25 42 38 40 32 54 50 43
BAMS1743 QUANTITATIVE METHODS
Step 4: Labels in first row → Check this box if you had entered the variable
name in your first cell.
Step 5: Output range → Key in one cell destination where your output will be
displayed.
Figure 1
BAMS1743 QUANTITATIVE METHODS
1. From the Regression Statistics, you can get the 𝑟 value by finding the square
root of R Square, 𝑟 = √0.70465805.
2. The Coefficients are values of a and b.
𝑎 = 14.90822536 𝑏 = 0.657885317
Hence, 𝑌̂= 14.9082 + 0.6579𝑋
Scatter Diagram
Step 1: Highlight both columns of data. On the Insert tab, click the
Scatter (X, Y) chart command button. Select the Chart
subtype that doesn’t include any lines as shown in Figure
2.
BAMS1743 QUANTITATIVE METHODS
Figure 2
Step 2: Right-click the x axis or y axis and click Format Axis. On the Format Axis
pane, set the desired Minimum and Maximum bounds as
appropriate. Additionally, you can change the Major units that control
the spacing between the gridlines.
Figure 3
Step 3: Add Axis Titles and a Trendline by clicking the Add Chart
Element Menu.
Figure 4
50
40
30
20
10 20 30 40 50 60
Push-ups
Figure 5
25