Math::GSL::Statistics(3pm) User Contributed Perl Documentation Math::GSL::Statistics(3pm)

Math::GSL::Statistics - Statistical functions

    use Math::GSL::Statistics qw /:all/;
    my $data     = [17.2, 18.1, 16.5, 18.3, 12.6];
    my $mean     = gsl_stats_mean($data, 1, 5);
    my $variance = gsl_stats_variance($data, 1, 5);
    my $largest  = gsl_stats_max($data, 1, 5);
    my $smallest = gsl_stats_min($data, 1, 5);
    print qq{
    Dataset : @$data
    Sample mean           $mean
    Estimated variance    $variance
    Largest value         $largest
    Smallest value        $smallest
    };

Here is a list of all the functions in this module :

The following function are simply variants for int and char of the last functions:

You have to add the functions you want to use inside the qw /put_function_here /. You can also write use Math::GSL::Statistics qw/:all/; to use all available functions of the module. Other tags are also available, here is a complete list of all tags for this module :

For more information on the functions, we refer you to the GSL official documentation: <http://www.gnu.org/software/gsl/manual/html_node/>

Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>

Copyright (C) 2008-2023 Jonathan "Duke" Leto and Thierry Moisan

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2024-03-31 perl v5.38.2