qnorm(matProbabilit​ies,dblMean,matSigm​as,boolUseApproxima​tion)

Version 1.1.0.0 (2,6 KB) von Jorrit M
Calculates the number of standard deviations based on input probabilities
247 Downloads
Aktualisiert 9. Jan 2015

Lizenz anzeigen

This function uses the normal inverse distribution function to compute the number of standard deviations that probability values are away from the mean, assuming a Gaussian distribution; i.e., it transforms known probabilities to standard deviation units (see also: http://en.wikipedia.org/wiki/Probit )
Syntax: matSigmaOut = qnorm(matProbabilities,dblMean,matSigmas,boolUseApproximation)
By Jorrit Montijn, 08-01-15 (University of Amsterdam), based on original code by Anders Holtsberg, 13-05-94. Improvements include:
- Approximation of inverse error function using scaled logarithmic function for probability values lower than "eps" (~8sd)
- Corrected potential input check failure for matrices with more than 2 dimensions
- Comments added and code made more readable

N.B.: for output values of >~8 sd's the returned values are approximations and are not directly computed using erfinv(). The logarithmic approximator function is relatively precise, but caution is advised. If you do not wish to use this approximation, supply a fourth input argument set to 'false'; the function will then return 'Inf' where the direct computation fails

Any suggestions on improvements on the approximator function of the inverse error function are welcome

Zitieren als

Jorrit M (2024). qnorm(matProbabilities,dblMean,matSigmas,boolUseApproximation) (https://www.mathworks.com/matlabcentral/fileexchange/48978-qnorm-matprobabilities-dblmean-matsigmas-booluseapproximation), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2011b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Special Functions finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.1.0.0

Fixed minor error in approximation if-statement

1.0.0.0