Computing work use "R"

RivyOevtug
timer Asked: Nov 11th, 2016

Question Description

Use "R" to compute😊

Unformatted Attachment Preview

Math 448 • Mathematical Statistic Computing Homework 2. Due Friday Nov 11 1. Let X1 , X2 , · · · be independent Bernoulli trials with p = 0.5, and let Yn denote the number of 1’s in the first n trials: Yn = X1 + X2 + · · · + Xn . Let p̂n = Yn /n. (a) Precede your R script with set.seed(your BU student ID #). (b) Generate 1 sample. What is the observed value of p̂1 ? (c) Repeat the process 5 times, each time updating your p̂ (in other words, generate 5 more Bernoulli variates, and calculate p̂ based on your past observations). You will end up with values for X1 , · · · , X6 : one from the first part, and five more from this one. What value of X7 , if any, will result in p̂7 > p̂6 ? Generate X7 ; what value did you observe? (d) Sequentially generate X’s up to n = 100 samples in total, and compute p̂ after every sample (overall, you will need to generate 100 variates in this problem). Plot p̂, and comment on consistency Yn /n. 2. Let X1 , X2 , · · · be independent standard normal random variables. Let A2n denote the sample variance, Bn2 denote the MLE of the variance, and Cn2 = (X1 − X2 )2 /2. (a) Precede your R script with set.seed(your BU student ID #). (b) Generate 2 samples. What are the observed values of A22 , B22 , C22 ? Calculate the difference between A22 and B22 . (c) Generate one more sample. What are the values of A23 , B32 , C32 ?. (d) Sequentially generate n = 1000 samples in total, updating A2 and B 2 with each observation. Plot: (i) A2n ; (ii) Bn2 ; and (iii) their difference. Make conclusions.
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors