My experience is that actual court data is notoriously unsearchable for a layperson, so I suspect median and mean sentences would be very difficult to calculate.
I agree; I spent a while doing that for modafinil, and I don't feel especially satisfied with the results.
link: http://www.philosophersbeard.org/2012/07/why-prison-doesnt-work-and-what-to-do.html
I came across this short well-reasoned essay via reddit, but most of the discussion there was by people who (ironically enough) appeared not to have read it. The comment section under the article itself was similar. Some seemed not to have read the first paragraph.
The author's arguments against the imprisonment system, and for alternative methods of punishment, are interesting. They touch upon ideas which are hard to consider rationally. The very idea of punishment is something most people appear to find unpleasant. Indeed so it must be if something is to be considered a punishment.
I found some relevant previous discussion on Less Wrong (Crime and Punishment, The Wrath of Kahneman), and Overcoming Bias (Prison is Cruel), but these seem to be about specifics, and not the system in general.
I am curious both what the scientific consensus is on punishment systems, and what Less Wrong thinks of them. With such an emotionally charged issue, it's hard to find rational discussion about it.