Convert Z-score (Z-value, standard score) to p-value for normal distribution in Python

后端 未结 7 1817
野趣味
野趣味 2020-12-12 18:19

How does one convert a Z-score from the Z-distribution (standard normal distribution, Gaussian distribution) to a p-value? I have yet to find the magical function in Scipy\'

相关标签:
7条回答
  • 2020-12-12 18:46
    p_value = scipy.stats.norm.pdf(abs(z_score_max)) #one-sided test 
    p_value = scipy.stats.norm.pdf(abs(z_score_max))*2 # two - sided test
    

    The probability density function (pdf) function in python yields values p-values that are drawn from a z-score table in a intro/AP stats book.

    0 讨论(0)
提交回复
热议问题