The array doesn't represent a list of values but rather a distribution of 
values where each y represents the weight of its x value. Changing your list to 
1 2 3 4 5 6 7 8 9 will make it more clear to understand because the actual 
values are then: 0 1 1 2 2 2 3 3 3 3 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 6 6 7 7 7 
7 7 7 7 7 8 8 8 8 8 8 8 8 8.  Therefore 6 is the correct median.

Christof

> Gesendet: Freitag, 23. Dezember 2016 um 21:55 Uhr
> Von: "cyrille henry" <[email protected]>
> An: "[email protected]" <[email protected]>
> Betreff: [PD] array quantile problem
>
> Hello,
> 
> I'm trying to use the [array quantile] object, but it is not doing what I 
> understand from the documentation.
> the help file specify that the 0.5 quantile is the median.
> I'm using the wikipedia definition of the median :
> https://en.wikipedia.org/wiki/Median
> 
> So the list (0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9) admit 0.5 as median.
> 
> [array quantile] return 6.
> 
> In attachment, a patch that demonstrate this behaviours, and other list that 
> return value that I did not expect.
> 
> I'm using pd 47.1.
> Did I made something wrong, or is that just a bug in [array quantile]?
> 
> cheers
> C
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list
>

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to