# cdf 関数

ある分布に従う変数が値以下になる確率。

## 書き方

### cdf(distribution, x)

**distribution**

normal_distribution(0, 1) のような分布。式を受け取ります。

**x**

値。式を受け取ります。

## 例題

- $\displaystyle F_{X}(x),\ X \sim \mathcal{N}(0, 1) = \frac{\operatorname{erf}\left(\frac{\sqrt{2} x}{2}\right)+1}{2}$

  `cdf(normal_distribution(0, 1), x)`

  ソルバーでは、`cdf(normal_distribution(0, 1), x)` の答えは `(erf(sqrt(2)*x/2) + 1)/2` です。

  [ソルバーで開く](https://ja.hilberon.com/?q=cdf%28normal_distribution%280%2C%201%29%2C%20x%29)
- $\displaystyle F_{X}(2),\ X \sim \mathrm{B}\left(5, \frac{1}{3}\right) = \frac{64}{81}$

  `cdf(binomial_distribution(5, 1/3), 2)`

  ソルバーでは、`cdf(binomial_distribution(5, 1/3), 2)` の答えは `64/81` です。

  [ソルバーで開く](https://ja.hilberon.com/?q=cdf%28binomial_distribution%285%2C%201%2F3%29%2C%202%29)

## 例題で使っている関数

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

  平均 mu、標準偏差 sigma の正規分布。
- [binomial_distribution](https://ja.hilberon.com/library/binomial_distribution)

  n回の独立な試行のうち成功する回数。各試行は確率pで成功します。

## 関連する関数

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

  同じ長さの2つのリストの相関係数。
- [covariance](https://ja.hilberon.com/library/covariance)

  同じ長さの2つのリストの標本共分散。
- [affine_sde_moments](https://ja.hilberon.com/library/affine_sde_moments)

  dX = (a + b X) dt + sigma dW の時刻tにおける平均と分散（x0から開始）。
- [cvar](https://ja.hilberon.com/library/cvar)

  損失の条件付きバリュー・アット・リスク：最悪の割合1 - levelにわたるその期待値です。
- [wiener_process](https://ja.hilberon.com/library/wiener_process)

  ドリフト mu とノイズ sigma をもつ、0 から始まるブラウン運動。
- [distributed](https://ja.hilberon.com/library/distributed)

  確率と期待値が読むところの、変数とそれが従う分布。

---
Source: https://ja.hilberon.com/library/cdf
