Library / Probability distributions / PRD-21
Probability distributions
Gamma waiting time: probability of finishing by a deadline
Probability that a gamma-distributed waiting time is at or below x.
- Ref
- PRD-21
- Rev
- v1
- Field
- Probability distributions
- Result
- F
F is the regularised lower incomplete gamma function P(k, x/s): the probability that the kth event has occurred by time x. For whole-number k it equals the probability that a Poisson count over x hours is at least k.
Probability that a gamma-distributed waiting time is at or below x. P is the regularised lower incomplete gamma function.
Calculator
- Probability still waiting, 1 − F0.6767
- Mean waiting time, ks6 h
- Expected events by x, x/s2
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- There is a 32.3 % chance that the wait ends by 4 h, and 67.7 % that it lasts longer.
- The mean wait is 6 h; the chance of finishing by the mean is not one half because the distribution is skewed.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| x Elapsed time x | 0.1 to 30 h | 2.007e-5 | 1 | 0.9999 | +10% | +16.7 % |
| s Scale s | 0.5 to 10 h | 0.007926 | 0.9862 | 0.9783 | +10% | −15.2 % |
| k Shape k | 0.5 to 10 | 4.65e-5 | 0.9545 | 0.9545 | +10% | −20.1 % |
Sweep of Elapsed time x
| Elapsed time x (h) | Probability at or below x |
|---|---|
| 0.1 | 2.007e-5 |
| 3.837 | 0.3013 |
| 7.575 | 0.7291 |
| 11.31 | 0.9208 |
| 15.05 | 0.9801 |
| 18.79 | 0.9955 |
| 22.52 | 0.999 |
| 26.26 | 0.9998 |
| 30 | 1 |
Sweep one variable
Variables and how each one contributes
Probability at or below x
What the equation gives you. Everything else feeds it.
Shape k
The shape parameter (a plain number). For a whole number k it counts the events being waited for; below 1 the density is infinite at zero. Raises the mean and variance in proportion and makes the shape more symmetric. Raising it by 10 % (to 3.3) moves the result by −20.1 %, from 0.3233 to 0.2583.
Scale s
The scale, in hours: the mean waiting time per event. It is the reciprocal of the event rate. Stretches every time in the model in proportion. Raising it by 10 % (to 2.2) moves the result by −15.2 %, from 0.3233 to 0.2743.
Elapsed time x
The elapsed time, in hours, at which the result is read. Moves the time at which the density or probability is read. Raising it by 10 % (to 4.4) moves the result by +16.7 %, from 0.3233 to 0.3773.
Worked example with the values above
- Scaled time: x/s = 4 / 2 = 2.
- Evaluate the regularised lower incomplete gamma function P(3, 2).
- F = 0.32332.
Assumptions and limits
- Waiting times follow a gamma distribution; for whole-number k this is the time to the kth event of a steady, memoryless (Poisson) process.
- The shape and scale are known and use the same time unit as x.
Common mistakes
- Confusing the scale s with the rate λ = 1/s: using a rate where a scale is expected inverts the mean.
- Using the gamma form with non-constant event rates, where the Poisson-process link no longer holds.
- Reading the density as a probability.
Statistics and uncertainty
The inputs are parameters, usually fitted to data, and their estimation error carries into the result. The probability or density is a smooth function of the parameters, so the sweep chart shows how sensitive it is: where the curve is steep, a small error in a parameter makes a large difference. The formula treats the parameters as exact, so it gives no confidence interval on its own.
Where it is used
- Time until the kth failure, arrival or repair in a steady random process.
- Rainfall totals, queue service times and other positive, right-skewed quantities.
Maths you need
- Gamma function: the generalised factorial
- Poisson process: events at a constant average rate