Illustration for small sample (n = 30)·
- Order the values from lowest to highest
- Stack so that height of blocks is proportional to the weights.Here are the sample members £14276, £7815 and £6688 have large weights
- Scale the height of the stack from 0 to 100%.
- The height of the stack up to a particular income value gives the percentage of the distribution estimated to be below this value.
- Percentiles are the values of income at each % of the sample
An easy way to get a confidence interval for a percentile:
- Get the confidence interval for the percentage. For example, for the median score all the points above the median as 1 and all those below as 0. The weighted mean of this will be 0.5.
- Find its 95% confidence interval. confidence intervals for proportions. Here it is 32%, 70%.
- The confidence interval for the median is then just the income at these percentiles. Here £7,276 to £12,720 (see picture)
This method is now implemented in the R function svyquantile, when method is set to 'Wald'. It was based on some code provided by the P|E|A|S team.