跳转到内容

This page is also in English.

Read it in English

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

cdf 函数

服从某个分布的变量取值至多为某个值的概率。

怎么写

cdf(distribution, x)

distribution
一个分布,例如 normal_distribution(0, 1)。接受一个表达式。
x
该值。接受一个表达式。

示例

  • FX(x), X∼N(0,1)=erf⁡(2x2)+12\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。

    在求解器中打开
  • FX(2), X∼B(5,13)=6481\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。

    在求解器中打开

示例中用到的函数

  • correlation

    两个等长列表的相关系数。

  • covariance

    两个等长列表的样本协方差。

  • affine_sde_moments

    从 x0 出发的 dX = (a + b X) dt + sigma dW 在时刻 t 的均值和方差。

  • cvar

    损失的条件风险价值:其在最差的占比 1 - level 上的期望值。

  • wiener_process

    带漂移 mu 和噪声 sigma、从 0 开始的布朗运动。

  • distributed

    变量及其所服从的分布,供概率和期望读取。