The goal of the assignment is to test the "quality" of the pseudo-random number generator in R for the purposes of rolli

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

The goal of the assignment is to test the "quality" of the pseudo-random number generator in R for the purposes of rolli

Post by answerhappygod »

The Goal Of The Assignment Is To Test The Quality Of The Pseudo Random Number Generator In R For The Purposes Of Rolli 1
The Goal Of The Assignment Is To Test The Quality Of The Pseudo Random Number Generator In R For The Purposes Of Rolli 1 (222.97 KiB) Viewed 23 times
The goal of the assignment is to test the "quality" of the pseudo-random number generator in R for the purposes of rolling a virtual fair six-sided die. 1. (5 points) Let X1, X2,..., X., n = 106, be a sequence of independent uniformly distributed random variables on (0,1). Use function runif to generate Xi's. Use the generated X;'s to generate independent Yı, Y2, ..., Y, with the following PMF: Į1/6, y=1,2,...,6, PY (4) (1) 10, otherwise. Suppose the null hypothesis is "{Y1,..., Yn} are i.i.d. observations from distribution ()", while the alternative hypothesis is "{Y1,..., Yn} are not i.i.d. observations from distribution ()". Compute the x-statistic for the generated data: (nk - n/6) n/6 where nk is the number of k's in the sequence Y1,..., Yn. Compute the corresponding p-value, the probability that a x?-distributed random variable (with 5 degrees of freedom) is larger than the obtained x-statistic. Run the x goodness-of-fit test using chisq.test. 2. (5 points) Define the empirical CDF 7 for Yı, Y2,..., Yn: F(x) ΣΥ<s); and compute Vr max|F(x) – F(), where F is the CDF that corresponds to PMF (). 3. (5 points) Repeat the first part k = 250 times, denote the values of x-statistic by V1, V2, ..., VX- Generate k i.i.d. x2-distributed random variables (with 5 degrees of freedom); denote them by W1, W2, ..., W. Create a Q-Q plot that compares the quantiles of the empirical distributions of V's and W;'s.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply