I know two methods to simulate a PDF from random data samples using MATLAB :

1) Using a histogram where I use this command histogram(data,'Normalization','pdf'), it gives PDF like bins.

2) Another one is using kernel density estimation

From (1) I get a PDF in bin format and from another (2), I get a continuous(smooth) PDF that I can match with my analytical derived PDF. I have seen in some scientific/engineering papers they plot simulated PDFs like the one given in the figure below: enter image description here where red is the simulated PDF and blue is analytical. I want to know how one gets shaky simulated PDF like this and do they offer any benefits. May be represent data much clearly, have very small bins?

  • 2
    $\begingroup$ Note that dividing data into bins is a balance between being able to get the smooth curve (more bins and less elements per bin) and the error of each bin being small (more elements per bin and less bins). $\endgroup$ Commented Dec 14, 2019 at 16:39
  • $\begingroup$ There seems to be something wrong with the "simulated" PDF, because the curve line moves forward and backward in x-direction such that some x-values have more than one y-value. And can you please cite a paper to which you refer as "some negineering/science papers"? $\endgroup$
    – cdalitz
    Commented Dec 21, 2019 at 16:53
  • $\begingroup$ This is not the exact PDF I have made it on paint to show the shaky nature. The paper I am referring to is "Three-Dimensional Channel Characteristics for Molecular Communications With an Absorbing Receiver", doi: 10.1109/LCOMM.2014.2320917 $\endgroup$
    – Userhanu
    Commented Dec 21, 2019 at 17:54


Your Answer

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

Browse other questions tagged or ask your own question.