USING MATLAB:
1. Assume Y is an exponential random variable with rate parameter λ=2.
(1) Generate 1000 samples from this exponential distribution using inverse transform method
(2) Compare the histogram of your samples with the true density of Y.
IF YOU HAVE ANY DOUBTS COMMENT BELOW I WILL BE TTHERE TO HELP YOU
ANSWER:
EXPLANATION:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
close all,
clear all,
clc,
No_of_Random_Nummbers=1000;
Lambda = 2;
X = exprnd(Lambda,No_of_Random_Nummbers);
figure,
subplot(1,2,1); hist(X); title('Exponential Random Numbers
Histogram');
Y = icdf('Normal',X,0,1);
subplot(1,2,2); hist(Y); title('Inverse Transform Method Random
Numbers Histogram');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Get Answers For Free
Most questions answered within 1 hours.