Generation of large data sets (10^4) for log Pearson type III distribution and finding its paramters
    9 views (last 30 days)
  
       Show older comments
    
Dear All, I have a data set which is log pearson type III distributed fitted. Using that data how can I find the parameters associated with that distribution. further using that paramters I have to generate more number of samples. That samples which I have generated should overlap twith the data given below. Can anyone please help me with this I am working on this from a long time.
           Q          PDF(LP3)
  14.162562  0.000011 
  28.325123  0.000723 
  31.403941  0.001391 
  33.866995  0.002169 
  36.945813  0.002904 
  39.408867  0.003638 
  41.871921  0.004439 
  45.566502  0.005262 
  49.261084  0.006063
  53.571429  0.006875 
  59.729064  0.007632 
  70.197044  0.008288 
  89.901478  0.007654 
  100.369458  0.006875 
  113.300493  0.005996 
  125.000000  0.005173 
  137.315271  0.004350 
  150.862069  0.003571 
  167.487685  0.002815 
  192.118227  0.002025 
  225.985222  0.001246 
  275.246305  0.000679 
  326.970443  0.000345 
  370.073892  0.000211 
  418.103448  0.000133 
  459.359606  0.000089 
  500  5.56242E-05 
4 Comments
Accepted Answer
  Jeff Miller
      
 on 7 Sep 2022
        If the distribution you have in mind is the same one described here then this is a good problem for Cupid (see especially the file DemoLogPearsonIII.m).
% Initialize distribution information
Q = [14.162562, 28.325123, 31.403941, 33.866995, 36.945813, 39.408867, 41.871921, 45.566502, 49.261084, 53.571429, 59.729064, 70.197044, 89.901478, 100.369458, 113.300493, 125.000000, 137.315271, 150.862069, 167.487685, 192.118227, 225.985222, 275.246305, 326.970443, 370.073892, 418.103448, 459.359606, 500];
PDF = [0.000011,   0.000723,   0.001391,   0.002169,   0.002904,   0.003638,   0.004439,   0.005262,   0.00606,   0.006875,   0.007632,   0.008288,   0.007654,   0.006875,   0.005996,   0.005173,   0.004350,   0.003571,   0.002815,   0.002025,   0.001246,   0.000679,   0.000345,   0.000211,   0.000133,   0.000089,  5.56242E-05];
% Create a starting LogPearsonIII distribution with initial guesses
% for the parameters (which will be estimated later):
GammaShape = 5;
GammaRate = 5;
ShiftConst = 2;
% RNGamma, AddTrans, and ExpTrans are all parts of Cupid
startGamma = RNGamma(GammaShape,GammaRate);
% Shift the gamma by adding in a constant. The resulting distribution
% is a Pearson III distribution:
PearsonIII = AddTrans(startGamma,ShiftConst);
% The Log-Pearson III is a distribution whose log is Pearson III.
% That means that the Log-Pearson III distribution is an
% exponential transformation of the original PearsonIII.
% So, we can make the desired Log-Pearson III by using the Exp transform:
LogPearsonIII = ExpTrans(PearsonIII);
% LogPearsonIII is now a distribution object with the starting guesses for the parameter estimates.
% Next estimate the distribution's parameters by trying to match the PDF values at the Q points:
LogPearsonIII.EstDensity(Q,PDF);
% Print the estimated parameter values:
LogPearsonIII.ParmValues
% ans =
%       26.803       8.8801       1.6729
% Display the PDF and CDF of the estimated distribution
LogPearsonIII.PlotDens;
% Generate 1000 random numbers from the fitted distribution:
randlp = LogPearsonIII.Random(1000,1);
% Compare the histogram of the random numbers with the PDF originally specified.
figure;
histogram(randlp,'normalization','pdf');
hold on
plot(Q,PDF);
% You can also generate the random numbers like this:
randlp2 = exp( gamrnd(26.803,1/8.8801,1000,1)+1.6729 );
5 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

