keisoku

Gamma Distribution Calculator

For a gamma distribution with shape k and scale theta, compute the probability density, cumulative lower-tail probability, upper-tail probability, mean, and variance at a given x, with charts.

Input

Enter the shape parameter k, the scale parameter theta, and the evaluation point x to compute the gamma distribution density, cumulative probability, and more.

A real number of 0 or greater. The probabilities are evaluated at this x.

A positive real number that determines the shape of the distribution.

A positive real number that determines the spread of the distribution.

Result

Lower-tail probability F(x) for x = 2, k = 2, theta = 1

0.59399415

Upper-tail probability 1 − F(x)

0.40600585

Probability density f(x)

0.27067057

Mean k times theta

2

Variance k times theta squared

2

Probability density function PDF

Cumulative distribution function CDF

How it works

  • The probability density is f(x) = x^(k−1) e^(−x/theta) ÷ (Gamma(k) theta^k) for x ≥ 0, where k is the shape parameter and theta is the scale parameter.
  • The cumulative lower-tail probability is F(x) = P(k, x/theta), where P is the regularized lower incomplete gamma function. The upper-tail probability is 1 − F(x).
  • The regularized incomplete gamma function is computed by a series expansion for small x and by a continued fraction (Lentz method) for large x, while ln Gamma uses the Lanczos approximation.
  • The mean is k times theta and the variance is k times theta squared. With theta = 1 you get the standard gamma distribution; integer k gives the Erlang distribution, k = 1 gives the exponential distribution, and shape k = degrees of freedom over 2 with theta = 2 matches the chi-square distribution.
  • Extremely small or large values are shown in exponential notation. Enter positive values for x, k, and theta, with x being zero or greater.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Gamma Distribution Calculator