p value to z score

18 vues (au cours des 30 derniers jours)
Nuchto
Nuchto le 2 Août 2012
Commenté : Star Strider le 25 Août 2020
How do I determine the z score from a p value? Thanks!

Réponse acceptée

Star Strider
Star Strider le 3 Août 2012
Modifié(e) : Star Strider le 3 Août 2012
Using the ‘erfcinv’ function (part of core MATLAB) and writing it as an anonymous function:
z = @(p) -sqrt(2) * erfcinv(p*2);
where ‘p’ is the probability.
So:
zscore = z([0.025 0.5 0.975])
produces:
zscore =
-1.9600e+000 0.0000e+000 1.9600e+000
  12 commentaires
Rik
Rik le 25 Août 2020
A bit late maybe, but I did end up putting it on the FEX, so here is the promised link: BlandAltmanPlot. Once Mathworks gets the example tab working again for github submission, you will even be able to see a nice doc.
Star Strider
Star Strider le 25 Août 2020
Rik —
Interesting function! Thanks for the citation!

Connectez-vous pour commenter.

Plus de réponses (1)

Oleg Komarov
Oleg Komarov le 3 Août 2012
Modifié(e) : Oleg Komarov le 3 Août 2012
Use icdf() from the Statistics Toolbox.
For (standard) normal:
icdf('normal',[0.005 0.995],0,1)
  2 commentaires
Nuchto
Nuchto le 3 Août 2012
Mmm, could you put an example? How to compute z from p = 0.001?
Oleg Komarov
Oleg Komarov le 3 Août 2012
Which distribution?

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by