From: Cameron McBride Date: 2009-11-04T11:25:30+09:00 Subject: [ruby-core:26516] Re: Add Standard Deviation Function to Math Module Hello, On Tue, Nov 3, 2009 at 16:30, Daniel Cohen wrote: > I am attaching a preliminary version of the statistics module. It implements > both kinds of standard deviation, as well as generating random numbers and > finding values for a normal distribution among other things. I have been using ruby with basic statistics for many years now, and over 90% of the time I use NArray. While I think this is generally a good idea, it might be worth considering the bounds of this module. There are a lot of statistics to implement. I'm glad you included the two typical versions of stddev. ruby's rand function implements MT19937, IIRC. NArray also uses this. The proposed statistics module uses the C rand() I believe. If so, it might be worth using the MT algorithm. For basic statistics, might I suggest things like the median and quantiles be included? > I am currently working on a feature to perform linear curve fitting or > regression on a set of points, however, I am running into trouble on how to > sum the products of the x and y. I think this might be beyond the scope of a basic Statistics module. Anyhow, just some thoughts from a lurker who loves using ruby in science applications. Cameron