docs\descriptive

Descriptive statistics

These are the statistics that describe the given data.

The following are functions for doing descriptive statistics:

  • mean

  • median

  • mode

  • percentile

  • range

  • IQR (interquartile range)

  • mad

  • fivenum

  • sd

  • coef_variation

They are available with

use Statistics;
my @data1 = [6,6,4,6,8,6,8,4,4,6,6,8,8,8,8,8,8,4,4,4,4,8,8,8,8,4,4,4,8,6,8,4];
my @data2 = [160.0,160.0,108.0,258.0,360.0,225.0,360.0,146.7,140.8,167.6,167.6,
            275.8,275.8,275.8,472.0,460.0,440.0,78.7,75.7,71.1,120.1,318.0,304.0,
            350.0,400.0,79.0,120.3,95.1,351.0,145.0,301.0,121.0];

# central tendency
mean(@data1); # 6.1875
median(@data1); # 6

# sample standard deviation
sd(@data1); # 1.7859216469465444

# population standard deviation
sd(@data1, sample => False); # 1.757795138803154

# Coefficient of variation
coef_variation(@data2); # 53.71779066522493

# Five number summary
fivenum(@data2); # (71.1 120.65 196.3 334 472)

Statistics v0.0.6

Doing statistics in Raku

Authors

  • Suman Khanal

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • Correlation::BiweightMid
  • Correlation::Kendall
  • Correlation::PearsonSpearman
  • Descriptive::CentralTendency
  • Descriptive::Dispersion
  • Descriptive::FiveNum
  • Descriptive::Kurtosis
  • Descriptive::Skewness
  • Misc
  • Probability::Distribution
  • Statistics

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.