probability function
The probability that a condition holds for a variable with a distribution.
How to write it
probability(condition, distribution)
- condition
- A condition on the variable, such as x > 1 or -1 < x < 1. Takes a condition, true or false.
- distribution
- The variable and its distribution, written distributed(x, d). Takes an expression.
Examples
probability(x > 1, distributed(x, normal_distribution(0, 1)))In the solver,
Open in the solverprobability(x > 1, distributed(x, normal_distribution(0, 1)))gives(1 - erf(sqrt(2)/2))/2.probability(x^2 > 1, distributed(x, normal_distribution(0, 1)))In the solver,
Open in the solverprobability(x^2 > 1, distributed(x, normal_distribution(0, 1)))gives1 - erf(sqrt(2)/2).
Functions its examples use
- distributed
A variable and the distribution it follows, as probability and expectation read it.
- normal_distribution
The normal distribution with mean mu and standard deviation sigma.
Related functions
- quantile
The smallest value with at least a share q of a list, or a chance q of a distribution, at or below it.
- poisson_distribution
The number of events in a period when they come at an average rate lambda.
- standard_deviation
The sample standard deviation of a list of numbers, or that of a distribution.
- pdf
The density of a distribution at a point, or the probability of a value for a discrete one.
- stationary_distribution
The law a process settles into over time, when it has one.
- ornstein_uhlenbeck_process
A process pulled toward mu at rate theta, with noise sigma, started at x0.