Employee salaries at a fictional company
One row per employee of Qasr Horizon Trading, a fictional company with 600 staff across six departments. Includes job level, experience, education, performance rating, monthly base salary and annual bonus. Designed for percentiles, group comparisons, regression and the foundations of pay-equity analysis — including a raw gender gap that mostly disappears once job level is taken into account.
- Rows
- 600
- Columns
- 9
- One row is
- one employee
- Version
- v1
Data dictionary
| Column | Type | Unit | Summary | Description |
|---|---|---|---|---|
employee_idEmployee | id | Anonymous employee identifier. | ||
departmentDepartment | category | 6 levels: Operations, Sales, Technology, Finance, Human Resources, Legal | Department. | |
job_levelJob level | ordinal | 5 levels: L1 Associate, L2 Specialist, L3 Senior Specialist, L4 Manager, L5 Director | Job level from L1 (entry) to L5 (director). | |
years_experienceExperience | number | years | mean 10.07, median 8.8, SD 6.717, range 0.5–38 | Total years of professional experience. |
genderGender | category | 2 levels: Female, Male | Gender as recorded in the HR system. | |
educationEducation | ordinal | 4 levels: Diploma, Bachelor, Master, Doctorate | Highest completed qualification. | |
performance_ratingPerformance rating | ordinal | 5 levels: 1, 2, 3, 4, 5 | Last annual performance rating, 1 (lowest) to 5 (highest), stored as an integer code. | |
base_salary_sarMonthly base salary | number | SAR | mean 16400, median 13150, SD 9751, range 6630–63600 | Monthly base salary. |
annual_bonus_sarAnnual bonus | number | SAR | mean 20970, median 11800, SD 30600, range 0–303,558 | Bonus paid for the last year (0 when no bonus was paid). |
What it is good for
- Describe a right-skewed salary distribution with percentiles and quartiles.
- Compare salaries between groups and see how a third variable (job level) changes the comparison.
- Fit a regression of log salary on level, experience and department and interpret coefficients as approximate percentages.
- Recognise zero-inflated data (bonus) and summarise it in two parts.
Methods: percentiles, group comparison, two-sample t-test, multiple regression, log transformation, stratification, adjustment and mediation.
Data quality notes
- Women earn about 15% less on average overall, but comparing within job levels the gap averages only about 1% (individual levels range from about −2% to +3%): most of the raw gap goes with fewer women at senior levels. Job level cannot cause gender, so it is not a confounder here; it is a possible mediator — if promotion itself is unequal, adjusting for level hides that part of the disparity. Neither the raw nor the adjusted gap proves or disproves discrimination. The dataset was built this way to teach the difference; it says nothing about any real employer.
- annual_bonus_sar is zero for about 28% of employees; its distribution is a spike at zero plus a right-skewed part.
- performance_rating and job_level are ordinal; performance_rating is stored as integers 1–5.
- No missing values.
Provenance and licence
Gender (42% female), department, education and experience (gamma) are drawn first. Job level comes from a latent promotion score that rises with experience and education and is lower for women (a simulated promotion barrier), cut at fixed thresholds. Base salary = level base pay × department factor × experience factor × log-normal noise (sd 0.08), with a 3% lower base for women of equal level, department and experience (partly offset because women who reach a level have more experience on average, so simple within-level gaps are only about 1%); rounded to 10 SAR. Performance ratings (1–5) are independent of gender. Bonus is zero-inflated: the chance of any bonus and its size in months of base pay increase with the rating.
Synthetic data · CC0-1.0 (synthetic data generated by Statistics Quest) · generated deterministically (seed 20241002). It does not describe real people or organisations; any resemblance is coincidental.
Preview
Dataset
Employee salaries at a fictional company
600 rows · one row = one employee · synthetic data
| Employee | Department | Job level | Experience (years) | Gender | Education | Performance rating | Monthly base salary (SAR) | Annual bonus (SAR) |
|---|---|---|---|---|---|---|---|---|
| Q0001 | Technology | L3 Senior Specialist | 17.5 | Male | Bachelor | 3 | 20260 | 0 |
| Q0002 | Finance | L1 Associate | 2.4 | Male | Diploma | 3 | 9080 | 9740.39 |
| Q0003 | Legal | L2 Specialist | 11 | Female | Bachelor | 2 | 13000 | 3293.69 |
| Q0004 | Sales | L2 Specialist | 12.7 | Female | Bachelor | 3 | 12460 | 0 |
| Q0005 | Sales | L1 Associate | 1.8 | Male | Bachelor | 3 | 7740 | 0 |
| Q0006 | Finance | L3 Senior Specialist | 16.8 | Female | Master | 4 | 16940 | 33514.43 |
| Q0007 | Sales | L3 Senior Specialist | 12.3 | Male | Master | 3 | 20110 | 11951.58 |
| Q0008 | Legal | L2 Specialist | 5.3 | Male | Bachelor | 1 | 14220 | 0 |
| Q0009 | Legal | L3 Senior Specialist | 7.5 | Male | Doctorate | 3 | 22110 | 27185.37 |
| Q0010 | Human Resources | L1 Associate | 1.5 | Male | Bachelor | 3 | 8590 | 10737.15 |
| Q0011 | Sales | L2 Specialist | 2 | Male | Bachelor | 2 | 11560 | 5942.52 |
| Q0012 | Technology | L1 Associate | 6.3 | Male | Diploma | 1 | 9740 | 0 |
Used in
- What statistics is for · Statistical Thinking
- Confounding and causation · Statistical Thinking
- Quartiles and percentiles · Describing Data
- Robust summaries and relative spread · Describing Data
- Choosing and reporting summaries · Describing Data
- Choosing the right chart · Visualising and Exploring Data
- Density curves and violin plots · Visualising and Exploring Data
- Conditional probability · Probability
- Bootstrap intervals · Estimation and Confidence Intervals
- Two-sample t-test · Hypothesis Testing
- Correlation is not causation · Correlation and Regression
- Multiple regression · Correlation and Regression
- Categorical predictors · Correlation and Regression
- One-way ANOVA · Comparing Groups and Categorical Data
- Post-hoc comparisons · Comparing Groups and Categorical Data
- Choosing a test · Comparing Groups and Categorical Data
- Sensitivity analysis · Resampling and Statistical Reasoning
- Setting variable types · Practical Data Analysis
- Grouping and aggregation · Practical Data Analysis
- Transforming variables · Practical Data Analysis
- An exploration workflow · Practical Data Analysis
- Pay percentiles and pay-equity foundations · Applied Statistics for Professionals
- Employee compensation and pay equity review · Capstone