跳转到内容

This page is also in English.

Read it in English

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

Léela en español

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

日本語で読む

probability 函数

带分布的变量满足某个条件的概率。

怎么写

probability(condition, distribution)

condition
关于该变量的条件,如 x > 1 或 -1 < x < 1。接受一个条件,真或假。
distribution
变量及其分布,写作 distributed(x, d)。接受一个表达式。

示例

  • P(x>1), x∼N(0,1)=1−erf⁡(22)2\displaystyle P(x > 1),\ x \sim \mathcal{N}(0, 1) = \frac{1-\operatorname{erf}\left(\frac{\sqrt{2}}{2}\right)}{2}
    probability(x > 1, distributed(x, normal_distribution(0, 1)))

    在求解器中,probability(x > 1, distributed(x, normal_distribution(0, 1))) 的结果是 (1 - erf(sqrt(2)/2))/2。

    在求解器中打开
  • P(x2>1), x∼N(0,1)=1−erf⁡(22)\displaystyle P(x^{2} > 1),\ x \sim \mathcal{N}(0, 1) = 1-\operatorname{erf}\left(\frac{\sqrt{2}}{2}\right)
    probability(x^2 > 1, distributed(x, normal_distribution(0, 1)))

    在求解器中,probability(x^2 > 1, distributed(x, normal_distribution(0, 1))) 的结果是 1 - erf(sqrt(2)/2)。

    在求解器中打开

示例中用到的函数

  • quantile

    列表中至少有占比 q 的数据不超过的最小值,或分布中变量以概率 q 不超过的值。

  • poisson_distribution

    在一段时间内以平均速率 lambda 发生的事件的次数。

  • standard_deviation

    一组数的样本标准差,或分布的标准差。

  • pdf

    分布在某点处的密度,或离散分布取某值的概率。

  • stationary_distribution

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

  • ornstein_uhlenbeck_process

    以速率 theta 被拉向 mu、噪声为 sigma、从 x0 开始的随机过程。