+ Reply to Thread
Results 1 to 3 of 3

Thread: P-value Formula for Z-test Statistic

  1. #1
    Points: 2,251, Level: 28
    Level completed: 68%, Points required for next Level: 49

    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    P-value Formula for Z-test Statistic




    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.

  2. #2
    Points: 6,576, Level: 53
    Level completed: 13%, Points required for next Level: 174

    Location
    Atlanta
    Posts
    113
    Thanks
    0
    Thanked 14 Times in 4 Posts
    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 by Tart; 06-17-2010 at 07:00 PM.
    Many people would sooner die than think. In fact they do. - B. Russell

  3. #3
    Devorador de queso
    Points: 95,540, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Awards:
    Posting AwardCommunity AwardDiscussion EnderFrequent Poster
    Dason's Avatar
    Location
    Tampa, FL
    Posts
    12,930
    Thanks
    307
    Thanked 2,629 Times in 2,245 Posts

    You could use an external call to R to calculate the quantiles/probabilities you need. An example of this can be found at the bottom of this page

+ Reply to Thread

           




Similar Threads

  1. F-test with 6 dummy variables. What is the formula?
    By basouille in forum Statistics
    Replies: 5
    Last Post: 03-27-2011, 01:38 PM
  2. Which test//formula to use
    By jesseka in forum Statistics
    Replies: 0
    Last Post: 10-19-2010, 11:06 AM
  3. P value two tail test estimation formula
    By ealeql in forum Probability
    Replies: 0
    Last Post: 10-10-2010, 12:44 PM
  4. what statistic test
    By pinto in forum Statistics
    Replies: 2
    Last Post: 09-17-2010, 10:12 AM
  5. Replies: 4
    Last Post: 06-09-2010, 07:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats