How small is Zero?
Mostrar comentarios más antiguos
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).
Respuesta aceptada
Más respuestas (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"
Categorías
Más información sobre Analysis of Variance and Covariance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


