Inverse CDF for Scaled Normal Distribution
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a cumulative distribution function of the form:
This CDF can easily be written in MATLAB using the normcdf command as:
F = @(x) normcdf((a*x-b)/g(x),0,1);
I want to create a function handle for the inverse CDF (ICDF). If a=1 and g(x) is a constant, then the ICDF can simply be written as:
F_inv = @(Pr) norminv(Pr,b,g(x));
However neither of these conditions apply for me. One solution for creating a function handle for the ICDF is to invert F using the fzero() function:
F_inv = @(Pr) fzero(@(x) F(x)-Pr,x0); % x0 is an interval (a guess) where F(x)-Pr crosses the line y=0.
This however seems clunky and wont work if the guess for x0 does not contain the crossing point...is there a better way to do this?
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!