For a Rayleigh distribution X with a mean equal to 20, assume that the sample space of X is truncated such that the support region is X = [a,b], where a = 10 + N and N is equal to the last digit in your student ID, and b = 40. Using MATLAB software or Octave, write code to implement the following:
1- Plot the PDF of the truncated random variable and compare it to the original RV PDF.
2- Find the first 5 moments of the truncated random variable.
3- Find the variance of the truncated random variable.
4- Assume that X is transformed to Y such that Y = X^2. Plot the PDF of Y and find the first 3 moments of Y.
5- Evaluate the characteristic function of ΦY(ω) and plot |ΦY(ω)|.