#!/usr/bin/env python # coding: utf-8 # **Business Problem Summary:** # # As a data scientist at a growing startup, one of the challenges is establishing a fair and consistent pay scale across all roles while considering employees' years of experience. Currently, each staff member negotiates their salary independently, and the company lacks both a structured pay scale and defined job levels. # # Currently, there's no structured pay system in place, and all employees negotiated their salaries individually, leading to lot of discrepancies and biases in offers to new hires. # # The aim is to introduce a transparent pay scale that categorizes roles based on years of experience, ensuring that new hires are not unfairly compensated compared to existing employees. # # # **Business Problem Details:** # 1. **Creating a fair salary framework::** The objective is to create a fair and transparent pay scale that categorizes roles based on years of experience, ensuring consistency and equality in compensation across the organization. # # 2. **Introduction of Job Levels:** By categorizing roles into job levels based on years of experience (e.g., 0-2 years as Analyst, 2-4 years as Associate, etc.), the organization aims to provide a structured framework for salary determination. # # # **To arrive at a fair pay scale, salary data of current staff and their years of experiences are used** # In[144]: import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # In[145]: df = pd.read_csv(r"C:\Users\Teni\Desktop\Datasets May-April\Salary_dataset.csv") # In[158]: df.head() # In[160]: df.describe() # In[168]: sns.regplot(data=df, x= 'YearsExperience', y = 'Salary') # at experience 0, the data shows the salary is just below 40000 (start pay) # **- Much as the pay has always been individually negotiated, there's a linear reationship between the years of experience and the salaries** # In[169]: X = df['YearsExperience'] y = df['Salary'] # **Because the dataset has only one Feature, the Simple Linear Regression will be used.** # In[172]: # y = mx+b np.polyfit(X, y, deg=1) # the starting salary an 0-year expereince is #24848 # ### Predict using the equation # In[161]: pro_exp = np.linspace(1,10, 30) pro_exp # In[162]: pred_sal = 9449.96232146*pro_exp + 24848.20396652 pred_sal # In[163]: sns.scatterplot(data=df, x='YearsExperience', y='Salary') plt.plot(pro_exp, pred_sal, color='red') # **The HR team approached me, saying we have 2 new cabdidates whose years of experiences are 10 and 5; asking how much the offer should be** # In[182]: exp = 10 pred_sal = 9449.96232146*exp + 24848.20396652 print("For a 10-year work experience, the salary offer should be: $", round(pred_sal, 2)) # In[183]: exp=5 pred_sal = 9449.96232146*exp + 24848.20396652 print("For a 5-year work experience, the salary offer should be: $", round(pred_sal, 2)) # ### Conclusion: # # By aligning roles with these well-defined job levels, the organization provides a transparent roadmap for career advancement. By using the equation (y = m*(years of experience) + b), managers are able to negotiate fairly when hiring new talents- without ofshooting the payscale within the organization. # # # 1. **Fair and Transparent Pay Scale:** The proposed salary framework introduces a fair and transparent pay scale by using a polyfit equation derived from the array ([9449.96232146, 24848.20396652]). This equation, represented as y = mx + b, determines salaries (y) based on years of experience (x). By relying on this mathematical approach, the organization eliminates potential biases and ensures consistency in compensation across all roles and levels. # # 2. **Well-Defined Career Progression:** The framework establishes clear job levels, enabling structured career growth and progression within the organization. These job levels are: # # - a. Analyst: Covering professionals with 0-2 years of experience in their field. # - b. Associate: Encompassing individuals with 2-4 years of relevant experience. # - c. Senior Associate: For those with 4-6 years of demonstrated expertise. # - d. Lead: Recognizing professionals with 6-8 years of significant experience and leadership capabilities. # - e. Manager: Reserved for seasoned individuals with 8-10 years of extensive experience and managerial responsibilities. # # In[ ]: # In[ ]: