# stationary_distribution function

The law a process settles into over time, when it has one.

## How to write it

### stationary_distribution(process)

A normal or gamma law for the two classic processes; a note says when it holds.

**process**

A process whose drift and diffusion do not depend on time. Takes an expression.

## Examples

- $\displaystyle \operatorname{OU}(\mu, \sigma, \theta, x_{0}) \Rightarrow X_{\infty} \sim \mathcal{N}\left(\mu, \frac{\sqrt{2} \sigma}{2 \sqrt{\theta}}\right)$

  `stationary_distribution(ornstein_uhlenbeck_process(mu, sigma, theta, x0))`

  In the solver, `stationary_distribution(ornstein_uhlenbeck_process(mu, sigma, theta, x0))` gives `normal_distribution(mu, (1/2)sqrt(2)*sigma/sqrt(theta))`.

  [Open in the solver](https://hilberon.com/?q=stationary_distribution%28ornstein_uhlenbeck_process%28mu%2C%20sigma%2C%20theta%2C%20x0%29%29)
- $\displaystyle \operatorname{stationary\_distribution}(\operatorname{cox\_ingersoll\_ross\_process}(\mu, \sigma, \theta, x_{0})) = \operatorname{gamma\_distribution}\left(\frac{2 \mu \theta}{\sigma^{2}}, \frac{\sigma^{2}}{2 \theta}\right)$

  `stationary_distribution(cox_ingersoll_ross_process(mu, sigma, theta, x0))`

  In the solver, `stationary_distribution(cox_ingersoll_ross_process(mu, sigma, theta, x0))` gives `gamma_distribution(2mu*theta/sigma^2, (1/2)sigma^2/theta)`.

  [Open in the solver](https://hilberon.com/?q=stationary_distribution%28cox_ingersoll_ross_process%28mu%2C%20sigma%2C%20theta%2C%20x0%29%29)
- $\displaystyle \operatorname{stationary\_distribution}(\operatorname{ito\_process}(\left[ -x, 1 \right], \left[ x, 0 \right], t)) = \operatorname{normal\_distribution}\left(0, \frac{\sqrt{2}}{2}\right)$

  `stationary_distribution(ito_process([-x, 1], [x, 0], t))`

  In the solver, `stationary_distribution(ito_process([-x, 1], [x, 0], t))` gives `normal_distribution(0, sqrt(2)/2)`.

  [Open in the solver](https://hilberon.com/?q=stationary_distribution%28ito_process%28%5B-x%2C%201%5D%2C%20%5Bx%2C%200%5D%2C%20t%29%29)

## Functions its examples use

- [ornstein_uhlenbeck_process](https://hilberon.com/library/ornstein_uhlenbeck_process)

  A process pulled toward mu at rate theta, with noise sigma, started at x0.
- [ito_process](https://hilberon.com/library/ito_process)

  A process given by its drift and diffusion: dX = drift dt + diffusion dW.

## Related functions

- [uniform_distribution](https://hilberon.com/library/uniform_distribution)

  The continuous distribution that is equally likely anywhere between a and b.
- [weibull_distribution](https://hilberon.com/library/weibull_distribution)

  The lifetime of a unit whose chance of surviving to time x is e^(-(x/scale)^shape).
- [poisson_distribution](https://hilberon.com/library/poisson_distribution)

  The number of events in a period when they come at an average rate lambda.
- [binomial_distribution](https://hilberon.com/library/binomial_distribution)

  The number of successes in n independent trials that each succeed with chance p.
- [normal_distribution](https://hilberon.com/library/normal_distribution)

  The normal distribution with mean mu and standard deviation sigma.
- [exponential_distribution](https://hilberon.com/library/exponential_distribution)

  The waiting time for events that come at rate lambda.

---
Source: https://hilberon.com/library/stationary_distribution
