# Question 5 Matlab Goal Question Generate Random Variables Rvs Construct Pdfs Cdfs Using Ma Q35161483 Question 5: (Matlab) The goal of this question is to generate some random variables (RVs) and construct their PDFs and CDFs using Matlab and then compare the numerically-obtained CDFs to the theoretical ones Using the appropriate built-in functions in Matlab (such as normrnd), generate a vector of Gaussian distributed numbers (of size 1×1000) with a mean of unity and a variance of 10. Obtain the numerical (empirical) PDF curve using Hhist ( ) in Matlab and normalize it (such that the area under the curve is unity). Then, obtain the CDF numerically Plot both the obtained numerical (empirical) CDF and the corresponding theoretical CDIF (using the built-in function normcdf) on the same figure. Quantify the numerical difference between the empirical CDF and the theoretical one with an appropriate measure and explain how to minimize that difference. Repeat the same steps for the Gamma distribution with a shape parameter of 4 and a scale parameter of 5. Show transcribed image text

0 replies