Percentile Calculation
Options in STATISTICA
The Percentile option, available
on the Analyses/Graphs:
Limits tab of the Options
dialog box, is used to select from among six methods for computing percentile
values, including medians (50th percentile) and quartiles (25th and 75th
percentiles). The method that you select here will apply to every place
in the STATISTICA program where
medians, quartiles,
or percentiles
are computed. Below is an explanation of the six methods to help you to
decide which method to select. An example is available for each method.
For the following methods, let n
be the number of cases, and p
be the percentile value divided by 100 (e.g., 50/100 = .5 for the median).
Then, the available choices for computing percentiles are:
Weighted
average at Xnp method (Weighted average centered at
Xnp). Express np
(n times p) as np=j+g
where j is the integer part of
np, and g
is the fractional part of np;
then compute:
PercentileValue
= (1-g)xj
+ gxj+1
Note that X0 in the above computation is
replaced by X1 (e.g., if j
= 0, then the above formula would be (1-g)x1 + gx(0+1)).
Example
Weighted
average at X(n+1)p method (Weighted average centered at X(n+1)p). Express
(n+1)p as (n+1)p=j+g
where j is the integer part of
(n+1)p, and g
is the fractional part of (n+1)p;
then compute:
PercentileValue = (1-g)xj + gxj+1
Note that Xn+1 in the above computation
is replaced by Xn (e.g., if j
= n, then the above formula would be (1-g)xn + gxn).
Example
Empirical
distribution function method. Express np
(n times p)
as np=j+g where j
is the integer part of np, and
g is the fractional part of np; then choose the percentile value
as:
PercentileValue
= xj |
if
g=0 |
PercentileValue = xj+1 |
if g>0 |
Example
Empirical
distribution function with averaging method. Express np (n
times p) as np=j+g
where j is the integer part of
np, and g
is the fractional part of np;
then compute the percentile value as:
PercentileValue = (xj
+ xj+1)/2 |
if g=0 |
PercentileValue = xj+1 |
if g>0 |
Example
Empirical
distribution function with interpolation (MS Excel) method. Express
(n-1)p ((n-1)
times p) as (n-1)p=j+g
where j is the integer part of
(n-1)p, and g
is the fractional part of (n-1)p;
then compute the percentile value as:
PercentileValue = xj+1 |
if g=0 |
PercentileValue = xj+1
+ g(xj+2 - xj+1) |
if g>0 |
Example
Closest
observation method (Observation closest to np). Compute
j as the integer part of np+1/2, then compute:
PercentileValue = xj
Example