WW, the Economist blogger, says that the threat from terrorism is so slight that the surveillance measures taken by the US Government, as revealed by Edward Snowden, are clearly disproportionate. He might be right - he makes a powerful case - but there's a fair bit more to the question than he supposes. However, he also says that we can't properly carry out a costs-benefit analysis, and on this point (courtesy of Nate Silver), I suggest we can be a bit more optimistic.
First, even on the factual premise of his argument, I'm pretty sure that these extensive surveillance techniques are not being aimed simply at terrorists thinking of blowing up Americans in America. Whatever the initial rationale for the post-9/11 expansion in spying powers, it would be surprising if the US Government were not also using them to find out more about other parts of the world where traditional foreign policy concerns are uppermost (Iran, China, North Korea, etc). You might (we don't know) have to add maintaining peace between China and Taiwan into WW's cost-benefit analysis.
Second, even on the question of terrorism prevention, the cost-benefit analysis is not exactly the same as for bath safety or gun control. For one thing, people seem to be much happier to accept higher risks in using cars than planes or trains (does anyone else remember the fuss about the expensive and unnecessary ATP system after the Ladbroke Grove rail crash?) because we are in control of our cars but not in control of our trains and planes. We are in control of our baths, but not our terrorists. For another thing, it is not unreasonable to have preferences about how you want to die. If I were to drown in the bath, it would be a tragic and foolish accident, but no more than that. At least I would die doing something I liked. But if I were to be killed by, say, a serial killer or a terrorist, not only would I be dead, but my death could be seen as part of an attack on civilised life itself; it would leave a much nastier pall over my family and friends. I therefore have reason to pay a higher price to avoid being killed by terrorists than to avoid drowning in my bath. Moreover, it's not unreasonable to consider the hazard, or the worst case scenarios: how many deaths by accidental drowning can conceivably take place in the same bath at the same time? Compare that with how bad the worst conceivable terrorist attack might be.
However, there's a third point, which might commend itself to big-data-loving followers of the Economist. WW says that we can't really know the benefits of the surveillance programmes. Here's a way forward. We know from The Signal and the Noise that terrorist deaths follow a power law distribution. So can't we just determine the frequency of terrorist deaths in the US up to and including 9/11 and compare it with the frequency of such deaths afterwards? If the measures have been effective then we would see a change in the frequency. That would at least show the scale of the benefit to be weighed against the costs. If there is no change then there is reason to believe that the measures were ineffective and not worth any cost.
There is at least one attempt to use the power law distribution as a practical guide to terrorism-prevention: "Toward a Cost-Benefit Analysis of Nuclear Terrorism Prevention Technology". Why not use it as a retrospective test of policy effectiveness?