Docsity

Grouped Percentiles in Statistics: Calculation using SAS functions GMEDIAN and GPTILE, Study notes of Mathematical Statistics

Toggle sidebar
bg1
1
Appendix 8: Grouped Percentiles
Two summary functions, GMEDIAN and GPTILE are used in procedures such as
Frequencies and Graph, to calculate the percentiles for the data which are grouped
by specifying a value for each grouping. It is assumed that the actual data values
give represent midpoints of the grouped intervals.
Notation
The following notation is used throughout this appendix unless otherwise stated:
xx
ik
<<K Distinct observed values with frequencies (caseweights) cc
k1,,K
k Number of distinct observed data points
p percentile/100 (a number between 0 and 1)
ccl Cumulative frequency up to and including
x
l
cc c c l n
li l
i
l
=+ =
=
−
∑05 1
1
1
.* , ,K
Finding Percentiles
To find the 100
p
th grouped percentile, first find i such that cc wp cc
ii−≤<
1, where
w is the total sum of caseweights which is equal to cj
j
k
=
∑
1
. Then the grouped
percentile is
11
−+
−
Rx Rx
ii
05
pf2

Partial preview of the text

Download Grouped Percentiles in Statistics: Calculation using SAS functions GMEDIAN and GPTILE and more Study notes Mathematical Statistics in PDF only on Docsity!

1

Appendix 8: Grouped Percentiles

Two summary functions, GMEDIAN and GPTILE are used in procedures such as Frequencies and Graph, to calculate the percentiles for the data which are grouped by specifying a value for each grouping. It is assumed that the actual data values give represent midpoints of the grouped intervals.

Notation

The following notation is used throughout this appendix unless otherwise stated:

x (^) i < K< xk Distinct observed values with frequencies (caseweights) c 1 , K,c (^) k k Number of distinct observed data points p percentile/100 (a number between 0 and 1) ccl Cumulative frequency up to and including xl

cc (^) l c (^) i c (^) l l n i

l = + = =

−

∑ 0 5^1

1

1

. * , K,

Finding Percentiles

To find the 100 p th grouped percentile, first find i such that cc (^) i − 1 ≤ wp <cci, where

w is the total sum of caseweights which is equal to c (^) j j

k

=

1

. Then the grouped

percentile is

01 − R x 5 i− 1 +Rxi

2 Appendix 8

2

where

R

wp cc cc cc

i i i

− −

1 1

Note the following:

  • If wp < cc 1 , the grouped percentile is system missing and a warning message “Since the lower bound of the first interval is unknown, some percentiles are undefined” is produced.
  • If wp > cc (^) k, the grouped percentile is system missing and a warning message “Since the upper bound of the last interval is unknown, some percentiles are undefined” is produced.
  • If wp = cc (^) k, the grouped percentile is equal to x (^) k.