Alec
Alec

Reputation: 4482

Inverse of cumulative probabilty (CDF) in Julia?

If I have a value, such as 0.5 for a standard normal distribution, how do I convert that into a random outcome?

E.g. I am looking for the function f such that f(0.5) = 0.0 for a standard normal distribution.

Upvotes: 0

Views: 863

Answers (1)

jling
jling

Reputation: 2301

julia> using Distributions
[ Info: Precompiling Distributions [31c24e10-a181-5473-b8eb-7969acd0382f]

julia> quantile(Normal(), 0.5)
0.0

doc says:

Evaluate the inverse cumulative distribution function at q.

Upvotes: 5

Related Questions