Statistics::DependantTTest - Perl module to perform Student's dependant or paired T-test on 2 paired samples.
use Statistics::DependantTTest; use Statistics::Distributions;
my @before_values=('5','5','6','7','7'); my @after_values=('5','6','6.5','6.5','7.5');
my $t_test = new DependantTTest; $t_test->load_data('before',@before_values); $t_test->load_data('after',@after_values); my ($t_value,$deg_freedom) = $t_test->perform_t_test('before','after'); my ($p_value) = Statistics::Distributions::tprob ($deg_freedom,$t_value);
This is the statistical T-Test module to compare 2 paired data sets. It takes 2 arrays of values and will return the t value and degrees of freedom in order to test the null hypothesis. The t values and degrees of freedom may be correlated to a p value using the Statistics::Distributions module.
Martin Lee, Star Technology Group (mlee@startechgroup.co.uk)
Statistics::Distributions Statistics::TTest
To install Statistics::DependantTTest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Statistics::DependantTTest
CPAN shell
perl -MCPAN -e shell install Statistics::DependantTTest
For more information on module installation, please visit the detailed CPAN module installation guide.