7 Replies Latest reply: Jan 28, 2013 7:05 AM by Hiroto
Axxlb Level 1 Level 1 (0 points)

hi ! i discovered statistical functions in numbers, and did a t-test

but I'd be very interested in calculating also the statistical significance, as a "p-value" (or alpha risk)

is there a way in Numbers, or adding a plug-in?

thanks a lot

Numbers iWork, OS X Mountain Lion (10.8.2)
  • Jerrold Green1 Level 7 Level 7 (29,945 points)



    TDIST is used in Excel to calculate p-values, and the same function is included in Numbers. Use the Function Browser to review the syntax for the function:


    The TDIST function returns the probability from the student’s t-distribution.

    • TDIST(non-neg-x-value, degrees-freedom, tails)
      • non-neg-x-value:  The value at which you want to evaluate the function. non-neg-x-value is a number value that must be greater than or equal to 0.
      • degrees-freedom:  Degrees of freedom. degrees-freedom is a number value and must be greater than or equal to 1.
      • tails:  The number of tails to return.
        • one tail (1)Return the value for a one-tailed distribution.
        • two tails (2)Return the value for a two-tailed distribution.




  • Hiroto Level 5 Level 5 (6,030 points)



    As far as I know, TTEST() function returns the p-value of the specified t-test.




  • Axxlb Level 1 Level 1 (0 points)


    thank you very much, it seems working  with TDIST, which in french is LOI.STUDENT

    thanks a lot!



    isn't that the t value with t-test only?

  • Axxlb Level 1 Level 1 (0 points)

    actually, the ttest function might return the pvalue. in that case, how can I have my t value???


  • Hiroto Level 5 Level 5 (6,030 points)



    The maps between t value and p value are provided by TINV() and TDIST().


    t value = TINV(p value, degrees of freedom)
    p value = TDIST(t value, degrees of freedom, number of tails)


    The t distribution is determined by the degrees of freedom (d.o.f.) of the t statistic in use and the d.o.f. is determined by the type of t-test and the sample size.



    For t-test of paired samples X (sample size = N, i.e., pair count = N, data count = 2 * N), d.o.f. = N - 1.

    For t-test of two independent samples X1, X2 assumed to have equal population variance (sample size = N1, N2 resp.), d.o.f. = N1 + N2 - 2.


    If you want t value, you may a) use t = TINV(TTEST(), d.o.f.) or b) calculate it directly from sample data without using TTEST() function.




    p = TTEST(samples_1, samples_2, 2, 2)


    is equivalent to -


    X1 = samples_1
    X2 = samples_2
    N1 = COUNT(X1)
    N2 = COUNT(X2)
    PV = (VAR(X1) * (N1 - 1) + VAR(X2) * (N2 - 1)) / (N1 + N2 - 2)
    t = (SUM(X1) / N1 - SUM(X2) / N2) / SQRT(PV * (1 / N1 + 1 / N2))
    p = TDIST( ABS(t), N1 + N2 - 2, 2)


    *PV is pooled variance.


    Hope this helps,


  • Axxlb Level 1 Level 1 (0 points)

    cool, I think I got it, thank you very much !

    then, i'm using the TINV and the TTEST functions


    thanks again!

  • Hiroto Level 5 Level 5 (6,030 points)

    You're quite welcome! Glad to be of help.


    Best wishes,