Statistics Quest

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

ColumnTypeUnitSummaryDescription
employee_id
Employee
idAnonymous employee identifier.
department
Department
category6 levels: Operations, Sales, Technology, Finance, Human Resources, LegalDepartment.
job_level
Job level
ordinal5 levels: L1 Associate, L2 Specialist, L3 Senior Specialist, L4 Manager, L5 DirectorJob level from L1 (entry) to L5 (director).
years_experience
Experience
numberyearsmean 10.07, median 8.8, SD 6.717, range 0.5–38Total years of professional experience.
gender
Gender
category2 levels: Female, MaleGender as recorded in the HR system.
education
Education
ordinal4 levels: Diploma, Bachelor, Master, DoctorateHighest completed qualification.
performance_rating
Performance rating
ordinal5 levels: 1, 2, 3, 4, 5Last annual performance rating, 1 (lowest) to 5 (highest), stored as an integer code.
base_salary_sar
Monthly base salary
numberSARmean 16400, median 13150, SD 9751, range 6630–63600Monthly base salary.
annual_bonus_sar
Annual bonus
numberSARmean 20970, median 11800, SD 30600, range 0–303,558Bonus 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

EmployeeDepartmentJob levelExperience (years)GenderEducationPerformance ratingMonthly base salary (SAR)Annual bonus (SAR)
Q0001TechnologyL3 Senior Specialist17.5MaleBachelor3202600
Q0002FinanceL1 Associate2.4MaleDiploma390809740.39
Q0003LegalL2 Specialist11FemaleBachelor2130003293.69
Q0004SalesL2 Specialist12.7FemaleBachelor3124600
Q0005SalesL1 Associate1.8MaleBachelor377400
Q0006FinanceL3 Senior Specialist16.8FemaleMaster41694033514.43
Q0007SalesL3 Senior Specialist12.3MaleMaster32011011951.58
Q0008LegalL2 Specialist5.3MaleBachelor1142200
Q0009LegalL3 Senior Specialist7.5MaleDoctorate32211027185.37
Q0010Human ResourcesL1 Associate1.5MaleBachelor3859010737.15
Q0011SalesL2 Specialist2MaleBachelor2115605942.52
Q0012TechnologyL1 Associate6.3MaleDiploma197400

Used in