Generating data with given median from empirical data I have an empirical distribution of household income based on the US census from wikipedia and I'd like to generate a plausible distribution for the income distribution in a region given its median income.
To be concrete, here's a schematic of the income CDF:
Income  | Percentile
20k     | 20th
40k     | 40th
60k     | 50th
80k     | 70th
100k    | 80th
120k    | 90th
200k    | 95th

It's pretty straightforward to generate a distribution with manipulated median by setting a cutoff. For example, one distribution corresponding to a median income of 40k (the 40th percentile of the distribution for the entire US) would set the maximum of the income CDF at 100k, throw out everyone above the 80th percentile, and re-scale the data to look like this:
Income  | Percentile
20k     | 25th
40k     | 50th
60k     | 63rd
80k     | 87th
100k    | MAX

That distribution is probably "good enough" to learn something, but the idea of setting a cutoff doesn't sit well with me from the common-sense standpoint (i.e. there are some quite-wealthy people almost everywhere, and there are some quite-impoverished people almost everywhere). Is there a recommended way to massage the data back towards the original distribution without disturbing the median; and is there a justification for your method?
 A: You can expect a variable like income to have an exponential distribution, most people have a low income and progressively fewer people have larger incomes. A benefit of using this distribution is that it cannot be negative but it can be arbitrarily close to \$0. To fix this, set a minimum income like 10k and consider an exponential distribution added on to the minimum income.
An exponential distribution has one parameter, the rate $\lambda$. The median of an exponential distribution is $\frac{ln(2)}{\lambda}$
So if the median income is 60k (50k above the minimum) then the rate is $\lambda = \frac{ln(2)}{50000}$
With this figure the distribution of income is:


*

*0th percentile = 10k

*10th percentile = 18k

*20th percentile = 26k

*30th percentile = 36k

*40th percentile = 47k

*50th percentile = 60k

*60th percentile = 76k

*70th percentile = 97k

*80th percentile = 126k

*90th percentile = 176k

*95th percentile = 226k


If $p$ is the percentile then you can calculate these incomes with the formula: $\text{income} = \frac{-ln(1 - p)}{\lambda} + \text{minimum income}$
