# How to draw random sample from an empirical joint distribution?

I want to draw a random sample from a known joint distribution. what I have now is the number of people in each age and income bracket (as shown in the example below):0.12 0.42 0.06 16 0.08 0.28 0.04

                   income $1-10,000 income$10,001-20,000
15-20 years old      0.12                      0.08
21-25 years old      0.42                      0.28
26-30 years old      0.06                      0.04


Using this I will get the joint distribution of income and age. But I am not sure where to go from here in terms of drawing samples.

Any thoughts are appreciated. My knowledge in statistics is quite limited...

• This is not an empirical joint distribution--it is merely a summary of data. In what way do you hope to use it to infer or represent a distribution?
– whuber
Nov 8, 2016 at 15:41
• After the edit it is still just a data summary. If by "joint distribution" you mean the discrete distribution for the six groups you have shown, then sample it as you would any discrete distribution. But if you want to sample from some hypothetical underlying distribution that gave rise to the data shown here, then you must make some strong assumptions about that distribution, fit it to the data, and then proceed to sample.
– whuber
Nov 8, 2016 at 16:44
• I see. Let me try to sample a discrete distribution first. Thanks!
– whyq
Nov 8, 2016 at 16:48

dist = [(("15-20 yr", "$1-10000"), 0.12), (("15-20 yr", "$10000-20000"), 0.08), ...]