The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Statistics::Table::t - Perl module for the statistical t-test


  use Statistics::Table::t;

  @data = (3, 4, 3, 6, 3, 2, 8, 10, 4, 5, 6);  # Your data
  $t = t(\@data, 2);                 # The 3 is the mean you were expecting
  ($lo, $hi) = t_significance($t, scalar(@data) - 1, 1);

  print "The probability that your data is not due to chance: \n";
  print "More than $lo and less than $hi. \n";


Stub documentation for Statistics::Table::t was created by h2xs. It looks like the author of the extension was negligent enough to leave the stub unedited.

Actually, he wasn't, but he's amazed that there's no better tool for creating modules than something designed to convert C headers files to XS stubs.


Jon Orwant,



Chapter 15 of Mastering Algorithms in Perl, O'Reilly, 1999.