40 ms·
Suspicious Discontinuities
- miej 5y agovery nice write-up. also reminds me of spurious correlations.
- ColinWright 5y agoHere's my write-up of how I learned about this phenomenon in a specific software system: https://www.solipsys.co.uk/new/GracefulDegradation.html?UI10HNa https://www.solipsys.co.uk/new/GracefulDegradation.html?UI10... In all the systems I've been involved with since, "Discontinuous Behaviour" is a failure mode we've explicitly analysed, and "Graceful Degradation" is a technique we've often implemented. In case people want to discuss that separately I've submitted it here: https://news.ycombinator.com/item?id=28478909 https://news.ycombinator.com/item?id=28478909
- thaumasiotes 5y agoI feel like the "graceful degradation" writeup is incomplete. The obvious solution -- to me -- would be to have the tills continue operating as normal while their queue is full, but stop trying to write to the queue. This would allow you to sell as many items as people desire to buy, but you lose the ability to keep track electronically of what's been sold. The ideal solution presented here is instead that the tills should bottleneck the customers so that they collectively can't buy more items than the central computer is capable of logging in amortized real time. This preserves the ability to keep electronic track of everything the store sells. But it does it by preventing the store from selling its inventory to customers! Instead of a loss in real-time recordkeeping, we have a hard cap on the amount of money the store can earn during the Christmas season. And the reason we've put the cap in place is that otherwise we'd blow right past it! That solution is so anomalous-seeming that I want to see a discussion of what exactly the store's goals are, and why refusing to sell your inventory to customers in December is a good idea for a retail store.
- TeMPOraL 5y agoIt makes sense if: - Reconciling electronic inventory numbers with the real ones will cost more than the store will earn from uncapping the sales, and/or - There's a potential legal/tax risk involved with having stock numbers be bad, and/or - There's a risk of losing customers and reputation when stock of a product physically runs out while the tracking system isn't aware of this, and a bunch of customers have to have their orders cancelled because there's nothing to fulfill them with.
- thaumasiotes 5y agoIt might make sense. But it probably doesn't. Without a discussion between the store and the IT guy, this looks like the store having a problem of "we want to sell our items, but the till isn't letting us" and the IT guy having a problem of "when the till locks up, the store's problem is obviously my fault", and the IT guy solving his personal problem at the store's expense because the store doesn't know any better.
- ColinWright 5y agoI feel like you're not giving enough credit to a professional programmer.
- thaumasiotes 5y ago> Authors of psychology papers are incentivized to produce papers with p values below some threshold, usually 0.05, but sometimes 0.1 or 0.01. Masicampo et al. plotted p values from papers published in three psychology journals and found a curiously high number of papers with p values just below 0.05. This is on topic; there is a discontinuity there which is an example of the same type of thing the rest of the post talks about. But it's not the biggest problem illustrated by that graph. The dot at "p is just barely less than 0.05" is an outlier. But it's an outlier from what is otherwise a regular pattern that clearly shows that smaller p-values are more likely to occur than larger ones are. That's insane. The way for that pattern to arise without indicating a problem would be "psychologists only investigate questions with very clear, obvious answers". I find that implausible.
- akramer 5y agoThe graph shows that those low p-values are more likely to be in papers, not that they’re more likely to occur. Is that suspicious? I don’t know enough about it to judge.
- thaumasiotes 5y ago> The graph shows that those low p-values are more likely to be in papers, not that they’re more likely to occur. It looks to me like the y-axis is measured in number of papers. The lower a p-value is, the more papers there are that happened to find a result beating the p-value. So low p-values are more likely to occur a priori than high p-values are. This is most certainly not true in general. We might guess that psychologists are fudging their p-values somehow, or that journals are much, much, much, much, much, much, much more likely to publish "chewing a stalk of grass makes you walk slower, p < 0.013" than they are to publish "chewing a stalk of grass makes you walk slower, p < 0.04". I've emphasized the level of bias the journals would need to be showing -- over fine distinctions in a value that is most often treated as a binary yes or no -- because it is much easier to get p < 0.04 than it is to get p < 0.013.
- disgruntledphd2 5y ago
- villaaston1 5y agoPrevious discussion from Feb 2020: https://news.ycombinator.com/item?id=22378555 https://news.ycombinator.com/item?id=22378555
- crispyambulance 5y ago> One thing that's maybe worth noting is that I've gotten a lot of mileage out in my career both out of being suspicious of discontinuities and figuring out where they come from and also out of applying standard techniques to smooth out discontinuities. Just wanted to point out that quote from danluu. It's a really good practice to sit down and plot histograms, scatterplots and other visualizations and JUST THINK for a while before trying to cram the model you think applies.
- jiggawatts 5y agoUnfortunately I can't find the reference any more, but there was this great presentation by someone explaining how in computer systems developers will "optimise for the requirement", and ignore anything outside of it. The example was latency. If the programmers were told to achieve less than 1 ms for 99% of the requests -- then sure enough -- the 1% of requests would have sky-high latencies of multiple seconds. If told they needed to achieve 1 ms for 99% and 100 ms for 99.99%, then -- you guessed it -- the worst 0.01% would be tens of seconds or even minutes. Inevitably, there would be a visible discontinuity in the latency histogram just above whatever the official business requirement was. It's a difficult thing to fix, because no matter where you set your threshold, unless it's 100%, you won't meet it. And even 100% is just a fiction, because you'd need an infinite number of tests to achieve it.
- londons_explore 5y agoI can totally imagine how that happens... The software isn't performing well enough, so some programmer says "I can rewrite the request queueing system to prioritize requests just before the 1ms deadline and deprioritize the ones where the deadline has already been missed". End result, a step...
- eru 5y agoDeep in the internals of Google, we actually had a system that was putting incoming requests not in a queue (first-in-first-out), but in a stack (last-in-first-out). The system in question was essentially not meant to have any backlog of request under normal operations. But when overloaded, for this particular system it was better to serve the requests it could serve very fast, and just shed load on the overflow. (I don't remember more specifics, and even if I could, I would probably not be allowed to give them..)
- willvarfar 5y agoReminded me of this old post by Facebook, well worth a read :) https://engineering.fb.com/2014/11/14/production-engineering/solving-the-mystery-of-link-imbalance-a-metastable-failure-state-at-scale/ https://engineering.fb.com/2014/11/14/production-engineering...
- alexis2b 5y agoRecent example (for me): Atlassian monthly per-user pricing vs. annual bulk pricing (discontinuous). When moving up a range it seems more economical to revert to monthly pricing than to go annual. (Btw: that sucks!) Source: https://www.atlassian.com/licensing/future-pricing/cloud-pricing/pricing-tables https://www.atlassian.com/licensing/future-pricing/cloud-pri...
- deleted 5y ago[deleted]
- cmiller1 5y agoI find the drug charges section especially damning, I'd like to hear more analysis of that particular part.
- jandrese 5y agoIt was never about the drugs. The change the law increased the amount the police had to plant on someone to lock them away in a federal penitentiary, and they had not expected it to show up so strongly in the data. Back when the minimum was 50g they could hide in the noise but at 280g it stands out. In a well functioning society this would trigger investigations of all of the cases where the suspect was charged with carrying just over the limit on suspicious of police misconduct, but the police don't want that so it's not going to happen.
- pidge 5y agoThere is a footnote about the drug charges section that anyone commenting here may want to read first.
- rory 5y agoThanks for pointing that out, it's a relief. For the lazy, the footnote basically says that the discontinuity at 280g is not caused by an increase in seizures at this amount (which would indicate police fraud), but by prosecutors choosing to charge defendants at slightly above the 280g threshold when the amount seized was actually significantly larger than the threshold.
- amluto 5y ago> A simple fix for the problems mentioned above would be to have slow phase-outs instead of sharp thresholds. Slow phase-outs are actually done for some subsidies and, while that can also have problems, they are typically less problematic than introducing a sharp discontinuity in tax/subsidy policy. Or just don’t have phase-outs at all. What, exactly, is wrong with giving millionaires subsidies with similar dollar values as much poorer people? They’ll make it up in overall taxes paid anyway.
- xyzzyz 5y agoThe problem is not with millionaires, who are rather few, but with middle-to-upper middle class people, who make up bulk of taxpayers and the revenue. If you run the numbers, your scheme ends up being rather unworkable. To put in concrete terms: if you tried to give every household $7000 of ACA subsidy, that would cost you $900B a year. That’s more than US military spending. Where you would get extra taxes from to cover that? There aren’t enough millionaires to pay for it (do the numbers here too, to see), so what you’d need to do is to get back $7000 from household that make “mere” $150-200k. You don’t want to slap extra $7k tax, because that would just be a cliff like the one you tried to avoid in the first place. Once you figure out how to set up your taxation to do that, you’ll find that it conceptually and practically much simpler to just do phaseouts.
- amluto 5y agoWe, conceptually and practically, _already_ have a way to collect extra taxes from people with higher income — it’s called tax brackets. Adjusting the brackets a bit to collect that extra $7k (or more) from people who earn a few hundred K per year is straightforward, and it more easily preserves the nice property of having net taxes paid (tax minus subsidies) being convex as a function of income. I realize that health care in particular is a horrible mess due to most higher income people getting insurance through employer group policies. That, in and of itself, is a problem, and fixing would have the added benefit of removing a large disincentive to changing jobs or leaving a bad job.
- xyzzyz 5y ago
- echopurity 5y agoWhy not comment on the obvious implications of the drug war discontinuity? Prosecutors routinely fabricate evidence to convict people.
- petercooper 5y agoThe UK has some similar things in its tax system. Child benefit is lost if either parent earns a penny over £50,000, but there are various "salary sacrifice" schemes (or heck, just put more into your pension - tax deductible here) meaning financial trickery like buying put options isn't necessary.