#Lambda=2(population mean=1/2)
n=100
t=1000
x=matrix(0,nrow=t,ncol=n)
m1=1:t*0 # sample mean
m=1:t*0 # sample median
s=1:t*0 # sample sd
for(i in 1:t)
{
x[i,]=rexp(n,rate=2)
m1[i]=mean(x[i,])
m[i]=median(x[i,])
s[i]=sd(x[i,])
}
plot(m1,lwd=2,type="p",xlab="",ylab="sample means")
abline(h=0.5,lwd=2,col=2)
plot(m,lwd=2,type="p",xlab="",ylab="sample medians")
abline(h=0.35,lwd=2,col=2)
plot(s,lwd=2,type="p",xlab="",ylab="sample sds")
abline(h=0.5,lwd=2,col=2)
round(mean(m1),4)
round(mean(m),4)
round(mean(s),4)
Outputs:
> round(mean(m1),4)
[1] 0.5005
> round(mean(m),4)
[1] 0.3506
> round(mean(s),4)
[1] 0.4943
Simulate n values of an exponential random variable X with parameter λ (of your choice), and comp...
3. If X is an exponential random variable with parameter λ > 0, show that for c > 0 cX is exponential with parameter λ/c.
Using R, Exercise 4 (CLT Simulation) For this exercise we will simulate from the exponential distribution. If a random variable X has an exponential distribution with rate parameter A, the pdf of X can be written for z 2 0 Also recall, (a) This exercise relies heavily on generating random observations. To make this reproducible we will set a seed for the randomization. Alter the following code to make birthday store your birthday in the format yyyymmdd. For example, William...
Let X be an exponential random variable with parameter λ, so fX(x) = λe −λxu(x). Find the probability mass function of the the random variable Y = 1, if X < 1/λ Y = 0, if X >= 1/λ
I. Let X be a random sample from an exponential distribution with unknown rate parameter θ and p.d.f (a) Find the probability of X> 2. (b) Find the moment generating function of X, its mean and variance. (c) Show that if X1 and X2 are two independent random variables with exponential distribution with rate parameter θ, then Y = X1 + 2 is a random variable with a gamma distribution and determine its parameters (you can use the moment generating...
1) Drawt (b) The normal f. with -50, ơ-10 (d) The expogEntial Ad.f with parameter λ raphs ofthe p.d.f. of the following distributions S (a) The standard no mal p.d.f. Ing (c) The unifo f. over interval [10, 20] 2. 2) Illustrating the central limit theorem Let X be a random variable having the exponential distribution with A-2. Denote by X,, X,, Xj, a sequence of independent variables with the same distribution as X. Define the sample mean x by...
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 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...
4. Let Xi,X2, , Xn be n i.id. exponential random variables with parameter λ > Let X(i) < X(2) < < X(n) be their order statistics. Define Yǐ = nX(1) and Ya = (n +1 - k)(Xh) Xk-n) for 1 < k Sn. Find the joint probability density function of y, . . . , h. Are they independent? 15In
Problem:2 Let Xi, X2,... , Xn be a random sample from Bernoulli(p) and consider es- timators iand p2- i. Compute the mean square error (MSEp) for both estimators p? and p2 Note that you must show the details of the calculation to receive full credit. ii. Use R to plot MSE, for both estimators using sample sizes n 20 and n- 300. Comment on the plots. iii. Use R to simulate 10,000 different Bernoulli samples of n 300 with success...
Two samples Xi and X2 are taken from an exponential random variable X with unknown parameter θ; that is. r (a r >0. We propose two estimators for θ in the forms 4 In terms of unbiasedness and minimum variance, which one is the better of the two?