• + 0 comments

    I found the tutorial brining in negative binomials a bit confusing. Isn't a clean way to compute this simply that the probability of not producing a defect in n=5 rounds covers the only possibility other than a defect occurring during the first n=5 inspections?

    python n = 5; p = 1 / 3.0; q = 1.0 - p; print(f"{(1.0-q**n):.3f}")

    // or in C double p = 1.0/3.0; double q = 1 - p; printf("%.3f", 1 - pow(q, 5));`