Let X be a random variable that is uniformly distributed over the interval (0, 100 ) .
Form a new random variable Y by rounding X to the nearest integer. In MATLAB code, this could be represented by Y=round(X).
Finally, form the random roundoff error according to Z= . X-Y
(a) Using analytical methods, find the PDF of Z as well as the mean-squared value, E [Z2] .
(b) Using MATLAB, create a histogram for the probability densities for the random variable Z . Compare with the PDF found analytically in part (a).