NOTE: DO NOT COPY FROM ANY OTHER WEBSITES OR LINKS FROM CHEGG AND IF YOUR PLANNI
ID: 3294533 • Letter: N
Question
NOTE: DO NOT COPY FROM ANY OTHER WEBSITES OR LINKS FROM CHEGG AND IF YOUR PLANNING TO WRITE IT ON PAPER, PLEASE BE NEAT AND WRITE IN PRINTED ENGLISH.
Problem 1. (15 points) A random variable is said to have the (standard) Cauchy distribution if its PDF is given by f(x) This problem uses computer simulations to demonstrate that a) samples from this distribution often have extreme outliers (a consequence of the heavy tails of the distribution), and b) the sample mean is prone to the same type of outliers. Below is a graph of the pdf (5 points) The R commands x-rcauchy(500); summary(x) generate a random sample of size 500 from the Cauchy distribution and display the sample's five number summary; Report the five number summary and the interquartile range, and comment on whether or not the smallest and largest numbers generated from this sample of 500 are outliers. Repeat this 10 times. (5 points) The R commands m=matrix(cauchy(50000), nrow=500); xb-apply(m1 mean);summary(xb) generate the matrix m that has 500 rows, each of which is a sample of size n-100 from the Cauchy distribution, compute the 500 sample means and store them in xb. and display the five number summary xb. Repeat these commands 10 times, and report the 10 sets of five number summaries. Compare with the 10 sets of five number summaries from part (a), and comment on whether or not the distribution of the averages seems to be more prone to extreme outliers as that of the individual observations. a) b) c) 5 points) Why does this happen? (hint: try to calculate E(X) and V(X) for this distribution) and does the LLN and CLT apply for samples from a Cauchy distribution? Hint: E(M) is undefined for this distribution unless you use the Cauchy Principle Value as such for the mean lim J *f(x)dt In addition x2 +1-1 1+x2 1+x2 dr = tan-1 x + C 1+x2Explanation / Answer
R command for part a)
x=rcauchy(500,0,1)
d=summary(x)
d
a=d[2]
a
b=d[5]
b
IQR=b-a
IQR
O1=a-(1.5*IQR)
O1
O2=b+1.5*IQR
O2
l1=which(x<O1)
l2=which(x>O2)
length(l1)
length(l2)
l1 and l2 are outlier
Repeat this command 10 times
.............................................
m=matrix(c(rcauchy(50000),nrow=500))
m
xb=apply(m,1,mean)
xb
d=summary(xb)
d
a=d[2]
a
b=d[5]
b
IQR=b-a
IQR
O1=a-(1.5*IQR)
O1
O2=b+1.5*IQR
O2
l1=which(xb<O1)
l2=which(xb>O2)
length(l1)
length(l2)
l1 and l2 are outlier
Repeat this command 10 times
c) yes distribution of averages seems to be more prone to extrme outliers as that of individual observation
Ex=mean(x)
Vx=var(x)
By obseving above results LLN and CLT apply for samples from cauchy distribution.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.