Question
An organisation collected the following data of its employees: “years in employment” and “employee's salary”. Use R programming to fit a linear regression line to predict the effect of years in employment on the employee’s salary. Also, predict the salary of an employee who is employed for 11 years.
| Employee Number | Years in Employment | Employee Monthly salary in thousand Rs |
| 1 | 10 | 149 |
| 2 | 8 | 120 |
| 3 | 12 | 150 |
| 4 | 7 | 110 |
| 5 | 6 | 100 |
| 6 | 5 | 90 |
| 7 | 9 | 130 |
| 8 | 8 | 110 |
| 9 | 3 | 80 |
| 10 | 4 | 85 |
Answer :
Word Count : 609
Alright — we’ll do this *step-by-step manually* so no Python sneaks in. We’re fitting the simple linear regression model: $$ y = a + b x $$ where: * $x$ = Years in Employment * $y$ = Monthly salary (in thousand Rs) --- ## Step 1: Table Preparation We’ll calculate all the sums we need: $\sum x, \sum y, \sum xy, \sum x^2$ | Emp No. | $x$ | $y$ | $x^2$ | $xy$ | | ------- | --- | --- | ----- | ---- | | 1 | 10 | 149 | 100 | 1490 | | 2 | 8 | 120 | 64 | 960 | | 3 | 12 | 150 | 144 | 1800 | | 4 ________ ________ __________ ____ _________ _______ ______ __________ ___ ________.
________ __________ _____ ______ ______.
___ _______ ________ ______ ______ ___ _________.
_______ ______ ____ ____ ______.
_____ ________ _________ __________ __________ ___ _________ ______ _____.
____ _____ _________ __________ ______ ____ ____ _____.
___ ____ __________ ______ _________ _______ ______ _________ ___ ______ ___.
____ ____ ___ ________ _______.
______ ____ ____ ________ _______.
______ ___ ____ ________ ___ ________ _________ ___ ____ ________ __________.
____ ______ ___ ____ _____ _____ ____ __________ ________ _________ __________ ___.
_______ ___ ________ ________ _________.
_________ ________ ___ ___ _________ ___ _____ ____ _______ ________ _____ _____.
___ ____ _______ _____ ________ _____ ___.
___ ________ ____ ___ ___ _______.
_______ ___ ___ __________ __________ __________ ______ ______ ___ _____.
______ ______ ___ _________ ________.
_____ _____ ______ ___ _____ ________ ___.
________ ________ __________ ____ _____.
_________ _______ _____ ________ _____ ____ ____ __________.
________ ______ _____ _____ _________ _______ _______ ________ _____ ________ ______ __________.
___ _________ ________ _______ ________ ________ ______ _____ ________ ______ ____ __________.
________ ___ _________ ________ ____ ____ _____ _________.
_______ _______ _________ ________ ________ ___ ___.
_______ ____ _______ __________ ______.
_____ ___ __________ __________ _____ ___ ______.
_______ _____ ______ __________ _____ _________ ___ ______ ______ _______ _______ _______.
________ ____ _________ _________ _________ ________ _______ ________ _________ __________.
________ __________ _____ ___ _____ ______.
______ ____ ________ ____ ______ ______.
_____ _________ __________ ____ __________.
____ _______ ___ ____ ______.
____ ___ __________ __________ _____ ________ ______ __________ ____.
_________ _________ ______ _____ ________ _______.
____ _____ _____ __________ __________ _____.
_________ ___ __________ __________ _____ ____ ________ _________ ___ ________ ______.
____ ________ __________ _______ ________ __________ _____ _______ ______ ___ ________.
_____ __________ __________ _________ _____ _______ ____.
_____ _____ _______ __________ _____ _______.
_______ _______ _____ ____ ______ ____ ________.
_____ __________ ___ ___ __________ ______ __________ ___ __________ _____.
____ ___ _______ __________ ________.
___ _________ __________ ________ _______ ____ ___ __________ __________ ________.
_____ ________ ___ _____ ________ ________ _________.
______ __________ ____ ____ _______ ________ _________ _________ ___.
______ ____ ________ ___ __________ ____ ___ ___.
________ _______ _____ _________ _________ ______ _____ _______ ____ ______.
________ _______ ______ ____ __________ ________ __________ ______ ________.
________ ____ ______ _______ _______ ___ _______ ________ __________ ______ _________ ________.
________ _____ _________ ________ ________.
__________ _________ ____ _____ ________.
___ ______ _________ ___ ____ ________ _________ _______ ______ ____ _______ ______.
____ ____ ________ ________ ________ ______ __________ _________ _________ ______ _________ _____.
____ _________ ____ ___ ________ __________ ___ _____ _____ _______.
______ ______ ___ _______ ____.
____ ________ ______ ___ _____ ___ ______ ___.
_____ ________ __________ _________ ____ _____ ____ ___ ___ ___ ___ ____.
___ ___ _____ __________ ________.
____ _________ ________ _______ ____ ____ _____ _______ ___ ___ ______ __________.
_______ ____ ______ ____ ____ ____ ________.
______ __________ ___ _______.
Get Full Answer on WhatsApp
Alright — we’ll do this *step-by-step manually* so no Python sneaks in. We’re fitting the simple linear regression model: $$ y = a + b x $$ where: * $x$ = Years in Employment * $y$ = Monthly salary (in thousand Rs) --- ## Step 1: Table Preparation We’ll calculate all the sums we need: $\sum x, \sum y, \sum xy, \sum x^2$ | Emp No. | $x$ | $y$ | $x^2$ | $xy$ | | ------- | --- | --- | ----- | ---- | | 1 | 10 | 149 | 100 | 1490 | | 2 | 8 | 120 | 64 | 960 | | 3 | 12 | 150 | 144 | 1800 | | 4 ________ ________ __________ ____ _________ _______ ______ __________ ___ ________.
________ __________ _____ ______ ______.
___ _______ ________ ______ ______ ___ _________.
_______ ______ ____ ____ ______.
_____ ________ _________ __________ __________ ___ _________ ______ _____.
____ _____ _________ __________ ______ ____ ____ _____.
___ ____ __________ ______ _________ _______ ______ _________ ___ ______ ___.
____ ____ ___ ________ _______.
______ ____ ____ ________ _______.
______ ___ ____ ________ ___ ________ _________ ___ ____ ________ __________.
____ ______ ___ ____ _____ _____ ____ __________ ________ _________ __________ ___.
_______ ___ ________ ________ _________.
_________ ________ ___ ___ _________ ___ _____ ____ _______ ________ _____ _____.
___ ____ _______ _____ ________ _____ ___.
___ ________ ____ ___ ___ _______.
_______ ___ ___ __________ __________ __________ ______ ______ ___ _____.
______ ______ ___ _________ ________.
_____ _____ ______ ___ _____ ________ ___.
________ ________ __________ ____ _____.
_________ _______ _____ ________ _____ ____ ____ __________.
________ ______ _____ _____ _________ _______ _______ ________ _____ ________ ______ __________.
___ _________ ________ _______ ________ ________ ______ _____ ________ ______ ____ __________.
________ ___ _________ ________ ____ ____ _____ _________.
_______ _______ _________ ________ ________ ___ ___.
_______ ____ _______ __________ ______.
_____ ___ __________ __________ _____ ___ ______.
_______ _____ ______ __________ _____ _________ ___ ______ ______ _______ _______ _______.
________ ____ _________ _________ _________ ________ _______ ________ _________ __________.
________ __________ _____ ___ _____ ______.
______ ____ ________ ____ ______ ______.
_____ _________ __________ ____ __________.
____ _______ ___ ____ ______.
____ ___ __________ __________ _____ ________ ______ __________ ____.
_________ _________ ______ _____ ________ _______.
____ _____ _____ __________ __________ _____.
_________ ___ __________ __________ _____ ____ ________ _________ ___ ________ ______.
____ ________ __________ _______ ________ __________ _____ _______ ______ ___ ________.
_____ __________ __________ _________ _____ _______ ____.
_____ _____ _______ __________ _____ _______.
_______ _______ _____ ____ ______ ____ ________.
_____ __________ ___ ___ __________ ______ __________ ___ __________ _____.
____ ___ _______ __________ ________.
___ _________ __________ ________ _______ ____ ___ __________ __________ ________.
_____ ________ ___ _____ ________ ________ _________.
______ __________ ____ ____ _______ ________ _________ _________ ___.
______ ____ ________ ___ __________ ____ ___ ___.
________ _______ _____ _________ _________ ______ _____ _______ ____ ______.
________ _______ ______ ____ __________ ________ __________ ______ ________.
________ ____ ______ _______ _______ ___ _______ ________ __________ ______ _________ ________.
________ _____ _________ ________ ________.
__________ _________ ____ _____ ________.
___ ______ _________ ___ ____ ________ _________ _______ ______ ____ _______ ______.
____ ____ ________ ________ ________ ______ __________ _________ _________ ______ _________ _____.
____ _________ ____ ___ ________ __________ ___ _____ _____ _______.
______ ______ ___ _______ ____.
____ ________ ______ ___ _____ ___ ______ ___.
_____ ________ __________ _________ ____ _____ ____ ___ ___ ___ ___ ____.
___ ___ _____ __________ ________.
____ _________ ________ _______ ____ ____ _____ _______ ___ ___ ______ __________.
_______ ____ ______ ____ ____ ____ ________.
______ __________ ___ _______.
Get Full Answer on WhatsApp
IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★