# stationary_distribution 函数

过程随时间趋于的分布，若存在的话。

## 怎么写

### stationary_distribution(process)

两个经典过程的正态或伽马分布；并注明其成立的条件。

**process**

漂移和扩散不依赖于时间的过程。接受一个表达式。

## 示例

- $\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))`

  在求解器中，`stationary_distribution(ornstein_uhlenbeck_process(mu, sigma, theta, x0))` 的结果是 `normal_distribution(mu, (1/2)sqrt(2)*sigma/sqrt(theta))`。

  [在求解器中打开](https://zh.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))`

  在求解器中，`stationary_distribution(cox_ingersoll_ross_process(mu, sigma, theta, x0))` 的结果是 `gamma_distribution(2mu*theta/sigma^2, (1/2)sigma^2/theta)`。

  [在求解器中打开](https://zh.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))`

  在求解器中，`stationary_distribution(ito_process([-x, 1], [x, 0], t))` 的结果是 `normal_distribution(0, sqrt(2)/2)`。

  [在求解器中打开](https://zh.hilberon.com/?q=stationary_distribution%28ito_process%28%5B-x%2C%201%5D%2C%20%5Bx%2C%200%5D%2C%20t%29%29)

## 示例中用到的函数

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

  以速率 theta 被拉向 mu、噪声为 sigma、从 x0 开始的随机过程。
- [ito_process](https://zh.hilberon.com/library/ito_process)

  由漂移项和扩散项给出的过程：dX = drift dt + diffusion dW。

## 相关函数

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

  在 a 与 b 之间任何位置等可能的连续分布。
- [weibull_distribution](https://zh.hilberon.com/library/weibull_distribution)

  一个单元存活到时间 x 的概率为 e^(-(x/scale)^shape) 时的寿命。
- [poisson_distribution](https://zh.hilberon.com/library/poisson_distribution)

  在一段时间内以平均速率 lambda 发生的事件的次数。
- [binomial_distribution](https://zh.hilberon.com/library/binomial_distribution)

  n 次独立试验中成功的次数，每次试验成功的概率为 p。
- [normal_distribution](https://zh.hilberon.com/library/normal_distribution)

  均值为 mu、标准差为 sigma 的正态分布。
- [exponential_distribution](https://zh.hilberon.com/library/exponential_distribution)

  以速率 lambda 发生的事件的等待时间。

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