You are on page 1of 20

MCP 1607

Reg. No: 213348645

Contents

1. Introduction

2. Answer to Question 1

3. Answer to Question 2

4. Answer to Question 3

5. Answer to Question 4

6. Answer to Question 5

10

7. Answer to Question 6

11

8. Answer to Question 7

12

9. Answer to Question 8

14

10. Answer to Question 9

16

11. Marking Scheme and Comments

19

Page 1 of 20

MCP 1607

Reg. No: 213348645

1. Introduction

Quantitative Analysis is a vital part of any problem solving, be it from Engineering, Economics,
Logistics or Business Analysis. It enables us to glean information from statistical and other
analytical methods by which we can deduce much information that are otherwise not easily seen.
In business analysis, it is vital to extract information about correlation of data, i.e, whether the
sales quantities are related to weather, marketing poll results, changes in the economic landscape
or even changes in the political arena. To this end, it is necessary to perform regression analysis
before we can proceed any further. This assignment is focused on this area of data analysis/
The following sections comprise the answers to this assignment. This is a part of assignments for
Cohort No. 10.

Page 2 of 20

MCP 1607

Reg. No: 213348645

The following is the data table that is referred to in the ensuing answers.

Machine

Age

Number
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

(Years)
2
7.4
5.3
18
11.5
6.4
14.3
10.2
21
3.4
2.9
9.3
13.7
16.2
4.6

Fuel
Consumption
(Ltr)
22
61
42
222
110
51
153
93
288
30
26
81
143
187
37

1. Plot the data on graph paper, consider age of machine as X and fuel consumption as Y

The plot is shown in the next page.

Page 3 of 20

MCP 1607

Reg. No: 213348645

Page 4 of 20

MCP 1607

Reg. No: 213348645

2. Calculate the correlation coefficient between x and y.

n. xy x y

(1)

[n x 2 ( x )2 ].[n y 2 ( y ) 2 ]

We refer the following table for this calculation:

Machine

Age-x

Fuel Consumptiony

Number

(Years)

(Ltr)

xy

x2

y2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

2
7.4
5.3
18
11.5
6.4
14.3
10.2
21
3.4
2.9
9.3
13.7
16.2
4.6

22
61
42
222
110
51
153
93
288
30
26
81
143
187
37

44
451.4
222.6
3996
1265
326.4
2187.9
948.6
6048
102
75.4
753.3
1959.1
3029.4
170.2

2
7.4
5.3
18
11.5
6.4
14.3
10.2
21
3.4
2.9
9.3
13.7
16.2
4.6

22
61
42
222
110
51
153
93
288
30
26
81
143
187
37

4
54.76
28.09
324
132.25
40.96
204.49
104.04
441
11.56
8.41
86.49
187.69
262.44
21.16

484
3721
1764
49284
12100
2601
23409
8649
82944
900
676
6561
20449
34969
1369

xy

x2

y2

1911.34

249880

21579.3

Page 5 of 20

146.2

1546

MCP 1607

Reg. No: 213348645

Where

15

Therefore, the correlation coefficient, r is calculated from eq. (1) to be


r=

(15*21579.3-146.2*1546)/SQRT((15*1911.34-146.2*146.2)*(15*249880-1546*1546))

r=

0.981160898

0.9812

(rounded to 4 decimal places)

3. Construct the regression equation of the from

y = a + bx

We note that in the regression equation of the form


=

+ .

..(2)

used to derive the line (in a linear sense) of best fit, the coefficients are derived as
=

.( . ) .
.
( )

..(3)

..(4)

Page 6 of 20

MCP 1607

Reg. No: 213348645

Consider the following table values for this calculation:

Machine

Age-x

Number (Years)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

2
7.4
5.3
18
11.5
6.4
14.3
10.2
21
3.4
2.9
9.3
13.7
16.2
4.6

Fuel
Cons.-y

(Ltr)

xy

x2

y2

22
61
42
222
110
51
153
93
288
30
26
81
143
187
37

2
7.4
5.3
18
11.5
6.4
14.3
10.2
21
3.4
2.9
9.3
13.7
16.2
4.6
_

22
61
42
222
110
51
153
93
288
30
26
81
143
187
37
_

44
451.4
222.6
3996
1265
326.4
2187.9
948.6
6048
102
75.4
753.3
1959.1
3029.4
170.2

2
7.4
5.3
18
11.5
6.4
14.3
10.2
21
3.4
2.9
9.3
13.7
16.2
4.6

22
61
42
222
110
51
153
93
288
30
26
81
143
187
37

4
54.76
28.09
324
132.25
40.96
204.49
104.04
441
11.56
8.41
86.49
187.69
262.44
21.16

484
3721
1764
49284
12100
2601
23409
8649
82944
900
676
6561
20449
34969
1369

xy

x2

y2

1911.34

249880

x
y
9.746667 103.0667

21579.3

146.2

1546

From eq. (3), b is calculated as (rounded off to 4 decimal points)


= 13.3866
From eq. (4), a is calculated as (rounded off to 4 decimal points)
= 27.4084
Therefore, the regression equation for the linear best-fit of the above data points is
=

Page 7 of 20

MCP 1607
4.

Reg. No: 213348645

Draw the regression line on the same graph

The plot for this answer is given in the next page:

Page 8 of 20

MCP 1607

Reg. No: 213348645

Page 9 of 20

MCP 1607

Reg. No: 213348645

5. Calculate R2 value that measures the goodness of fit.

Referring to the values in the following table:

Using the equation

=1

..(5)

Where
sse

Sum of Squared Errors

3379.211028

Sum of Squared Totals

and
sst

=
=

90538.933333

Therefore, from eq. (5), the coefficient of determination is (rounded to 4 decimal places)

= 0.9627
Page 10 of 20

MCP 1607

Reg. No: 213348645

6. In respect of each of the observations on age calculate the residual.

The residual values are calculated as per the following table.

Machine

Age-x

Fuel Cons.y

Number

(Years)

(Ltr)

1
2

2
7.4

22
61

3
4

5.3
18

Residuals
x

xy

x2

2
7.4

22
61

44
451.4

4
54.76

42
222

5.3 42
18 222

222.6
3996

28.09
324

11.5

110

11.5 110

6.4

51

7
8
9
10
11

14.3
10.2
21
3.4
2.9

12

9.3

81

13

13.7

143

14
15

16.2
4.6

187 16.2 187 3029.4 262.44


37 4.6 37 170.2 21.16

6.4

51

1265 132.25
326.4

40.96

153 14.3 153 2187.9 204.49


93 10.2 93 948.6 104.04
288
21 288
6048
441
30 3.4 30
102
11.56
26 2.9 26
75.4
8.41
9.3

81

753.3

86.49

13.7 143 1959.1 187.69

Page 11 of 20

y2

484 0.635092644 22.63509264


3721 71.6527086 -10.6527086
1764 43.54078589 1.540785892
49284 213.5509851 8.449014894
12100 126.537891 16.53789102
2601 58.26607874 7.266078737
23409 164.0204546 11.02045463
8649 109.1352722 -16.1352722
82944 253.7108747 34.28912532
900 18.10618916 11.89381084
676 11.41287423 14.58712577
6561 97.08730533 16.08730533
20449 155.9884767 12.98847671
34969 189.4550514 2.455051359
1369 34.17014499 2.82985501

MCP 1607

Reg. No: 213348645

7. a) Calculate the mean of the residuals.


Mean of residuals

)
15
1.56319401867222E-14

b) Draw histogram of the residuals and comment on the results (use three class intervals)

With regard to the residual range:


Maximum

34.2891253155987

Minimum

-16.5378910201407

Span

50.8270163357394

So the BIN ranges are as follows:


Range-1

-16.5378910201407

0.40444775843908

Range-2

0.40444775843908

17.3467865370189

Range-3

17.3467865370189

34.2891253155987

Bin (Residual Value)


0.404447758
17.34678654
34.28912532
More

Frequency
9
4
2
0

Page 12 of 20

MCP 1607

Reg. No: 213348645

Page 13 of 20

MCP 1607

Reg. No: 213348645

Remarks:

1. The residuals do not show a normal distribution ( This violates the 1st assumption of regression
analysis).
2. Therefore, the linear regression model we selected is incorrect (not suitable) to represent and
analyze this data set.

08. Draw another graph with x as machine number and y as residual and comment on the
result.

The plot is given in the next page:

Page 14 of 20

MCP 1607

Reg. No: 213348645

Page 15 of 20

MCP 1607

Reg. No: 213348645

Remarks:

The residuals seem to be randomly distributed about zero (0).

The residuals do not seem to follow any pattern and seem to be independent of the
Machine Numbers.

09. Calculate the correlation coefficient between x (value of age) and residual and comment
on the result.

We refer the following table with calculations for this answer:

Machine

Age-x

Residualy

Number (Years)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

2
7.4
5.3
18
11.5
6.4
14.3
10.2
21
3.4
2.9
9.3
13.7
16.2
4.6

22.63509
-10.6527
-1.54079
8.449015
-16.5379
-7.26608
-11.0205
-16.1353
34.28913
11.89381
14.58713
-16.0873
-12.9885
-2.45505
2.829855

xy

x2

y2

45.27
-78.83
-8.166
152.08
-190.2
-46.5
-157.6
-164.6
720.07
40.439
42.303
-149.6
-177.9
-39.77
13.017

2
7.4
5.3
18
11.5
6.4
14.3
10.2
21
3.4
2.9
9.3
13.7
16.2
4.6

22.635
-10.65
-1.541
8.449
-16.54
-7.266
-11.02
-16.14
34.289
11.894
14.587
-16.09
-12.99
-2.455
2.8299

4
54.76
28.09
324
132.25
40.96
204.49
104.04
441
11.56
8.41
86.49
187.69
262.44
21.16

512.35
113.48
2.374
71.386
273.5
52.796
121.45
260.35
1175.7
141.46
212.78
258.8
168.7
6.0273
8.0081

xy

x2

y2

4.64E-12

Page 16 of 20

146.2

2.34E-13

1911.34 3379.211

MCP 1607

Reg. No: 213348645

Correlation Coefficient, r is calculated as


Using the values calculated in the above table and
the following equation:

r=

r=

1.83514E-15

Note: Please refer next page for the plot of the residuals vs. machine age.

Remarks:
1. The Correlation coefficient of zero means that the residuals are not linearly correlated with
machine age. Therefore, the residuals and the independent variables are independent of each
other.
2. Also, they are randomly distributed about their mean, 0. This means that it obeys the 2nd
assumption of regression analysis.
3. Therefore, our model of regression is correct.
4. However, from the plot given in the next page, it is obvious that they are non-linearly
correlated
5. Therefore, our linear regression model is incorrect
6. We should apply a non-linear regression model to analyze this set of data

Page 17 of 20

MCP 1607

Reg. No: 213348645

Page 18 of 20

MCP 1607

10.

Reg. No: 213348645

Marking Scheme and Comments

Learning
Outcome/ Question

Maximum Weightage

Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Question 8
Question 9
Total Marks

100%

Page 19 of 20

First Marker

Second Marker

MCP 1607

Reg. No: 213348645

1st Markers comments: _____________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

Moderators comments: _____________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

Page 20 of 20

You might also like