X-Git-Url: http://git.shiar.nl/barcat.git/blobdiff_plain/13fb03e4b877662289ca3395ce81f7a8462b127a..f8ff6134094dfbef301efd2e234c696775d0ed56:/barcat diff --git a/barcat b/barcat index 08b3db2..655f386 100755 --- a/barcat +++ b/barcat @@ -423,7 +423,13 @@ sub calc { "percentile $1 out of bounds\n" ); my $index = $#order * $1 / 100; - return ($order[$index] + $order[$index + .5]) / 2; + my $f = $index - int $index; + my $val = $order[$index]; + if ($f) { + my $next = $order[$index + 1]; + $val -= $f * ($val - $next); + } + return $val; } elsif ($func =~ /\A-?[0-9.]+\z/) { return $func; @@ -638,10 +644,13 @@ For example C<:/1> for a grid at every integer. =item IB -Ranked value at the given percentile. -The default shows C<+> at C<50v> for the mean or median; -the middle value or average between middle values. -One standard deviation right of the mean is at about C<68.3v>. +Ranked value at the given percentile, +or score at or below which a percentage falls +in its frequency distribution (inclusive). + +The default shows C<+> at C<50v> for the mean or median: +the middle value or interpolation between two values. +One standard deviation below the median is at about C<68v>. The default includes C<< >31.73v <68.27v >> to encompass all I results, or 68% of all entries, by I<< <--> >>.