P-value Formula for Z-test Statistic

#1
Hello All,

I am trying to find the formula for p-value for a z-test. Ultimately, I would like to code this in PHP, but first need to start by finding the formula. If anyone does have any helpful hints as to how to do this in PHP I would appreciate that. Thanks.
 

Tart

New Member
#2
Maybe this will help you with your search. From R (you need pnorm)

For ‘pnorm’, based on

Cody, W. D. (1993) Algorithm 715: SPECFUN - A portable FORTRAN
package of special function routines and test drivers. _ACM
Transactions on Mathematical Software_ *19*, 22-32.

For ‘qnorm’, the code is a C translation of

Wichura, M. J. (1988) Algorithm AS 241: The Percentage Points of
the Normal Distribution. _Applied Statistics_, *37*, 477-484.

http://portal.acm.org/citation.cfm?id=151273 - check here - source codes seems to be available
 
Last edited: