Squabbles between farmers and animal rights' protesters bore me senseless. This week, environment secretary Caroline Spelman announced that the scientific evidence supports her new policy of farmers killing badgers to prevent bovine TB. It's an overstatement, but more importantly, this story walks through several important issues in science.

Firstly, what works in principle may not work in practice. Bovine TB is a massive problem (and one reason why we pasteurise milk). Around 25,000 cattle were slaughtered last year because of it, and the cost to the taxpayer, since we compensate farmers, was £90m. Badgers carry TB, and about half of all cattle infections come from a badger source. It makes perfect sense that killing some badgers should reduce the number of cattle infections.

To test this hunch, 10 years ago the government took a very unusual step, and set up a proper trial: the Randomised Badger Culling Trial. This was a huge project, running from 1998 to 2007, in 30 separate 100km2 areas around England.

These study zones were grouped together into triplets. One zone in a triplet got repeated culling, roughly once a year ("proactive culling"). Another saw local badger culling after any TB outbreak in cattle ("reactive culling"). And a final zone was kept as a "control" region, with no culling. TB rates were surveyed in all of the areas.

You'd have thought this culling should do some good, or at least no harm. In fact, the "reactive culling" was stopped after a few years when the rates of cattle TB infections in these areas turned out to be higher than areas with no culling, by about 20%.

One suggested explanation was "perturbation". Badgers live in small groups, with territorial boundaries; if you kill some, the groups are disrupted, and the animals wander further afield, spreading infections more widely. But the results from the "proactive culling" were more interesting. In the 100km2 culling zone, cattle TB infections fell by about a quarter. But in the 2km-wide "ring" around the proactive culling zone, the number of TB infections in cattle rose by about a quarter, perhaps, again, because of "perturbation".

A 2km ring becomes less important when the culling area is larger, and mathematical modelling suggests that after 150km2, the extra TB infections in the ring are outweighed by the benefits in the cull zone. At this size, you prevent 23 of the 187 expected herd outbreaks, and so save £600,000 ( outbreaks each cost £27,000). The cost, however, using the cage-trapping method used in the trial, is £2.14m. This is why people concluded it wasn't worth the effort.

Here is the second science bit. The government is now introducing a kind of farmer-led culling. This costs around £500,000 for the same size area, and so now a cull becomes cost-effective, by a hair. But we also end up several steps away from the scientific evidence. First, we're assuming that results from small cull zones scale up neatly into larger ones, and that killing can be done uniformly without local perturbation.

But more importantly, the trial loses what evidence nerds call "external validity": the ideal perfect intervention, used in the trial, is very different to the boring, cheap, real-world intervention that the trial is being used to justify.

This is a common problem, and the right thing to do next is a new trial, this time in the real world, with no magic. The intervention could be the thing we're doing, and the outcome could be routinely collected bovine TB data, since that's the outcome we're interested in. This gives you answers that matter, on the results you care about, with the intervention you're going to use.

People worry that research is expensive, and deprives participants of effective interventions. That's not the case when your intervention and data collection are happening anyway, and when you don't know if your intervention actually works. Here, though, as in many cases, the missing ingredient is will.