Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASAP PLS SUING R CODE ###################### Part 5 : For - loop y = numeric ( 1 0 0 ) # Create space for y

ASAP PLS SUING R CODE ###################### Part 5: For-loop
y = numeric(100) # Create space for y to receive 100 numbers.
for(i in 1:100){
y[i]=2*i # Fill y with 2,4,6,8,...,200.
}
y # Always look!
##################### Part 6: Empirical Sampling Distribution of the Sample Mean
ntrial =10000
ybar = numeric(ntrial) # Create space to store 10000 sample means.
for(i in 1:ntrial){
s = rnorm(100,1,2) # Sample of size 100 from Norm with mu=1, sigma=2
ybar[i]= mean(s) # Sample mean, stored in y
}
ybar # 10000 sample means.
hist(ybar, breaks=20) # You are looking at the Empirical Sampling Distribution of the Sample Mean.
mean(ybar) # About 1, which happens to be the mu of the population.
sd(ybar) # About 0.2, which happens to be 2/sqrt(100), i.e., sigma/sqrt(n)..
Question 2
a) Revise above code to generate the empirical sampling distribution of the sample maximum.
b) We have seen that the mean of the empirical sampling distribution of the sample mean is related to the population mean. Is the mean of the empirical sampling distribution of the sample maximum related to population maximum? Give some explanation for your answer.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

=+8. Be sure you considered consumer benefits.

Answered: 1 week ago

Question

=+4. Consider competitors' campaigns. How could yours stand out?

Answered: 1 week ago

Question

=+5. Review the six categories of 50 strategies.

Answered: 1 week ago