Is there any function that allow me to compute the CDF probability of a normal distribution, given a mean and sigma ? i.e. for example P( X < x ) given the normal distribution with $\bar{x}$ and $\sigma$.
I think boost have this, but I think that it is just for the standard normal distribution.
The CDF of the standard normal distribution is denoted by the Φ function: Φ(x)=P(Z≤x)=1√2π∫x−∞exp{−u22}du. As we will see in a moment, the CDF of any normal random variable can be written in terms of the Φ function, so the Φ function is widely used in probability.
The cumulative distribution function (CDF) of the standard normal distribution, usually denoted with the capital Greek letter (phi), is the integral. The related error function gives the probability of a random variable, with normal distribution of mean 0 and variance 1/2 falling in the range .
The Cumulative Distribution Function (CDF) of a real-valued random variable X, evaluated at x, is the probability function that X will take a value less than or equal to x. It is used to describe the probability distribution of random variables in a table.
You scale -- any N(m, s) can be turned into N(0,1) by dividing by s and subtracting m. So all you need is a cdf for N(0,1) which is provided by a number of libraries.
Here is a simple R example:
R> pnorm(1.96, 0, 1) # compute cdf of 1.96 for N(0,1)
[1] 0.975002
R> pnorm(1.96*3 + 2, 2, 3) # mu + sd*1.96 is really the same for N(mu, sd)
[1] 0.975002
R>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With