Median Pay Gap is a bad measure if you want to make decisions.
Had to deal with a grievance claiming among other things gender discrimination.
On the surface it looked like there was a good reason for the grievance. Person selected was male the female making the grievance wasn't even interviewed even though they were both hired on the same day 15yrs ago. They were both working at the same site and the person grieving the selection had higher marks from school and while not more productive was well above average and should have at least had an interview.
But the male had 15yrs experience, the women didn't even have 10yrs. How could that be?
It started a couple years into her employment. Extended paid time off to have children. five children, carefully spaced to take full advantage of benefits. Maximum time off for having children was less than 1yr. She had managed to make that 18months in a couple of cases, records didn't explain how but I suspected leave without pay.
The person selected moved around to different sites, including remote sites where more responsibility for no more pay was the norm and took advantage of training including training for the position in question. It looked like they had been preparing their whole career. The person making the grievance stayed in one place, worked far less overtime, far fewer weekends, and little optional training but had better evaluations.
The grievance went through the stages largely because of the genders involved, how would you have ruled?
Keep in mind that there are consequences either way. Also keep in mind that the person making the grievance was more attractive, more pleasant to be around, more intelligent, and more socially skilled. Even though the job didn't require such skills they would make an impact if and every time you met her.
If that grievance had failed and the job selection stood a simple median pay gap measurement of that department would prove a gender pay gap.
If the grievance succeeded and the selection was overturned people would notice that as well.