math.statistics: minor style cleanup.
parent
f932ca2090
commit
0c5f895371
|
@ -142,8 +142,7 @@ PRIVATE>
|
||||||
bi kth-smallests first2 ;
|
bi kth-smallests first2 ;
|
||||||
|
|
||||||
: median ( seq -- x )
|
: median ( seq -- x )
|
||||||
dup length odd?
|
dup length odd? [ lower-median ] [ medians + 2 / ] if ;
|
||||||
[ lower-median ] [ medians + 2 / ] if ;
|
|
||||||
|
|
||||||
! quantile can be any n-tile. quartile is n = 4, percentile is n = 100
|
! quantile can be any n-tile. quartile is n = 4, percentile is n = 100
|
||||||
! a,b,c,d parameters, N - number of samples, q is quantile (1/2 for median, 1/4 for 1st quartile)
|
! a,b,c,d parameters, N - number of samples, q is quantile (1/2 for median, 1/4 for 1st quartile)
|
||||||
|
|
Loading…
Reference in New Issue