Threshold Effects in Restaurant Inspections
Restaurants in New York City get inspected by the Department of Health and Mental Hygiene (DOHMH) at least once a year. An inspection checks for and cites any health code violations. Inspectors look for things like food being stored at the wrong temperature, or evidence of mice. Each violation adds some number of points to the restaurant’s score. Lower scores are better. The inspector adds up the scores to get a grade, which then must be prominently posted in the restaurant’s window.
On an initial inspection, a score below 14 gets an A grade right away. A score 14 or more means you’ll get a second, unannounced inspection within a few weeks. At the reinspection, a score of below 14 gets an A, 14 to 27 gets a B, and 28 or more points gets you a C, which is the worst grade.
The city publishes inspection data on NYC
OpenData. I put a version of them into an R package, nycrestaurants. It covers about
27,500 restaurants with an active permit in November 2026 and has about 93,000
inspections and 288,000 violations. Most of the inspections are from 2023 to
2026. The inspections table looks like this:
|
|
You can see the first restaurant was inspected in August 2023 and got a score of 38, which meant it wasn’t given a grade. Three weeks later it scored 12 on re-inspection and got an A.
Points thresholds like this lead to a familiar sociological phenomenon. One version of the idea is Goodhart’s Law, which says “When a measure becomes a target, it ceases to be a good measure”. Another version of it, which I learned from Carol Heimer, is the idea that “floors become ceilings”, which is what happens when some regulatory standard meant as a minimum turns into a de facto maximum performance target. A third version shows up in statistics, where having some threshold like “p < 0.05” as a measure of statistical significance turns into a cutoff point for getting a paper accepted. At the level of individual papers that leads to p-hacking, where you torture a model until it produces a threshold-friendly effect. At the level of populations of papers, it produces weird-looking distributions with sudden drop-offs on one side or other of the threshold. Tax brackets and exam scores can work like this as well. There’s a well-known case in New York, too, analyzed by Dee et al (2019). You need to pass the Regents exams to graduate high school. The passing score is 65, and teachers can have an incentive to push struggling students over that line.
Scores in restaurant inspections are a natural place to look for the same sort of thing. Here are the scores for three kinds of inspection. For initial inspections, the 14-point threshold is what matters. For re-inspections, there’s the 14-point cutoff again, and the C-grade, 28-point cutoff, too. There’s a third group of “pre-permit” inspections of restaurants that haven’t opened yet. These inspections are not graded, so neither cutoff should matter for them. Here’s what the distributions look like. Note that the y-axis range is different in each panel.
In the top panel, the drop at 14 is very sharp. On initial inspections, 4,812 restaurants scored 13 and only 214 scored 14. That is about 22 times as many restaurants one point below the cutoff as one point above it. Re-inspections show the same drop at 14 points. They also show a second drop at 28 points. In the data, 554 re-inspections scored 27 points, but only 99 scored 28. Initial inspections show no drop around 28, because no grade depends on that number at that point in the inspection process. There aren’t that many pre-permit inspections. There’s a drop from 36 restaurants to 18 restaurants between 13 points and 14 points, or 50%, compared to about 96% for initial inspections of operating restaurants.
The distribution of scores is lumpy, because each violation carries a fixed number of points and some violations are worse than others (i.e., they score more points). This makes some total point scores easier to reach than others. We can normalize things a bit by dividing the count at each score by the count at the next score up the scale. A ratio near 1 means there’s no change at a given step up the scale. A big ratio means there’s a sudden drop. If there were no thresholds we’d see a more or less flat line across the range of scores.
For most scores the ratio stays between about 0.2x and 3.5x. At 13 points it jumps to 22x for both initial inspections and re-inspections. At 27 points it’s about 5.6x, but only for re-inspections. So, I’d say decent evidence of threshold effects.
Caveats. First, the scores in the data are “final” scores. Restaurants can contest violations at a hearing. If they win, the city removes the violations dismissed at the hearing. That means that restaurants near a cutoff have a strong reason to contest violations. This means the clumping might be caused by inspectors during the inspection, from the hearings afterwards, or by both. I can’t disentangle them with these data. Second, these data include only restaurants that were open in November 2026. Restaurants that bombed their inspections repeatedly and then closed aren’t in the data. Finally, the ungraded comparison group (the soon-to-open places) is small. Pre-permit inspections differ from regular inspections in other ways, too. Still, that’s a pretty striking signal around the A-grade points cutoff. Bon Appétit.