MATLAB Examples

Compare Lognormal and Burr pdfs

This example shows how to compare the lognormal pdf to the Burr pdf using income data generated from a lognormal distribution.

Generate the income data.

rng default % for reproducibility
y = random('logn',log(25000),0.65,500,1);

Fit a Burr distribution.

pd = fitdist(y,'burr');

Plot both the Burr and lognormal pdfs of income data on the same axis.

p = pdf('burr',sortrows(y),26007,2.6374,1.0966);
p2 = pdf('logn',sortrows(y),log(25000),0.65);
title('Burr and Lognormal pdfs fitted to income data')