Statistics function incorrectly computing median
Ben Abbott
bpabbott at mac.com
Mon Jan 21 07:55:30 CST 2008
On Jan 21, 2008, at 8:44 AM, Miguel Garcia-Blanco wrote:
>> Are any of the licenses for any of those GPL compatible?
>>
>
> Acklam's code seems to be free: "This is a collection of m-files
> that I have
> made and found useful. Since there is no need to re-invent the
> wheel, please
> feel free to download them and use them as much as you like. If you
> have any
> comments or suggestions or find any bugs, please let me know." [1]
>
> Holtsberg's code is part of MatLinks/Chorus, an open source project.
> All
> programs are released under the GNU General Public License. [2]
>
> Makeig/Finelli's code is also released under the GNU General Public
> License.
> (See the function description.)
>
> [1] http://home.online.no/~pjacklam/matlab/software/util/index.html
> [2]
> http://www.koders.com/matlab/fid9DF04B498C49787536458498B2E2DECDA8D79BEE.aspx
>
>> Any chance they permit the sample values to non-equal probabilities?
>>
>
> To the best of my knowledge, the underlying (population) probability
> distribution is irrelevant. (Although, as I have said previously,
> whether
> the population is continuous or discrete could be important.) In
> computing
> sample quantiles, these functions act just like mean() and std(): They
> compute sample statistics.
>
> -Miguel
In the octave scripts, the routines take samples and sample
probabilities as inputs.
Thus x = [1, 1, 2, 3] & p = [.25 .25 .25 .25] is equivalent to x = [1,
2, 3] & p = [0.5, 0.25, 0.25].
As a result, some of the algorithms are not applicable to the
architecture of octave's present statistical functions.
However, I believe it possible to develop an algorithm that works when
certain assumptions are made.
Thanks
Ben
More information about the Bug-octave
mailing list