Write an r program to simulate rn the proportion of white


1. Simulation of an expectation. Design a simulation exercise in R to approximate the value of E ( X^X) when X has a U [0,1] distribution. Plot the value of the approximation as the sample size goes from 1 to 10,000. Use the Notebook feature in RStudio to create an HTML file for your answer.

2. Simulation of a Polya Urn. Put a = 10 white balls and b = 20 blue balls in an urn. Then, randomly draw a ball from the urn, and replace it along with another ball of the same color, repeat.

a) Write an R program to simulate Rn, the proportion of white balls in the urn after n draws from the urn, for any integer n.

b) Plot the histogram of Rn for n = 1,000.

c) Simulate Rn 10,000 times.

d) Overlay the histogram with a line graph of the appropriate limiting distribution. Use the Notebook feature in RStudio to create an HTML file for your answer.

Solution Preview :

Prepared by a verified Expert
Basic Statistics: Write an r program to simulate rn the proportion of white
Reference No:- TGS01262538

Now Priced at $20 (50% Discount)

Recommended (96%)

Rated (4.8/5)