A discrete random variable U has a probability mass function
     A discrete random variable U has a probability mass function as shown below. Compute p_U (2) and E[U].  For the random variable U defined above, plot its CDF.  A continuous random variable X is uniformly distributed in the interval [0, 1]. Compute its CDF.  If X is defined above, a second continuous random variable Y is defined as Y = tan(3 pi/4(X - 0.5)). Compute its CDF.  Compute the PDF of Y.  Use the rand() function to generate N = 100000 values of the random variable X defined above.  Use the histogram method to numerically compute and plot the PDF of X. Use M = 50 histogram bins.  Plot the theoretical PDF of X.  For the generated X values, compute the corresponding Y values.  Use the histogram method to numerically compute and plot the PDF of Y.  Plot the theoretical PDF of Y which you computed in 4.5.  Numerically compute and display the expected values of X and Y.![A discrete random variable U has a probability mass function as shown below. Compute p_U (2) and E[U]. For the random variable U defined above, plot its CDF. A  A discrete random variable U has a probability mass function as shown below. Compute p_U (2) and E[U]. For the random variable U defined above, plot its CDF. A](/WebImages/1/a-discrete-random-variable-u-has-a-probability-mass-function-968450-1761495491-0.webp) 
  
  Solution
![A discrete random variable U has a probability mass function as shown below. Compute p_U (2) and E[U]. For the random variable U defined above, plot its CDF. A  A discrete random variable U has a probability mass function as shown below. Compute p_U (2) and E[U]. For the random variable U defined above, plot its CDF. A](/WebImages/1/a-discrete-random-variable-u-has-a-probability-mass-function-968450-1761495491-0.webp)
