I've heard the claim thrown out but never say much scientific backing for it. And since it is often pointed to as an example of society-level discrimination against men, I think it is a worthy topic (and one without self reported data no less!).

I'm going to be perfectly blunt up front; I am skeptical of the claim. More precisely, I suspect this is a gender swapped equivalent of the wage gap. Where a real difference between the genders are seen, but it is likely due to the sum of the individuals making choices that affect their outcome rather than any kind of widespread discrimination. Meaning, women pursue lower paying career, don't insist on raises, and sacrifice more career potential for family than men on average, which leads to a gender wage gap. I suspect that criminal men are more belligerent, resistant more, repeat offenses more, and other things that affect their punishments. We get a judge and jury of human beings to evaluate a criminal case for a reason. There are many finer details that end up getting factored in. It seems silly to treat it like an equation where you pop a few variables in and a sentence comes up, but when we fixate on gender differences that is what we are doing.

But onto the literature. The citation for the study I'm looking at:

Doerner, J. K., & Demuth, S. (2014). Gender and sentencing in the federal courts: Are women treated more leniently?. Criminal Justice Policy Review, 25(2), 242-269.

First and foremost, men are arrested more and sentenced longer. That is an undisputable fact that is clear in the literature. Not just from this one study's claims, but as I was looking through the different studies, virtually all agreed with this starting point. One study from 2002 found that men were 2.5 times more likely to get a prison sentence when relevant legal factors were considered (this number varies a lot depending on the paper, so take that as a ballpark number). Numerous studies (though from the 80's) found that women who are married and or have children are see more leniency than their childless and unmarried counterparts. This trend is also seen with men, but to a lesser extent. A more recent study from 2002 also agrees that being a bothered was associated with greater leniency.

Now, onto the data. They looked at a database containing over 100,000 cases from 2000 to 2003. They excluded cases with non-citizens and minors. One potential bias I noticed is that they only look as cases that ended in a conviction. Of the 100,000 cases, 83% were male, and of those 83%, 85% got jail time (as opposed to a halfway house or probation). Meanwhile, 62% of women got jailed, and if they did get jailed on average they only got half the time (34 months versus 70 months). Though do note that this isn't controlling for the crime. Men also tend to have more criminal history, commit worse crimes, and get sentenced for multiple crimes.

They then looked at numerous factors and tried to quantify their effect (figure here. These include race, age, if they were convicted on multiple counts, had a prior criminal history, their education, marital status, and if they have dependents. A quick note on the figure, they look at two things, 1. if they got jail time (in/out column) and 2. how much jail time. The section with dashes are the references. For the question of if they got jail time, a number less than 1 means they were less likely to get jail time than the reference. For the other one (length of jail time) a negative number means they were less likely than reference, and the greater the magnitude the less likely. Only pay attention to the numbers with stars, the ones without are not significant.

When all things are taken into consideration, women are still 39% less likely to get jail time and if they do, it is 23% less. However, I am still not convinced that this due to discrimination. I could also see plea bargains factoring in big time here. I also don't think this study properly covered criminal history and multiple counts. They entered both of these things in as a binary factors, yes/no. But the affect these factors play in court aren't a binary thing. The defendant's general attitude plays a role as well, AFAIK. Showing remorse and giving an apology can help. Obviously, I'm poking holes here, not filling them. I'm not presenting any evidence that these factors would change the results, or that this gap is the result of individual choices and not discrimination. I didn't do a deep literature search but from what I saw studies didn't consider these things. However, I think these doubts should be enough to give us pause before we rush off and cry discrimination.