Question

Question 3 A more general form of Cauchy distribution is defined by the density function f(x; m, 7) = where m is the location
(a) (4 points) Derive the cdf, and the inverse function of cdf for Cauchy(m, n). Describe a procedure to generate independent
0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) cdf:

Let us define,

, implies

............................(i)

Thus,

inverse cdf:

Procedure to generate from Cauchy (m, )

Step 1 : Draw random samples from Uniform(0,1), here y~U(0,1)

Step 2: Use the expression in (i) , and the random sample in y(derived in Step 1), to get x.

Step 3: x is the required sample where, x~ Cauchy(m,)

b)

####let gamma =g###
myrcauchy<-function(n,m,g){
y=runif(n,0,1) ####random sample from U(0,1)###
x=m+g*tan(pi*(y-0.5))###random sample from Cauchy(m,g)###
return(x)
}

c)

z1<-myrcauchy(1000,2,1) ###testing the function###
z2<-rcauchy(1000,2,1) ###random sample from inbuilt R function###
q1<-quantile(z1,probs=seq(0.01,0.99,0.01)) #### sample (data) quantile ###
q2<-qcauchy(seq(0.01,0.99,0.01),2,1) ###theoritical quantile###
qqplot(q1,q2,main="qqplot")
qqline(q1,q2) ###qqline created to explain the plot properly###

Here, q1 === data quantile

d2== theoretical quantile

From the second diagram it can be seen that, the 45 degree line is touched by almost all the points, thus theoretical quantile and sample quantile matches.

Add a comment
Know the answer?
Add Answer to:
Question 3 A more general form of Cauchy distribution is defined by the density function f(x;...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Suppose that Xi,..,Xn are independent Exponential random variables with density f(x; λ) λ exp(-1x) for...

    1. Suppose that Xi,..,Xn are independent Exponential random variables with density f(x; λ) λ exp(-1x) for x > 0 where λ > 0 is an unknown parameter (a) Show that the τ quantile of the Exponential distribution is F-1 (r)--X1 In(1-7) and give an approximation to Var(X(k)) for k/n-T. What happens to this variance as τ moves from 0 to 1? (b) The form of the quantile function in part (a) can be used to give a quantile-quantile (QQ) plot...

  • 1. Suppose that Xi,..,Xn are independent Exponential random variables with density f(x; λ) λ exp(-1x) for...

    1. Suppose that Xi,..,Xn are independent Exponential random variables with density f(x; λ) λ exp(-1x) for x > 0 where λ > 0 is an unknown parameter (a) Show that the τ quantile of the Exponential distribution is F-1 (r)--X1 In(1-7) and give an approximation to Var(X(k)) for k/n-T. What happens to this variance as τ moves from 0 to 1? (b) The form of the quantile function in part (a) can be used to give a quantile-quantile (QQ) plot...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT