KNOWLEDGEBASE - ARTICLE #1431

Calculating P values from statistical ratios

Free web calculators 

  The easiest way to compute a P value from a statistical ratio is to use this free GraphPad QuickCalc page.  It can compute a P value from a z, t, F, chi-square or r value you enter. 


Calculations with older versions of Excel

If you want to compute P values using older (pre 2010) Excel, use these functions:

P value from F

=FDIST (F, DFn, DFd)
The order of the two degrees of freedom matters. Dfn is the degree of freedom for the numerator of the F ratio, and DFd is for the denominator.

P value from t (two tailed)

=TDIST (t, df, 2)
(The third argument, 2, specifies a two-tail P value.)

P value from Chi Square

=CHIDIST (ChiSquare, DF)

P value from z (two tailed)

=2*(1.0-NORMSDIST(z))

    

Calculations with newer versions of Excel

If you want to compute P values using newer (2010 and later) Excel, use these functions:

 

P value from F

=F.DIST.RT (F, DFn, DFd)
The order of the two degrees of freedom matters. Dfn is the degree of freedom for the numerator of the F ratio, and DFd is for the denominator.

P value from t (two tailed)

=T.DIST.2T(t, df)

P value from Chi Square

=CHISQ.DIST.RT(ChiSquare, DF)

P value from z (two tailed)

=2*(1.0-NORM.S.DIST(z,TRUE))

Algorithms used in Prism

GraphPad Prism (and InStat) report exact P values with most statistical calculations. It computes a P value from an F ratio using these algorithms, adapted from section 6.14 of the third edition of Numerical Recipes, which is available on line. 

PFromF(F_Value, DF_Numerator, DF_Denominator) =
BetaI(DF_Denominato /2, DF_Numerator/2, DF_Denominator / (DF_Denominator + DF_Numerator * F_Value))

PFromT(T_Value, DF) = BetaI(DF /2, 1/2, DF / (DF + T_Value^2))

PFromZ(Z_Value) = PFromT(Z_Value, Infinity)

PFromR(R_Value) = PFromT(|R_Value| / SQRT((1 - R_Value^2)/DF) , DF)

PFromChi2(Chi2_Value, DF) = GammaQ(DF / 2, Chi2Value /2)

 

Note that BetaI is the incomplete beta function, and GammaQ is the incomplete gamma function.

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.