Construct income distributions from parameters knowledge
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi. I need to construct income distributions for several countries. The underlying assumption is that income follows a lognormal distribution and i have values for the two parameters. Of course, each distribution comes from a different population size (say China 1371220000 individuals and so on).
I used the code:
x=[0:100:500000]
china=lognpdf(x,'mu','sigma')
but this way matlab returns the values of the PDF.
I tried creating a distribution object like
china=makedist('Lognormal','mu','sigma')
but, in this case, i do not know how to assign population sizes and make operations between objects.
Substantially, how can i create income distributions knowing the two parameters and population sizes? Once created, i need to integrate them (e.g. to see how many people are below a certain threshold) or sum them (e.g. obtain a unique distribution for Chinese + Indians) so take this into account when making suggestions.
0 Kommentare
Antworten (1)
Star Strider
am 16 Aug. 2017
I am not certain of the result you want.
One possibility would be to use the lognrnd function to create random numbers distributed according to your parameters. You can specify the size of the vectors it returns to scale with the population of each country.
The other possibility is to use the logncdf function if you want the cumulative distribution rather than the probability density that lognpdf returns.
6 Kommentare
Star Strider
am 16 Aug. 2017
I’m just telling you how to get the total numbers below 455 for all your countries of interest. I’ve done that.
Do whatever you believe is appropriate.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!