The US Department of Labor says that Google appears to systematically underpay women and that it has seen "compelling evidence" of "very significant discrimination against women," Janette Wipper, a DoL regional director, testified in a San Francisco court on Friday, according to The Guardian.

But Google says it does no such thing and has the data to prove it (though it hasn't released any of that data). Google conducts an annual analysis of pay equality that is "extremely scientific and robust" and gender "blind," Google's vice president of people operations, Eileen Naughton, wrote in a blog post Tuesday.

Naughton says that if the analysis finds that a demographic group, like women, are being underpaid, it adjusts their pay accordingly.

At first glance, it would seem that if one of them is telling the truth, the other can't be. But they could both be right, according to analysis of Google's pay between women and men done by Glassdoor's Chief Economist, Dr. Andrew Chamberlain, who shared its research with Business Insider.

Glassdoor examined the thousands of self-reported salaries that Google employees voluntarily shared with the job-hunting site. It's not a complete picture of pay at Google, but it's a good sample size to look for trends.

Glassdoor's data found that women and men who do similar jobs with similar backgrounds at Google do typically get paid the same, backing up Naughton's assertions.

However, all told, women at Google are still paid 16% less than the men, this Glassdoor data also finds.

The rub is that of the women who work at Google, fewer of them are among the ranks of the highest paying jobs at Google, compared to the percentage of men who have those jobs in relation to the number of men who work there, Glassdoor finds.

"In our sample of Google salaries, men and women are definitely not equally represented among job titles. For example, about 52 percent of males in our data worked as highly paid software engineers, while just 21 percent of women worked in those roles. By contrast, 6 percent of women in the sample worked as product marketing managers, while just 2 percent of men worked in those roles," Chamberlain says.

Economists call this "occupational segregation," Chamberlain says, and it's a common and major contributor to the gender pay gap.

This is not a unique situation to Google. In fact, a year ago, Glassdoor examined the issue and found "this pattern of men and women working in different job roles explained about 54 percent of the overall U.S. gender pay gap," he says.

But it could explain how Google might be accused of "systematically" underpaying while claiming it does pay equally for equal work.

"Men and women for a variety of reasons tend to be sorted into different jobs — even within the same company — and those different roles pay differently," he says. "This new research shows this same phenomenon likely explains much of any overall gender pay gap at companies like Google as well."