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

版本 1.1.0.0 (2.6 KB) 作者: Jorrit M
Calculates the number of standard deviations based on input probabilities
248.0 次下载
更新时间 2015/1/9

查看许可证

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

引用格式

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

MATLAB 版本兼容性
创建方式 R2011b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Special Functions 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

Fixed minor error in approximation if-statement

1.0.0.0