Hamza Al Katranji - S3696451
Work experience is an important factor that usually affect employee salary. Employers usually consider experience as a predictive measure of performance for the employee role in the company. Thus, it is anticipated that an employee experience will be an essentail factor that affects the ability of individuals to get a job, affects their starting salary, and plays a role in determining increments and promotions. (Dash et.al, 2017)
There is a typical fact that, the more experience someone has specific to the job he/she is starting, the more he/she'll know about the position, making that person more valuable to the company.
This report intends to analyse how this relationship behaves and how to measure it statistically. In this analysis, the author attempt to cover these areas with a well known statistical method.
In this analysis, the author tried to answer the question:
Is there a significant relationship between employee salary and employee years of experience?
A simple linear regression equation will be as: \[y= \beta_0 + \beta_1x \]
Where \(\beta_0\) is the intercept and \(\beta_1\) is the coefficient of independent variable}
There are two columns YearsExperience and Salary
Data Summary
## YearsExperience Salary
## Min. : 1.100 Min. : 37731
## 1st Qu.: 3.450 1st Qu.: 57019
## Median : 5.300 Median : 81363
## Mean : 6.309 Mean : 83946
## 3rd Qu.: 9.250 3rd Qu.:113224
## Max. :13.500 Max. :139465
There are no outliers in the dataset
any(is.na(data))
## [1] FALSE
There are no missing vaues in the dataset
##
## Pearson's product-moment correlation
##
## data: data$YearsExperience and data$Salary
## t = 30.237, df = 33, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.9651673 0.9911731
## sample estimates:
## cor
## 0.9824273
For further analysis of the data, the dataset is splited into two sets a training set and a test set.
The first few rows of the each set are as follows:
##
## Call:
## lm(formula = Salary ~ YearsExperience, data = training_set)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8470 -4293 244 3200 12700
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 28864.3 2349.0 12.29 2.47e-12 ***
## YearsExperience 8810.6 343.2 25.67 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 6235 on 26 degrees of freedom
## Multiple R-squared: 0.9621, Adjusted R-squared: 0.9606
## F-statistic: 659.1 on 1 and 26 DF, p-value: < 2.2e-16
Breusch-Pagan test to check for heteroscedasticity
##
## studentized Breusch-Pagan test
##
## data: lm1
## BP = 0.37999, df = 1, p-value = 0.5376
## Mean Absolute Error: 5151.473
## Mean Square Error: 32305371
## Root Mean Square Error: 5683.781
## R-squared: 0.9692507
Mihir Dash & Suprabha Bakshi & Aarushi Chugh, 2017. "The Relationship Between Work Experience and Employee Compensation: A Case Study of the Indian IT Industry," Journal of Applied Management and Investments, Department of Business Administration and Corporate Security, International Humanitarian University, vol. 6(1), pages 5-10, February.
https://support.rstudio.com/hc/en-us/articles/200486468-Authoring-R-Presentations#:~:text=%20Authoring%20Content%20%201%20Formatted%20Text.%20Content,you%20want%20to%20float%20an%20image...%20More%20
https://work.chron.com/factors-affect-starting-salary-8712.html