I ask this question because I deal with alot of intermittent bugs and want to be able to answer the question Can I be at least 95% sure that my changes to the code fix the bug?.  I've got some ideas on how one could formalize the problem, but I'm guessing that someone else has done this.I'm particularly interested in theory where we do NOT already know a value of $p$ - the probability that a bug will hit.  This means we'll likely have to assume some distribution on $p$.It seems like this should be a known thing, especially within TDD.  Some problems are just so hard that we have to rely on testing results.  Thanks for any direction you can give me.
What is the theory behind testing fixes for intermittent bugs?
statistics;software engineering;software testing