a. Consider an exponentially distributed RV with a=0, use the inverse transform method to generate a sequence of exponentially distributed random numbers for different values of the parameter b. Plot the histograms (probability density function (pdf)) and compare with the analyticalpdf for each value of the parameterb. See Sec. 3.5 in the textbook.
b. It is well-known that the sum of independent and identically distributed exponential RVs has a gamma distribution. Generate four independent exponential RVs (using exprnd) with a=0 and b=4 (or mu=4), sum them and plot the pdf of the sum. Compare the obtained pdf with the theoretical gamma pdfand comment on the obtained results.