Part 2: Use a Python program to generate a sequence of numbers, X(n), of length N that is uniformly distributed in [0, 1] (e.g., N-[00]). Generate the sequence Y(n) = X(n)^2.
Determine the theoretical mean and variance of X(n). Determine the theoretical mean and variance of Y(n).
Consider N = 1000: Generate the sequences X(n) and Y(n). Find the sample mean and variance for each of the sequences.
For a given sequence, plot the histogram over 50 bins and comment.
Repeat the experiment 200 times. Average the mean and the variances over the repetitions and compare them to the theoretical values.
Plot the sample means and variances across the repetitions.
C: Repeat B with N = 400.
Comment on the results from B and C.