Your Equation

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

Solve for
0.510
h
0.510
h
0.130
  • 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.

Probability at or below x () current value 0.3233
xElapsed time xKey driver
2.01e-51
sScale s
0.007930.986
kShape k
4.65e-50.954
  • 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

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
x Elapsed time x0.1 to 30 h2.007e-510.9999+10%+16.7 %
s Scale s0.5 to 10 h0.0079260.98620.9783+10%−15.2 %
k Shape k0.5 to 10 4.65e-50.95450.9545+10%−20.1 %

Sweep of Elapsed time x

Elapsed time x (h)Probability at or below x
0.12.007e-5
3.8370.3013
7.5750.7291
11.310.9208
15.050.9801
18.790.9955
22.520.999
26.260.9998
301

Sweep one variable

Probability at or below x ()Hover, touch, or use the arrow keys on the chart
00.20.40.60.81 51015202530 Elapsed time x (h) now 0.3233

Variables and how each one contributes

F

Probability at or below x

Result ·

What the equation gives you. Everything else feeds it.

k

Shape k

· typical 0.5 to 10

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.

s

Scale s

h · typical 0.5 to 10

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.

x

Elapsed time x

h · typical 0.1 to 30

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

  1. Scaled time: x/s = 4 / 2 = 2.
  2. Evaluate the regularised lower incomplete gamma function P(3, 2).
  3. 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

Related formulas

Practise this formula