Question: PLEASE PROVIDE THE CODE AND THE REPORT!! only use random.random ( ) function for number generation. Your task is to conduct the following experiments in

PLEASE PROVIDE THE CODE AND THE REPORT!! only use random.random() function for number generation.
Your task is to conduct the following experiments in Python by filling in the provided skeleton code
and documenting your findings in a report. It is crucial to note that for random number generation, you
are ONLY permitted to use the random.random() function. This function requires no parameters and
yields values uniformly distributed in the range of 0 to 1
Experiment 2:
A random variable x has the following cumulative distribution function: F(x)=x2, for 0x1.
Part b:
In your code:
Create 30000 samples of x using the Rejection method. At each step, store the generated
variable x and the updated average and variance of x in the given arrays.
2 plots are already implemented. DO NOT change them (Figures 15-16).
Plot the average value of x that you calculated throughout the experiment (Figure 17).
Plot the variance of x that you calculated throughout the experiment (Figure 18).
In your report:
Inspect the existing plots and comment on them. What do Figure 15 and Figure 16 show?
Compare your results in (a) with the simulation outputs in Figures 17 and 18.
PLEASE PROVIDE THE CODE AND THE REPORT!! only use

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!