2
$\begingroup$

I have done some statistical distributions on real-world data. The distribution fitting gives me the below results (lognormal fits the best on data based on chi-squared test):

Best Distribution fits with parameters:
---------------------------------------

Distribution: lognorm
Parameters: (0.5921510072108613, -0.006454418407435666, 0.021090953536473916)

Distribution: expon
Parameters: (2e-06, 0.018877666177431276)

Distribution: pareto
Parameters: (11.057961210885452, -0.20440106940633995, 0.20436985884797232)

Here, i want to achieve two things:

  • Using the best parameters,how to generate the new synthetic data that represent our original data?. Does the rvs method in python is useful?

  • Compare the actual and generated data distribution fitting as shown in below figure.

enter image description here

$\endgroup$
2

1 Answer 1

2
$\begingroup$

Good question. Lots of options.

Most would recommend you use CDFs instead of histograms. So convert your observed distribution to empirical CDF (in R it’s ecdf() - I dint know python). Then, plot another line that is the theoretical CDF using your best-fit parameters over the span of a to b, where a to b gives you at least the same coverage as your original data set limits.

Alternatively you could go for a chi-square option that’ll give you observed vs predicted and can be plotted as histogram but I don’t find that better in most cases, though it might make quantitative comparison more accessible

$\endgroup$
1
  • $\begingroup$ Just to add a bit on @HEITS: To plot CDF for Python, you can go through this link. $\endgroup$
    – Toros91
    Dec 5, 2019 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.