The reason the example is classic is that the hypothesized direct causal connection (that ice cream causes crime) strikes us as so patently absurd (in jargon, lacking facial validity) that the students instantly know something is amiss. Where the causal connection is plausible, though, we see exactly the same fallacy put forth and accepted by too many too often. The correlation between poverty and crime "proves" that poverty is the root cause of crime, for example. Too many people see no need to probe further.
Now we see a serious proposal that comes close to the classic example. Does candy cause crime? Jennifer Thomas reports in USN&WR:
Children fed candy and sweets on a daily basis are more likely to be convicted of violent crimes as adults, a new study finds.
Researchers from Cardiff University in Wales looked at data on 17,415 children born in a single week during April 1970 in the United Kingdom. The data, from the British Cohort Study, included detailed health and lifestyle information on the children at several points during their lifetimes, including ages 5, 10 and throughout adulthood.
Thirty-five of those children went on to report at age 34 that they'd been convicted of a violent crime, the researchers found.
About 69 percent of those who reported having committed violent acts also reported eating candy daily at age 10, compared to 42 percent of those who did not have a violent criminal past, the study authors noted.
The first alternative hypothesis that strikes me right off the bat is that permissive parenting may be the underlying culprit, just as hot weather is in the classic example. Permissive parents are more likely to let their children eat all the candy they want, and they are also more likely to raise brats.
The actual journal article, in the October 2009 British Journal of Psychiatry, is quite short, only two pages, and does not have much detail. Abstract is here. The authors say they controlled for "parental attitudes towards parenting." However, parenting style is complex and difficult to measure. I'm not sure their simplistic measure is really up to the task. The authors acknowledge a possible parenting mechanism. "One plausible mechanism is that persistently using confectionery to control childhood behaviour might prevent children from learning to defer gratification, in turn biasing decision processes towards more impulsive behaviour, biases that are strongly associated with delinquency." I suspect it goes beyond candy to a more global approach to parenting not entirely accounted for by their parenting measure.