Employee Attrition Project
IntroductionPermalink
Employee turnover (also known as attrition) can cause serious challenges. High turnover affects company finances, culture, and overall success. Some key problems caused by employee turnover are:
- Losing Important Knowledge: When experienced workers leave, they take valuable skills and knowledge of company processes with them. This can slow down productivity and innovation.
- Higher Costs: It’s expensive to find, hire, and train replacements. Advertising jobs, interviewing, and training can quickly add up.
- Low Team Morale: When employees often leave, teams experience uncertainty and stress. Remaining workers might feel overloaded or unhappy, reducing productivity.
- Harder to Attract Good Talent: Companies known for losing workers frequently often struggle to hire top talent. Potential hires might think the business is unstable or not a good place to work.
- Poor Company Reputation: High turnover can damage a company’s reputation and image, causing customers, partners, and employees to doubt company’s quality and leadership.
Identifying and Addressing High TurnoverPermalink
The goal of this project is to explore why people are leaving. By looking closely at the data, I hope to find patterns and reasons for employees leaving. I’ll then build a tool to predict who may leave soon so I can take action early.
Employee Turnover: The Big PicturePermalink
First, let’s look at employee turnover company-wide:
Overall Attrition RatePermalink

About 16% of employees left the company, while 84% stayed.
Turnover by Job RolesPermalink

Certain jobs have more turnover than others. Laboratory Technicians saw the highest total number of people leaving. Sales Representatives had the highest percent turnover rate (66%). Research Directors had the lowest turnover rate.
Turnover by DepartmentPermalink

The Research & Development department accounted for more than half (56%) of all employee turnover. The smallest amount of turnover came from Human Resources (less than 5%).
Important Factors That Influence TurnoverPermalink
Salary and Employee TurnoverPermalink

Employees who left were generally earning lower salaries compared to those who stayed. This clearly tells us pay is important when employees decide whether to stay or leave.
Employee Age and Time at CompanyPermalink

Younger employees with fewer years at the company are more likely to leave, while older, long-term employees usually stay. I can see these patterns clearly from the concentration of people marked in red in the lower-left corner of the plot above.
Work-Life Balance FactorsPermalink
I took a deeper look at several important factors related to employees’ work-life experiences:
Business Travel FrequencyPermalink

Employees who travel frequently for business purposes are clearly more likely to leave the company. Frequent travel likely causes higher stress and lower job satisfaction.
Commute Distance (How far employees live from work)Permalink

Employees who left were often living farther from the office. Although I can’t be sure commute distance alone causes turnover, it likely adds stress and impacts work-life balance, making employees more willing to leave.
Working OvertimePermalink

Working overtime clearly makes employees much more likely to leave. Regular overtime hours cause employees to burn out, feel stressed, and become unhappy at work.
Employee-rated Work-Life Balance SurveyPermalink

Employees who rated their own work-life balance lowest (rating “1”) were much more likely to leave the company. Better work-life balance ratings (2 and above) were linked to lower attrition.
Predicting Employee Turnover: Creating a Prediction ToolPermalink
Building the Prediction ModelPermalink
After exploring turnover patterns, I built a prediction model called a “Random Forest.” This model looks at different factors to predict who is more likely to leave. I checked how well it performed using common performance measures.
Prediction Model PerformancePermalink
The model was correctly able to predict if an employee would stay or go about 85% of the time.
| Metric | Value | Description | Performance Rating |
|---|---|---|---|
| Accuracy | 0.851 | Proportion of correct predictions | Good |
| Precision | 0.800 | Proportion of predicted attrition cases that were actual attrition | Good |
| ROC AUC | 0.822 | Area under the ROC curve (model's ability to distinguish classes) | Good |
When the prediction model identifies an employee likely to leave, it was correct around 80% of the time. This tool helps identify at-risk employees and allows managers to proactively address the reasons employees might leave.
Key Factors Predicting Employee TurnoverPermalink

Pay and Salary:
- Monthly Income is the most important factor, meaning fair salaries matter a great deal to employees.
- Other salary measures (daily, monthly, hourly pay) also predict turnovers, further showing that pay is critical.
Employee Age and Time at the Company:
- Younger employees and employees newer to the company are most likely to leave.
- Employees spending more years with the company or the same manager are more likely to stay longer, showing relationships at work matter.
Work-life Balance:
- Overtime hours strongly influence workers leaving because excessive overtime often leads to stress and dissatisfaction.
- Long commutes negatively influence employees to leave by weakening their work-life balance.
Recommendations to Reduce Employee TurnoverPermalink
Based on this analysis, here’s a clear set of actions the company should take to keep talented workers:
- Improve Pay: Ensure competitive pay and clear salary growth paths. Reward younger and newer employees who might be more prone to turnover.
- Better Work-life Balance: Lower overtime hours, offer remote or hybrid work arrangements, and reduce frequent business travels.
- Improve Management Relationships: Offer management training and start mentorship programs pairing new hires with experienced employees.
- Use the Prediction Tool: Regularly spot employees at high risk of turnover. Conduct short surveys frequently so that potential issues can quickly be solved.
Limitations of the Prediction ModelPermalink
My prediction model provides helpful insights, but it also has limits:
- Correlation is not the same as cause-and-effect: Just because the data shows related factors (like longer commutes or lower pay), we can’t confirm these alone cause turnover.
- People Factors: The analysis doesn’t fully capture personal choices, career ambitions, or external reasons employees might leave for other jobs.
- Quality of Data: Reliable predictions require accurate and updated data. Missing or outdated information limits prediction accuracy.
ConclusionPermalink
Using these insights and recommended strategies together can help the company support employees better and significantly reduce turnover.