How small is Zero?
Ältere Kommentare anzeigen
I run some statistical analyses which result in p-values=0. Are they < the minimum positive value of a double precision (<2e-308), which is odd to me?
I am worried if another precision is used under the hood in the Statistics and Machine Learning Toolbox (e.g., corr).
Akzeptierte Antwort
Weitere Antworten (1)
format long g
A = sym(floor(randn(5,2) * 16)) / 16
cord = corr(double(A))
cors = corr(A)
corsv = vpa(cors, 16)
corsd = double(cors)
That is, the corr() function happens to be able to run on symbolic numbers, and will provide exact results over a rather wide range -- 10^-10000 not being a problem for example. So you could test your "exact 0"
Kategorien
Mehr zu Analysis of Variance and Covariance finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


