Question: Question 1 (4 marks) Set the seed to be your student number. Simulate (U_1,U_2,U_3) (each with size 10,000) all come from a (chi 2(1)) distribution.

Question 1 (4 marks) Set the seed to be your student number. Simulate \\(U_1,U_2,U_3\\) (each with size 10,000) all come from a (\\chi 2(1)\\) distribution. (a) Caculate \\(M = \\max(U_1,U_2,U_3)\\) using the simulated observations, and print out the first 6 values of M. (b) Plot the histogram of M. (c) Estimate (to 3 significant digits) the probability \\(P (M > 1)\\) (Hint, use the number of elements in M greater than 1 to be divided by the total number of values). You R code, results and plots: Question 2 (4 marks) his Set the seed to be your student number. Try to similate 3,000 points from a mixture of two normal distributions. Normal distribution 1 (N1) is the standard normal. Normal distribution 2 (N2) has mean 1 and the variance twice the size of the distribution 1. Moreover, sample 1 from distribution 1 should be twice the size of sample 2 from distribution 2. (a) Plot the histogram the combind sample of the mixture normal (MN). (b) Estimate (to 3 significant digits) the probabilities \\(P (0.5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
