0% found this document useful (0 votes)
3 views

Individual Assignment 02 - Regression Analysis

The document outlines an individual assignment focused on regression analysis, specifically examining how the price of running a machine is influenced by its age, work time, and idle time. It includes data analysis, correlation assessments, univariate analyses, and predictions based on regression functions. The assignment also requires conducting a multivariate regression analysis and calculating errors for predicted versus actual values.

Uploaded by

moltenxxxxcore
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Individual Assignment 02 - Regression Analysis

The document outlines an individual assignment focused on regression analysis, specifically examining how the price of running a machine is influenced by its age, work time, and idle time. It includes data analysis, correlation assessments, univariate analyses, and predictions based on regression functions. The assignment also requires conducting a multivariate regression analysis and calculating errors for predicted versus actual values.

Uploaded by

moltenxxxxcore
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Individual Assignment 02 – Regression Analysis

Bipin Kumar Shah


Feb 21, 2025
Grade: 10 marks
It is realized that the Price of running a machine ($) depends on the age of the
machine, machine work time (time worked per batch), and machine idle time (time the
machine is ideal per batch).
Below is the data collected by the manufacturer for 21 different observations.

Age of the machine Machine work time Machine Idle time Price of running a machine
56 57 12 66.9
49 39 10.2 61.1
40 38 8.1 45
45 19 4.2 44.3
33 35 5 39
30 82 6.1 36.5
33 32 5.8 36.2
31 33 6 35
29 47 5 29
15 29 2.8 24.3
19 45 3.6 23
16 61 3.2 22.3
15 27 2.5 22.1
14 23 2.3 19.1
14 47 1.7 18
33 10 3.6 18
11 36 1.9 17.3
4 24 1.5 12.5
2 42 0.8 8
3 40 0.9 8
5 42 2.1 10

Based on the data, please answer the following questions:


1. State dependent and independent variables in the dataset provided.
From the given data we can find that dependent variable (Y) is price of running a machine and
the independent variables (X) are age of the machine, machine work time and machine idle time.
As the independent variables determines /effects how much price would it be to run the
machines.

2. Conduct correlation analysis for all inputs and outputs and interpret the result.

Age of the Machine work Machine Price of running a


machine time Idle time machine
Age of the
1
machine
Machine work
0.060389134 1
time
Machine Idle
0.907158112 0.28210797 1
time
Price of running
0.943436743 0.200569589 0.95231038 1
a machine

From the data analysis correlation calculation in excel we can analyze the results as follows:

a) Age of the machine vs. Machine work time: 0.060

This indicates a very weak positive correlation. There's almost no linear relationship
between the age of the machine and the time it's worked. Knowing the age of the machine
tells you virtually nothing about its work time, and vice-versa.

b) Age of the machine vs. Machine Idle time: 0.907

This is a very strong positive correlation. Older machines tend to have much more idle
time, which makes sense as older machines might be less reliable or efficient, leading to
more downtime.

c) Age of the machine vs. Price of running a machine: 0.943

This is also a very strong positive correlation. Older machines are significantly associated
with higher running costs because of the over time increased maintenance, repairs, and
potentially lower efficiency for older machines.

d) Machine work time vs. Machine Idle time: 0.282

This suggests a weak positive correlation. Which suggests that theres a slight chance for
machines with more work time to also have more idle time. However, the relationship is
not very strong.

e) Machine work time vs. Price of running a machine: 0.201


This indicates a weak positive correlation. This means there is only a slight chance that
machines with high work time will incur higher prices. However, this relationship is not
very strong.

f) Machine Idle time vs. Price of running a machine: 0.952

This is a very strong positive correlation. Machines with more idle time are strongly
associated with higher running costs. This is a very important data as it suggests that idle
time is sure to increase the cost of running a machine.

3. Conduct a univariate analysis for Price of running a machine vs Machine work time
(time worked per batch). Plot the observations in a scatter plot and state the
univariate regression function. Predict the Hourly Cost of running a machine for
Machine work time =20. Calculate the error (predicted minus actual) for each
observation.

Price of running a machine


80

70

60

50

40

30

20

10

0
0 10 20 30 40 50 60 70 80 90

Here the graph shows a weak positive trend, as indicated by the correlation.
From the above regression data we can use:
Intercept: 20.3185619 and Machine work time Coefficient: 0.209047277
So the univariate regression function is: Price = 20.3185619 + 0.209047277 * (Machine
work time)
Price = 20.3185619 + 0.209047277 * 20
Price = 20.3185619 + 4.18094554
Price = 24.49950744
Therefore, the predicted price of running a machine for a work time of 20 is
approximately $24.50.

Now for error Excel Calculation for all observations: (Predicted price – given price)

Machine work time Price of running a machine Predicted price Errror residual
57 66.9 32.23425669 -34.66574331
39 61.1 28.4714057 -32.6285943
38 45 28.26235843 -16.73764157
19 44.3 24.29046016 -20.00953984
35 39 27.6352166 -11.36478341
82 36.5 37.46043861 0.960438614
32 36.2 27.00807476 -9.191925236
33 35 27.21712204 -7.782877959
47 29 30.14378392 1.143783919
29 24.3 26.38093293 2.080932933
45 23 29.72568937 6.725689365
61 22.3 33.0704458 10.7704458
27 22.1 25.96283838 3.862838379
23 19.1 25.12664927 6.026649271
47 18 30.14378392 12.14378392
10 18 22.40903467 4.40903467
36 17.3 27.84426387 10.54426387
24 12.5 25.33569655 12.83569655
42 8 29.09854753 21.09854753
40 8 28.68045298 20.68045298
42 10 29.09854753 19.09854753

4. Conduct a univariate analysis for Price of running a machine vs Age. Plot the
observations in a scatter plot and state the univariate regression function. Predict the
Hourly Cost of running a machine for Age =12. Calculate the error (predicted minus
actual) for each observation.

5. Conduct a univariate analysis for Price of running a machine vs Machine Idle Time. Plot
the observations in a scatter plot and state the univariate regression function. Predict the
Hourly Cost of running a machine for machine ideal time= 4. Calculate the error
(predicted minus actual) for each observation.

6. Conduct a multivariate regression analysis.

o Take snapshots of your summary outputs. State the whole process from initiation
to getting the regression function (Hint: Look at p-values).
o State your final multivariate regression function.
o Predict the Price of running a machine for machine idle time = 15, age = 10 and
machine work time = 20
o Calculate error for each observation. ( Error = Predicted Value minus Actual)

Age of the machine Machine work time Machine Idle time Price of running a machine Error
56 57 12 66.9 ?
49 39 10.2 61.1 ?
40 38 8.1 45 ?
45 19 4.2 44.3 ?
33 35 5 39 ?
30 82 6.1 36.5 ?
33 32 5.8 36.2 ?
31 33 6 35 ?
29 47 5 29 ?
15 29 2.8 24.3 ?
19 45 3.6 23 ?
16 61 3.2 22.3 ?
15 27 2.5 22.1 ?
14 23 2.3 19.1 ?
14 47 1.7 18 ?
33 10 3.6 18 ?
11 36 1.9 17.3 ?
4 24 1.5 12.5 ?
2 42 0.8 8 ?
3 40 0.9 8 ?
5 42 2.1 10 ?

You might also like