Statistics & Data Science · pattern A, Numeric fields
Enter the probability of success per trial and the trial number for the probability that the first success falls exactly there, with the expected wait and the cumulative probability.
P(X = k) = (1 − p)^(k−1) p
Counts trials up to and including the first success. A variant counts failures before the first success, which shifts every result by one — check which convention your module uses.
0.102400
After twenty failures, the probability that the next trial succeeds is still p. Past failures change nothing, which is counter-intuitive and is exactly the gambler's fallacy stated formally. The expected wait of 1/p is also frequently misread: with p = 0.2 the average wait is five trials, but the single most likely outcome is success on the very first one.
If the number is not the part you are stuck on, that is what the service is for — a specialist who explains the working, not just the answer.
Statistical output here is for coursework and learning. Reported p-values and intervals assume the conditions stated on the page; nothing here checks whether those conditions hold for your data.