Linear+Functions+of+Gaussian+RV+--+pdf+vs+histogram

# Linear+Functions+of+Gaussian+RV+--+pdf+vs+histogram -...

This preview shows page 1. Sign up to view the full content.

Linear function of Gaussian random variable and its distribution – analytical expression guided numerical histogram and the Monte-Carlo computer experiment based histogram 1. The analytical expression for the distribution of a Gaussian distributed RV: 2 2 1 () , 2 x X fx e x π =− < < + In a simplified notation we can use notation, (0,1) XN . 2. MATLAB script – to compare scaled pdf evaluation with histogram M = 1e6; % # of independent trials X = randn(M,1); % N(0,1) random variables dx = 0.1; x = -4:dx:4; % set up a range for x axis hist(X,x); % histogram of the RV X hold on; fx_eval = 1/sqrt(2*pi)*exp(-x.^2/2); % pdf expression evaluated fx_scale = fx_eval*dx*M; % scaling by M*dx to comp. w/ histogram plot(x, fx_scale,'r') a =2; b = 10;
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online