Statistic in Ruby on Rails

3

I have the following problem, I need my system to generate some statistical data from a vector, for example:

vetor = [1, 5, 2, 1, 6, 30, 2, 7, 2, 80]

I need to extract some data from it, like:

  • Medium

  • Medium

  • Fashion

  • Minimum

  • Maximum

  • Standard deviation

I use in version 3.2.15.

My question is the following, do you know any gems that help me in this or will I have to do everything by hand?

    
asked by anonymous 07.08.2014 / 13:43

1 answer

3

You can use the gem descriptive-statistics , you have all the statistics you mentioned.

    
07.08.2014 / 14:01