Gamma Distribution Calculator

Gamma distribution is used to model a continuous random variable which takes positive values. Gamma distribution is widely used in science and engineering to model a skewed distribution.

Use Gamma Distribution Calculator to calculate the probability density and lower and upper cumulative probabilities for Gamma distribution with parameter $\alpha$ and $\beta$.

Gamma Probability Calculator

Gamma Distribution Calculator
Location Parameter $\alpha$:
Scale Parameter $\beta$
Value of x
Gamma Probability Results
Probability density : f(x)
Probability X less than x: P(X < x)
Probability X greater than x: P(X > x)

How to use Gamma Distribution Calculator?

Step 1 - Enter the location parameter (alpha)

Step 2 - Enter the Scale parameter (beta)

Step 3 - Enter the Value of x

Step 4 - Click on “Calculate” button to calculate gamma distribution probabilities

Step 5 - Calculate Probability Density

Step 6 - Calculate Probability X less x

Step 7 - Calculate Probability X greater than x

Gamma Distribution Definition

A continuous random variable $X$ is said to have an gamma distribution with parameters $\alpha$ and $\beta$ if its p.d.f. is given by

$$ \begin{align*} f(x)&= \begin{cases} \frac{1}{\beta^\alpha\Gamma(\alpha)}x^{\alpha -1}e^{-x/\beta}, & x>0;\alpha, \beta >0; \\ 0, & Otherwise. \end{cases} \end{align*} $$

In notation, it can be written as $X\sim G(\alpha, \beta)$.

Another form of gamma distribution is

$$ \begin{align*} f(x)&= \begin{cases} \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha -1}e^{-\beta x}, & x>0;\alpha, \beta >0 \\ 0, & Otherwise. \end{cases} \end{align*} $$

Mean and Variance of Gamma Distribution

The mean of gamma distribution $G(\alpha,\beta)$ is $\mu_1^\prime =\alpha\beta$ and and variance of gamma distribution is $\mu_2 =\alpha\beta^2$

The probabilities can be computed using MS EXcel or R function pgamma(). The percentiles or quantiles can be computed using MS EXcel or R function qgamma(). The probabilities can also be computed using incomplete gamma functions.

Read below gamma distribution examples solutions using Gamma Distribution Calculator with steps by steps procedure to calculate probabilities.

Example 1 - Gamma Distribution Calculator

Suppose that $Y$ has the gamma distribution with parameter $\alpha$ (shape) =10 and $\beta$ (scale)=2.

Use R to calculate the

a. probability that $Y$ is between 2 and 8, b. $90^{th}$ percentile of gamma distribution.

Solution

Given that $X\sim G(10,2)$ distribution. That is $\alpha= 10$ and $\beta=2$.

The probability density function (pdf) of gamma distribution $X$ is

$$ \begin{aligned} f(x;\alpha,\beta)&= \frac{1}{\beta^\alpha \Gamma(\alpha)} x^{\alpha -1}e^{-\frac{x}{\beta}}, x>0;\alpha, \beta >0 \\ &= \frac{1}{2^{10} \Gamma(10)} x^{10 -1}e^{-\frac{x}{2}}, x>0 \end{aligned} $$

a. The probability that $2 < X < 8$ is

$$ \begin{aligned} P(2 < X < 8) &= P(X < 8) - P(X < 2)\\ &=\int_0^{8}f(x)\; dx - \int_0^{2}f(x)\; dx\\ &= 0.0081 -0\\ &=0.0081 \end{aligned} $$

b. Let the $90^{th}$ percentile be $Q$.

$$ \begin{aligned} & P(X < Q) = 0.9\\ \Rightarrow &\int_0^{Q}f(x)\; dx=0.9\\ \Rightarrow &Q= 28.412 \end{aligned} $$

Thus $90^{th}$ percentile of the given gamma distribution is 28.412.

Example 2 - Gamma Probability Calculator

If a random variable $X$ has a gamma distribution with $\alpha=4.0$ and $\beta=3.0$, find $P(5.3 < X < 10.2)$.

Solution

Given that $X\sim G(4,3)$ distribution. That is $\alpha= 4$ and $\beta=3$.

The probability density function (pdf) of gamma distribution $X$ is

$$ \begin{aligned} f(x;\alpha,\beta)&= \frac{1}{\beta^\alpha \Gamma(\alpha)} x^{\alpha -1}e^{-\frac{x}{\beta}}, x>0;\alpha, \beta >0 \\ &= \frac{1}{3^{4} \Gamma(4)} x^{4 -1}e^{-\frac{x}{3}}, x>0 \end{aligned} $$

The probability that $5.3 < X < 10.2$ is

$$ \begin{aligned} P(5.3 < X < 10.2) &= P(X < 10.2) - P(X < 5.3)\\ &=\int_0^{10.2}f(x)\; dx - \int_0^{5.3}f(x)\; dx\\ &= 0.4416 -0.1034\\ &=0.3382 \end{aligned} $$

Example 3 - Gamma Distribution Calculator

Let $X$ have a standard gamma distribution with $\alpha=3$. Find

a. $P(2\leq X \leq 6)$ b. $P(X>8)$ c. $P(X\leq 6)$

Solution

Given that $X\sim G(3,1)$ distribution, which is a standard gamma distribution. That is $\alpha= 3$ and $\beta=1$.

The probability density function (pdf) of gamma distribution $X$ is

$$ \begin{aligned} f(x;\alpha,\beta)&= \frac{1}{\beta^\alpha \Gamma(\alpha)} x^{\alpha -1}e^{-\frac{x}{\beta}}, x>0;\alpha, \beta >0 \\ &= \frac{1}{1^{3} \Gamma(3)} x^{3 -1}e^{-\frac{x}{1}}, x>0 \end{aligned} $$

a. The probability that $2 < X < 6$ is

$$ \begin{aligned} P(2 < X < 6) &= P(X < 6) - P(X < 2)\\ &=\int_0^{6}f(x)\; dx-\int_0^{2}f(x)\; dx\\ &= 0.938 -0.3233\\ &=0.6147 \end{aligned} $$

b. The probability that $X > 8$ is

$$ \begin{aligned} P(X > 8) &= 1- P(X \leq 8)\\ &=1- \int_0^{8}f(x)\; dx\\ &= 1-0.9862\\ &=0.0138 \end{aligned} $$

c. The probability that $X \leq 6$ is

$$ \begin{aligned} P(X \leq 6)&= \int_{0}^{6} f(x)\; dx\\ &=0.938 \end{aligned} $$

Example 4 - Gamma Distribution Mean and Variance

Time spend on the internet follows a gamma distribution is a gamma distribution with mean 24 $min$ and variance 78 $min^2$.

Find the

a. parameters of gamma distribution, c. probability that time spend on the internet is between 22 to 38 minutes, b. probability that time spend on the internet is less than 28 minutes.

Solution

Let $X$ be the time spend on the internet. Given that $X\sim G(\alpha, \beta)$. The mean of $G(\alpha,\beta)$ distribution is $\alpha\beta$ and the variance is $\alpha\beta^2$.

Given that $mean =\alpha\beta=24$ and $V(X)=\alpha\beta^2=78$.

a. Thus $\beta=\frac{78}{24}=3.25$ and $\alpha = 24/3.25= 7.38$ (rounded to two decimal)

The probability density function (pdf) of gamma distribution $X$ is

$$ \begin{aligned} f(x;\alpha,\beta)&= \frac{1}{\beta^\alpha \Gamma(\alpha)} x^{\alpha -1}e^{-\frac{x}{\beta}}, x>0;\alpha, \beta >0 \\ &= \frac{1}{3.25^{7.38} \Gamma(7.38)} x^{7.38 -1}e^{-\frac{x}{3.25}}, x>0 \end{aligned} $$

b. The probability that $22 < X < 38$ is

$$ \begin{aligned} P(22 < X < 38) &= P(X < 38) - P(X < 22)\\ &=\int_0^{38}f(x)\; dx-\int_0^{22}f(x)\; dx\\ &= 0.9295 -0.4572\\ &=0.4722 \end{aligned} $$

b. The probability that $X < 28$ is

$$ \begin{aligned} P(X < 28) &=\int_0^{28}f(x)\; dx\\ &= 0.7099 \end{aligned} $$

Conclusion

I hope you find above article on Gamma Distribution Calculator educational. We have covered gamma calculator and gamma distribution examples and solutions step by step.Click on Theory to read more about Gamma distribution,graph of gamma distribution,M.G.F and C.G.F of gamma distribution.

Read more about other Statistics Calculator on below links

Related Resources