help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sum algorithm


From: Patrick Alken
Subject: Re: Sum algorithm
Date: Wed, 9 Dec 2020 20:55:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hello,

  GSL uses the Welford algorithm, which is based on recurrence relations
for mean and variance. See

https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford%27s_online_algorithm

Source code here:

https://git.savannah.gnu.org/cgit/gsl.git/tree/statistics/mean_source.c
https://git.savannah.gnu.org/cgit/gsl.git/tree/statistics/variance_source.c

Reference:

Welford, B. P. (1962). "Note on a method for calculating corrected sums
of squares and products". /Technometrics
<https://en.wikipedia.org/wiki/Technometrics>/. *4* (3): 419–420. doi
<https://en.wikipedia.org/wiki/Doi_(identifier)>:10.2307/1266577
<https://doi.org/10.2307%2F1266577>. JSTOR
<https://en.wikipedia.org/wiki/JSTOR_(identifier)> 1266577
<https://www.jstor.org/stable/1266577>.

Patrick

On 12/9/20 5:23 PM, Dante Doménech wrote:
> Hello.
> It's a fast question. When the library calculates mean value, variance and
> others, in order to sum, does it use the kahan ( if yes, normal or second
> order ), or pairwise summation or something else?
> Thanks for your help.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]