MATLAB: Find sigma for known normcdf parameters

normcdfsolve

Hi,
Knowing p, x and mu I would like to find the corresponding sigma for p = normcdf(x,mu,sigma). I tried with the symbolic toolbox using the following code but it failed.
syms x mu sigma
p = 1/2 - erf((2^(1/2) * (mu - x)) / (2 * sigma)) / 2
solve(p,sigma)
Thanks in advance for your help,
Philippe

Best Answer

A friend of mine found the solution :
sigma = 0.5 * (2^(1/2) * (mu - x)) / erfinv(2*(1/2-p))
Related Question