[squeak-dev] statistics: standard deviation
Douglas McPherson
djm1329 at san.rr.com
Sat Nov 17 07:51:55 UTC 2012
You could try the following, assuming your data is in a collection called "data".
standardDeviation
| accumulator |
accumulator := DhbStatisticalMoments new.
data do: [:each | accumulator accumulate: each]].
^accumulator standardDeviation
Also, see the tests in DhbNumericalMethodsTestCase.
DhbNumericalMethodsTestCase>>testStatisticalMoments
DhbNumericalMethodsTestCase>>testStatisticalMomentsFast
HTH
On Nov 15, 2012, at 16:34 , Sungjin Chun wrote:
> You can consult this book "Object-Oriented Implementation of Numerical Methods" for the code, especially Dhb... classes.
>
>
> On Fri, Nov 16, 2012 at 9:30 AM, Joseph J Alotta <joseph.alotta at gmail.com> wrote:
> I looked at the repositories that you mention and there is nothing there that I can work with. It is this very vast
> collection of code that has no documentation and no description.
>
> There seems to be methods for standard deviation but it involves subtracting moments from a larger object that calculated it somehow and is not to be found. It seems that one needs a vast understanding of the inner workings of smalltalk to use these classes. I was under the impression that knowledge of the hacky things is supposed to be hidden from a casual user or at least this is the design principle that is not followed.
>
> It is funny to me that there is not a simple answer to a simple question like this and I am left to coding standard deviation for myself.
>
>
>
> > On Nov 15, 2012, at 5:12, Joseph J Alotta <joseph.alotta at gmail.com> wrote:
> >
> >> Does anyone know where I can find methods for statistics, like standard deviation?
> >>
> >> Regression would be nice also.
> >>
> >> Sincerely,
> >>
> >> Joe.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20121116/0ce3d458/attachment.htm
More information about the Squeak-dev
mailing list
|