Library / Probability distributions / PRD-22
Probability distributions
Gamma waiting time: expected value
Average of a gamma waiting time: the shape times the scale.
- Ref
- PRD-22
- Rev
- v1
- Field
- Probability distributions
- Result
- E[X] [h]
The mean waiting time is the shape times the scale. With a rate parameter λ = 1/s the same mean is k/λ, so check which parameter a source or a fitting tool uses: a rate where a scale is expected inverts the answer.
Average of a gamma waiting time: the shape times the scale. With a rate parameter λ = 1/s the same mean is k/λ.
Calculator
- Event rate, 1/s0.5 1/h
- Standard deviation, s√k3.464 h
- Mean time between single events, s2 h
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.
- Collecting 3 events at one every 2 h on average takes 6 h.
- The mean is directly proportional to both k and s, so doubling the number of events doubles the wait.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing (h) | Local step | Change in result |
|---|---|---|---|---|---|---|
| s Scale s | 0.5 to 10 h | 1.5 | 30 | 28.5 | +10% | +10 % |
| k Shape k | 0.5 to 10 | 1 | 20 | 19 | +10% | +10 % |
Sweep of Shape k
| Shape k | Expected waiting time (h) |
|---|---|
| 0.5 | 1 |
| 1.688 | 3.375 |
| 2.875 | 5.75 |
| 4.063 | 8.125 |
| 5.25 | 10.5 |
| 6.438 | 12.88 |
| 7.625 | 15.25 |
| 8.813 | 17.63 |
| 10 | 20 |
Sweep one variable
Variables and how each one contributes
Expected waiting time
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 +10 %, from 6 to 6.6 h.
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 +10 %, from 6 to 6.6 h.
Worked example with the values above
- Shape: k = 3; scale: s = 2 h.
- Multiply them.
- E[X] = 6 h.
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
A mean, variance or percentile is calculated from fitted parameters, and the uncertainty in those parameters passes straight through. A distribution fitted to a small sample can have parameters that are far from the truth, especially in the tails and for the variance, so quote the result together with the sample size it rests on.
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