Designing a simulation exercise


Assignment:

Q1. 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.

Q2. 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.

Provide complete and step by step solution for the question and show calculations and use formulas.

Solution Preview :

Prepared by a verified Expert
Basic Statistics: Designing a simulation exercise
Reference No:- TGS01915456

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)