Watching the debate in this country over public safety, you'd think some people wish to live securely, while others welcome Armageddon. Conservative pundit Bill O'Reilly recently went after "liberal politicians" in Chicago and San Francisco, noting crime in those cities and saying, "The situation is out of control and a disgrace, and that's what happens when incompetent politicians demand the police stop enforcing laws."

The truth is, we all want to be safe. The struggle isn't about outcomes, it's about methods. Should law enforcement have ready access to everyone's phone location-tracking data? Should police be required to undergo de-escalation training before being authorized to use force?

These aren't questions to be resolved by free-for-alls on cable news channels. They require facts and analysis. And yet, although the U.S. shells out well over $100 billion each year for public safety, we have remarkably little idea whether that money is well-spent. It's possible that any given policing tactic or technology — from Tasers to facial-recognition systems to body cameras — is a fine or poor idea. But we really don't have much sense of which tactics and tools work, or whether they are worth the cost.

Throughout the rest of government, we use cost-benefit analysis to answer these sorts of questions. (Many economists prefer to call it benefit-cost analysis, or BCA, rightly asking: Why worry about the costs until we know if there are any benefits?) Whether it is environmental regulation, workplace safety, financial rules or the provision of health care, BCA is pervasive. But as a 2014 report by the Vera Institute of Justice pointed out, BCA has not been widely taught or used in criminal justice.

Take ShotSpotter, a technology that uses sound waves to pinpoint where a gun has been fired. The product is marketed as allowing police to know about gunshots and respond quickly, especially in neighborhoods where people aren't inclined to call the cops. ShotSpotter leases the technology to cities at a cost of $65,000 to $95,000 per square mile per year. This is serious money for cash-strapped cities, so the question naturally is: Is it worth it? To answer this, we'd want to see good data on whether the technology is helping cops nab shooters, whether there are fewer shots fired when it is in place or whether gun violence is down. And we'd then want to know if the technology is more effective than an alternative, such as hiring more officers.

Unfortunately, it is harder than it should be even to get data to do BCA around policing. The reasons for this are many. Law enforcement's instinct is to give no information beyond what is necessary, making democratic engagement with policing extremely difficult. Additionally, the technologies for police data collection are in many ways primitive, as anyone who has watched a police officer filling out incident reports in duplicate on the back of a cruiser knows. There are about 18,000 departments, and aggregated data would be useful, but we often don't have it.

(In ShotSpotter's case, though, the problem is different. Much of policing technology is being privatized, and private vendors — claiming trade secret protection — shield data from the public and researchers.)

In the modern era, policing has put more focus on discouraging crime in the first place. Take airport security: Anyone who carries a bomb through a checkpoint will be arrested. But the point of the fortune we spend on airport security is to prevent people from even contemplating such an attack. The same may be said of closed-circuit TV cameras that peer down at us all over our cities and the deployment of many other technologies.

It is one thing to count crimes that did happen; it is quite another to count crimes that didn't. We can, of course, compare crime rates before and after a new technology or tactic is put in place, but it is hard to establish the cause of any trends.

Law enforcement agencies often are unclear about the specific crime-fighting benefits they hope to achieve when adopting technologies. Those technologies tend to spread by word of mouth: If Department A has a new tool, then Agency B wants it, too.

A good example is the curious case of automatic license plate readers: fixed cameras, or cameras installed on police cars, that capture and digitize images of license plates. Initially, LPR technology was sold as a way to reduce car theft. But with auto theft declining anyway, and at $10,000 or more for each mobile unit and $100,000 per fixed unit — not including maintenance, upgrades, and data storage and retrieval systems — it was hard to justify the cost. Then it occurred to departments that they could store the data and call it up in investigations; if they are looking for a van with a certain plate number, stored records may indicate where that van travels frequently or even where it parks. And yet, success stories tend to rely on randomness: A police car happened to drive by the van at some point and dumped that data into the system.

The latest emerging justification for LPR is as part of policing for profit. A private vendor, Vigilant Solutions, gives LPR technology to departments for "free" and incorporates all plate captures into its database. Vigilant then uses that data to create an extensive "hot list," composed, in particular, of vehicles with outstanding traffic fines. When cops get a ping, they can pull a car over; police cruisers in some jurisdictions even are being equipped with credit card machines for instant payment. What's in this for Vigilant? It gets a 25 percent "processing fee."

Even if the benefits of certain policing tactics can be assessed, figuring out the full costs of any given tactic or technology is essential, albeit difficult. What about the curtailing of civil liberties? What about the social costs? How do you put a price on public dissatisfaction with the way the police are doing their jobs? What about a potential loss of community trust?

Use of stop-and-frisk has been on the decline in some major cities, in part because of litigation (a cost in and of itself), but Donald Trump revived the debate with a shout-out during his presidential campaign. The evidence on whether stop-and-frisk works is thin. But we should also consider the physical violation, the loss of time and liberty, the psychological costs of the tactic. Suppose the cost of being stopped out of the blue, put against a wall and having hands run over your body is $100, which does not seem entirely unreasonable. In New York in 2011, there were more than 300,000 stop-and-frisks, at a cost of more than $30,000,000, using this estimate. That gives a sense of what the benefits would have to be in order to justify those costs.

The challenges of calculating the costs and benefits of policing should not dissuade us. If BCA can be applied to complicated and controversial subjects such as environmental regulation, such calculations can be applied to public safety.

It would help if public safety agencies and contractors were more forthcoming with their data. When trade secrets are a concern, private companies such as ShotSpotter and Vigilant could make their data available for researchers but require nondisclosure agreements. A ShotSpotter board member was quoted in Forbes as saying it would be beneficial to have an independent study. Companies that believe in their products should be willing to undergo outside testing. Tech companies could also lend their expertise to help police departments modernize their data collection and analysis efforts.

Government could play a big role here. Indeed, although there is debate and confusion over the role of the federal government in local law enforcement, dollars spent by the federal government in assessing what keeps us safe, and what is plain wasteful, are likely to be dollars well-spent.

Not-for-profits have a part, too. They can team up with policing agencies to run BCA evaluations on tactics and tools such as vehicle pursuits and de-escalation training.

Public safety is foundational in society. We spend a fortune on it. It seems that it's not too much to ask that we devote resources to figuring out what works and what does not, and whether we could do better.

Barry Friedman is a professor at New York University School of Law and the director of its policing project. His latest book is "Unwarranted: Policing Without Permission." He wrote this article for the Washington Post.