 # Equations of supported distributions¶

The following expressions provide the equations for the Probability Density Function (PDF), Cumulative Distribution Function (CDF), Survival Function (SF) (this is the same as the reliability function R(t)), Hazard Function (HF), and Cumulative Hazard Function (CHF) of all supported distributions. Readers should note that there are many ways to write the equations for probability distributions and careful attention should be afforded to the parametrization to ensure you understand each parameter. For more equations of these distributions, see the textbook “Probability Distributions Used in Reliability Engineering” listed in recommended resources.

## Weibull Distribution¶

$$\alpha$$ = scale parameter $$( \alpha > 0 )$$

$$\beta$$ = shape parameter $$( \beta > 0 )$$

Limits $$( t \geq 0 )$$

$$\text{PDF:} \hspace{11mm} f(t) = \frac{\beta t^{ \beta - 1}}{ \alpha^ \beta} {\rm e}^{-(\frac{t}{\alpha })^ \beta }$$

$$\hspace{31mm} = \frac{\beta}{\alpha}\left(\frac{t}{\alpha}\right)^{(\beta-1)}{\rm e}^{-(\frac{t}{\alpha })^ \beta }$$

$$\text{CDF:} \hspace{10mm} F(t) = 1 - {\rm e}^{-(\frac{t}{\alpha })^ \beta }$$

$$\text{SF:} \hspace{14mm} R(t) = {\rm e}^{-(\frac{t}{\alpha })^ \beta }$$

$$\text{HF:} \hspace{14mm} h(t) = \frac{\beta}{\alpha} (\frac{t}{\alpha})^{\beta -1}$$

$$\text{CHF:} \hspace{9mm} H(t) = (\frac{t}{\alpha})^{\beta}$$

## Exponential Distribution¶

$$\lambda$$ = scale parameter $$( \lambda > 0 )$$

Limits $$( t \geq 0 )$$

$$\text{PDF:} \hspace{11mm} f(t) = \lambda {\rm e}^{-\lambda t}$$

$$\text{CDF:} \hspace{10mm} F(t) = 1 - {\rm e}^{-\lambda t}$$

$$\text{SF:} \hspace{14mm} R(t) = {\rm e}^{-\lambda t}$$

$$\text{HF:} \hspace{14mm} h(t) = \lambda$$

$$\text{CHF:} \hspace{9mm} H(t) = \lambda t$$

Note that some parametrizations of the Exponential distribution (such as the one in scipy.stats) use $$\frac{1}{\lambda}$$ in place of $$\lambda$$.

## Normal Distribution¶

$$\mu$$ = location parameter $$( -\infty < \mu < \infty )$$

$$\sigma$$ = scale parameter $$( \sigma > 0 )$$

Limits $$( -\infty < t < \infty )$$

$$\text{PDF:} \hspace{11mm} f(t) = \frac{1}{\sigma \sqrt{2 \pi}}{\rm exp}\left[-\frac{1}{2}\left(\frac{t - \mu}{\sigma}\right)^2\right]$$

$$\hspace{31mm} = \frac{1}{\sigma}\phi \left[ \frac{t - \mu}{\sigma} \right]$$

where $$\phi$$ is the standard normal PDF with $$\mu = 0$$ and $$\sigma=1$$

$$\text{CDF:} \hspace{10mm} F(t) = \frac{1}{\sigma \sqrt{2 \pi}} \int^t_{-\infty} {\rm exp}\left[-\frac{1}{2}\left(\frac{\theta - \mu}{\sigma}\right)^2\right] {\rm d} \theta$$

$$\hspace{31mm} =\frac{1}{2}+\frac{1}{2}{\rm erf}\left(\frac{t - \mu}{\sigma \sqrt{2}}\right)$$

$$\hspace{31mm} = \Phi \left( \frac{t - \mu}{\sigma} \right)$$

where $$\Phi$$ is the standard normal CDF with $$\mu = 0$$ and $$\sigma=1$$

$$\text{SF:} \hspace{14mm} R(t) = 1 - \Phi \left( \frac{t - \mu}{\sigma} \right)$$

$$\hspace{31mm} = \Phi \left( \frac{\mu - t}{\sigma} \right)$$

$$\text{HF:} \hspace{14mm} h(t) = \frac{\phi \left[\frac{t-\mu}{\sigma}\right]}{\sigma \left( \Phi \left[ \frac{\mu - t}{\sigma} \right] \right)}$$

$$\text{CHF:} \hspace{9mm} H(t) = -{\rm ln}\left[\Phi \left(\frac{\mu - t}{\sigma}\right)\right]$$

## Lognormal Distribution¶

$$\mu$$ = scale parameter $$( -\infty < \mu < \infty )$$

$$\sigma$$ = shape parameter $$( \sigma > 0 )$$

Limits $$( t \geq 0 )$$

$$\text{PDF:} \hspace{11mm} f(t) = \frac{1}{\sigma t \sqrt{2\pi}} {\rm exp} \left[-\frac{1}{2} \left(\frac{{\rm ln}(t)-\mu}{\sigma}\right)^2\right]$$

$$\hspace{31mm} = \frac{1}{\sigma t}\phi \left[ \frac{{\rm ln}(t) - \mu}{\sigma} \right]$$

where $$\phi$$ is the standard normal PDF with $$\mu = 0$$ and $$\sigma=1$$

$$\text{CDF:} \hspace{10mm} F(t) = \frac{1}{\sigma \sqrt{2\pi}} \int^t_0 \frac{1}{\theta} {\rm exp} \left[-\frac{1}{2} \left(\frac{{\rm ln}(\theta)-\mu}{\sigma}\right)^2\right] {\rm d}\theta$$

$$\hspace{31mm} =\frac{1}{2}+\frac{1}{2}{\rm erf}\left(\frac{{\rm ln}(t) - \mu}{\sigma \sqrt{2}}\right)$$

$$\hspace{31mm} = \Phi \left( \frac{{\rm ln}(t) - \mu}{\sigma} \right)$$

where $$\Phi$$ is the standard normal CDF with $$\mu = 0$$ and $$\sigma=1$$

$$\text{SF:} \hspace{14mm} R(t) = 1 - \Phi \left( \frac{{\rm ln}(t) - \mu}{\sigma} \right)$$

$$\text{HF:} \hspace{14mm} h(t) = \frac{\phi \left[ \frac{{\rm ln}(t) - \mu}{\sigma} \right]}{t \sigma \left(1 - \Phi \left( \frac{{\rm ln}(t) - \mu}{\sigma} \right)\right)}$$

$$\text{CHF:} \hspace{9mm} H(t) = -{\rm ln}\left[1 - \Phi \left( \frac{{\rm ln}(t) - \mu}{\sigma} \right)\right]$$

## Gamma Distribution¶

$$\alpha$$ = scale parameter $$( \alpha > 0 )$$

$$\beta$$ = shape parameter $$( \beta > 0 )$$

Limits $$( t \geq 0 )$$

$$\text{PDF:} \hspace{11mm} f(t) = \frac{t^{\beta-1}}{\Gamma(\beta)\alpha^\beta}{\rm e}^{-\frac{t}{\alpha}}$$

where $$\Gamma(x)$$ is the complete gamma function. $$\Gamma (x) = \int^\infty_0 t^{x-1}{\rm e}^{-t} {\rm d}t$$

$$\text{CDF:} \hspace{10mm} F(t) = \frac{1}{\Gamma (\beta)} \gamma\left(\beta,\frac{t}{\alpha}\right)$$

where $$\gamma(x,y)$$ is the lower incomplete gamma function. $$\gamma (x,y) = \frac{1}{\Gamma(x)} \int^y_0 t^{x-1}{\rm e}^{-t} {\rm d}t$$

$$\text{SF:} \hspace{14mm} R(t) = \frac{1}{\Gamma (\beta)} \Gamma\left(\beta,\frac{t}{\alpha}\right)$$

where $$\Gamma(x,y)$$ is the upper incomplete gamma function. $$\Gamma (x,y) = \frac{1}{\Gamma(x)} \int^\infty_y t^{x-1}{\rm e}^{-t} {\rm d}t$$

$$\text{HF:} \hspace{14mm} h(t) = \frac{t^{\beta-1}{\rm exp}\left(-\frac{t}{\alpha}\right)}{\alpha^\beta\Gamma\left(\beta,\frac{t}{\alpha}\right)}$$

$$\text{CHF:} \hspace{9mm} H(t) = -{\rm ln}\left[\frac{1}{\Gamma (\beta)} \Gamma\left(\beta,\frac{t}{\alpha}\right)\right]$$

Note that some parametrizations of the Gamma distribution use $$\frac{1}{\alpha}$$ in place of $$\alpha$$. There is also an alternative parametrization which uses shape and rate instead of shape and scale. See Wikipedia for an example of this.

## Beta Distribution¶

$$\alpha$$ = shape parameter $$( \alpha > 0 )$$

$$\beta$$ = shape parameter $$( \beta > 0 )$$

Limits $$(0 \leq t \leq 1 )$$

$$\text{PDF:} \hspace{11mm} f(t) = \frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}.t^{\alpha-1}(1-t)^{\beta-1}$$

$$\hspace{31mm} =\frac{1}{B(\alpha,\beta)}.t^{\alpha-1}(1-t)^{\beta-1}$$

where $$\Gamma(x)$$ is the complete gamma function. $$\Gamma (x) = \int^\infty_0 t^{x-1}{\rm e}^{-t} {\rm d}t$$

where $$B(x,y)$$ is the complete beta function. $$B(x,y) = \int^1_0 t^{x-1}(1-t)^{y-1} {\rm d}t$$

$$\text{CDF:} \hspace{10mm} F(t) = \frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)} \int^t_0 \theta^{\alpha-1}(1-\theta)^{\beta-1} {\rm d}\theta$$

$$\hspace{31mm} =\frac{B_t(t|\alpha,\beta)}{B(\alpha,\beta)}$$

$$\hspace{31mm} =I_t(t|\alpha,\beta)$$

where $$B_t(t|x,y)$$ is the incomplete beta function. $$B_t(t|x,y) = \int^t_0 \theta^{x-1}(1-\theta)^{y-1} {\rm d}\theta$$

where $$I_t(t|x,y)$$ is the regularized incomplete beta function which is defined in terms of the incomplete beta function and the complete beta function. $$I_t(t|x,y)=\frac{B_t(t|x,y)}{B(x,y)}$$

$$\text{SF:} \hspace{14mm} R(t) = 1 - I_t(t|\alpha,\beta)$$

$$\text{HF:} \hspace{14mm} h(t) = \frac{t^{\alpha-1}(1-t)}{B(\alpha,\beta)-B_t(t|\alpha,\beta)}$$

$$\text{CHF:} \hspace{9mm} H(t) = -{\rm ln}\left[1 - I_t(t|\alpha,\beta)\right]$$

Note that there is a parameterization of the Beta distribution that changes the lower and upper limits beyond 0 and 1. For this parametrization, see the reference listed in the opening paragraph of this page.

## Loglogistic Distribution¶

$$\alpha$$ = scale parameter $$( \alpha > 0 )$$

$$\beta$$ = shape parameter $$( \beta > 0 )$$

Limits $$( t \geq 0 )$$

$$\text{PDF:} \hspace{11mm} f(t) = \frac{\left( \frac{\beta}{\alpha}\right) {\left( \frac{t}{\alpha} \right)}^{\beta - 1}}{{\left(1+{\left(\frac{t}{\alpha}\right)}^{\beta} \right)}^{2}}$$

$$\text{CDF:} \hspace{10mm} F(t) = \frac{1}{1+{\left(\frac{t}{\alpha} \right)}^{-\beta}}$$

$$\hspace{31mm} = \frac{{\left(\frac{t}{\alpha} \right)}^{\beta}}{1+{\left(\frac{t}{\alpha} \right)}^{\beta}}$$

$$\hspace{31mm} = \frac{{t}^{\beta}}{{\alpha}^{\beta}+{t}^{\beta}}$$

$$\text{SF:} \hspace{14mm} R(t) = \frac{1}{1+{\left(\frac{t}{\alpha} \right)}^{\beta}}$$

$$\text{HF:} \hspace{14mm} h(t) = \frac{\left( \frac{\beta}{\alpha}\right) {\left( \frac{t}{\alpha} \right)}^{\beta - 1}}{1+{\left(\frac{t}{\alpha} \right)}^{\beta}}$$

$$\text{CHF:} \hspace{9mm} H(t) = ln \left(1+{\left(\frac{t}{\alpha} \right)}^{\beta} \right)$$

There is another parameterization of the loglogistic distribution using $$\mu$$ and $$\sigma$$ which is designed to look more like the parametrization of the logistic distribution and is related to the above parametrization by $$\mu = ln(\alpha)$$ and $$\sigma = \frac{1}{\beta}$$. This parametrisation can be found here.

## Gumbel Distribution¶

$$\mu$$ = location parameter $$( -\infty < \mu < \infty )$$

$$\sigma$$ = scale parameter $$( \sigma > 0 )$$

Limits $$( -\infty < t < \infty )$$

$$\text{PDF:} \hspace{11mm} f(t) = \frac{1}{\sigma}{\rm e}^{z-{\rm e}^{z}}$$

where $$z = \frac{t-\mu}{\sigma}$$

$$\text{CDF:} \hspace{10mm} F(t) = 1-{\rm e}^{-{\rm e}^{z}}$$

$$\text{SF:} \hspace{14mm} R(t) = {\rm e}^{-{\rm e}^{z}}$$

$$\text{HF:} \hspace{14mm} h(t) = \frac{{\rm e}^{z}}{\sigma}$$

$$\text{CHF:} \hspace{9mm} H(t) = {\rm e}^{z}$$

The parametrization of the Gumbel Distribution shown above is also known as the Smallest Extreme Value (SEV) distribution. There are several types of extreme value distributions, and the article on Wikipedia is for the Largest Extreme Value (LEV) distribution. There is only a slight difference in the parametrisation between SEV and LEV distributions, but this change effectively flips the PDF about $$\mu$$ to give the LEV positive skewness (a longer tail to the right), while the SEV has negative skewness (a longer tail to the left).

## Location shifting the distributions¶

Within reliability the parametrization of the Exponential, Weibull, Gamma, Lognormal, and Loglogistic distributions allows for location shifting using the gamma parameter. This will simply shift the distribution’s lower limit to the right from 0 to $$\gamma$$. In the location shifted form of the distributions, the equations listed above are almost identical, except everywhere you see $$t$$ replace it with $$t - \gamma$$. The reason for using the location shifted form of the distribution is because some phenomena that can be modelled well by a certain probability distribution do not begin to occur immediately, so it becomes necessary to shift the lower limit of the distribution so that the data can be accurately modelled by the distribution.

If implementing this yourself, ensure you set all y-values to 0 for $$t \leq \gamma$$ as the raw form of the location shifted distributions above will not automatically zeroise these values for you and may result in negative values. This zeroizing is done automatically within reliability.

## Relationships between the five functions¶

The PDF, CDF, SF, HF, CHF of a probability distribution are inter-related and any of these functions can be obtained by applying the correct transformation to any of the others. The following list of transformations are some of the most useful:

$${\rm PDF} = \frac{d}{dt} {\rm CDF}$$

$${\rm CDF} = \int_{-\infty}^t {\rm PDF}$$

$${\rm SF} = 1 - {\rm CDF}$$

$${\rm HF} = \frac{{\rm PDF}}{{\rm SF}}$$

$${\rm CHF} = -{\rm ln} \left({\rm SF} \right)$$