Question

In: Statistics and Probability

2. Assume that X1, . . . , Xn are independent copies of the random variable...

2. Assume that X1, . . . , Xn are independent copies of the random variable X = Y + V , where Y ∼ N(µ, σ2 ) and V ∼ U(−ν, ν), ν > 0, and Y and V are independent. We will consider the hypotheses

H0 : µ = µ0 and

HA : µ does not equal µ0.

(a) It can be shown that E(X) = µ and var(X) = σ2 + ν2/3. Set µ = 60, σ = 3, and ν = 4. Estimate E(X) and var(X) using Monte Carlo simulations based on drawing n = 105 i.i.d. copies of X. You can only use the runif function to generate draws from a distribution, so you will need to take the necessary steps to draw realizations from the appropriate distributions. Comment on the results.

(b) Let T = (√ n) * (Xbar − µ0)/S be the usual t-test test statistic. Perform a simulation to check whether the distribution of T is well approximated by a t-distribution with n−1 degrees of freedom when n = 20, µ = µ0 = 65, σ = 3, and ν = 4. Use a QQ-plot (you may use the qt function) and set reps = 1e4. Comment on the results.

(c) Set n = 20, µ0 = 68, µ = 66, ν = 5, and α = 0.05. Produce a plot of a simulated estimate of the power curve of this test formed by increasing σ from 0.5. Select the sequence of values for σ so that the simulated estimate of the power decreases from roughly 80% to roughly 20%. Comment on the results.

Solutions

Expert Solution

Given . Let

a) The R code to generate 105 RV from the given distributions arnd calculating mean and variance using simulation is given below.

n <- 105
sigma <- 3
mu <- 60
v <- 4
V <- runif(n,min = -v , max = v)
Y <- rnorm(n, mean = mu, sd = sigma)
X <- V + Y
EX <- mean(X)
EX
VarX <-var(X)
VarX

> EX
[1] 59.20977
> VarX
[1] 13.71963

The theoretical value of mean is , the simulated mean is .

The theoretical value of variance is , the simulated variance is . The theoretical and simulated values are approximately equal.

b) The R code to simulate 10000 repetitions of the statistic and plotting the density of and with theoretical T-distribution with 19 degrees of freedom given below.

m <- 10000
n <- 20
sigma <- 3
mu <- 60
mu0 <- mu
v <- 4
T <- array (dim = m)
for (i in 1:m)
{
V <- runif(n,min = -v , max = v)
Y <- rnorm(n, mean = mu, sd = sigma)
X <- V + Y
T[i] <- sqrt(n)*(mean(X)-mu0)/sd(X)
  
}
qqplot(T,qt(seq(-5,5, length = m),df= n-1),main = "QQ Plot", ylab = "Density", col = "blue")

Both the distributions matches.

c ) The power of a test is .

The power is plotted against as given below.

R code below.

n <- 20
sigma <- 3
mu <- 66
mu0 <- 68
v <- 4
alpha <- 0.05
P <- function(x)
{
pnorm(qnorm(alpha/2)+(mu0-mu)*sqrt(n)/x)
}
curve(P(x), col="darkred", xlim = c(0.5, 10), main = "Power", lwd=2)


Related Solutions

2. Let X1, X2, . . . , Xn be independent, uniformly distributed random variables on...
2. Let X1, X2, . . . , Xn be independent, uniformly distributed random variables on the interval [0, θ]. (a) Find the pdf of X(j) , the j th order statistic. (b) Use the result from (a) to find E(X(j)). (c) Use the result from (b) to find E(X(j)−X(j−1)), the mean difference between two successive order statistics. (d) Suppose that n = 10, and X1, . . . , X10 represents the waiting times that the n = 10...
Let X1,...,Xn be independent random variables,and let X=X1+...+Xn be their sum. 1. Suppose that each Xi...
Let X1,...,Xn be independent random variables,and let X=X1+...+Xn be their sum. 1. Suppose that each Xi is geometric with respective parameter pi. It is known that the mean of X is equal to μ, where μ > 0. Show that the variance of X is minimized if the pi's are all equal to n/μ. 2. Suppose that each Xi is Bernoulli with respective parameter pi. It is known that the mean of X is equal to μ, where μ >...
Consider independent random variables X1, X2, and X3 such that X1 is a random variable having...
Consider independent random variables X1, X2, and X3 such that X1 is a random variable having mean 1 and variance 1, X2 is a random variable having mean 2 and variance 4, and X3 is a random variable having mean 3 and variance 9. (a) Give the value of the variance of X1 + (1/2)X2 + (1/3)X3 (b) Give the value of the correlation of Y = X1- X2 and Z = X2 + X3.
2. Let X1, . . . , Xn be a random sample from the distribution with...
2. Let X1, . . . , Xn be a random sample from the distribution with pdf given by fX(x;β) = β 1(x ≥ 1). xβ+1 (a) Show that T = ni=1 log Xi is a sufficient statistic for β. Hint: Use n1n1n=exp log=exp −logxi .i=1 xi i=1 xi i=1 (b) Find the pdf of Y = logX, where X ∼ fX(x;β). (c) Find the distribution of T . Hint: Identify the distribution of Y and use mgfs. (d) Find...
Problem 1 Let X1, X2, . . . , Xn be independent Uniform(0,1) random variables. (...
Problem 1 Let X1, X2, . . . , Xn be independent Uniform(0,1) random variables. ( a) Compute the cdf of Y := min(X1, . . . , Xn). (b) Use (a) to compute the pdf of Y . (c) Find E(Y ).
Let X1,...,Xn be exponentially distributed independent random variables with parameter λ. (a) Find the pdf of...
Let X1,...,Xn be exponentially distributed independent random variables with parameter λ. (a) Find the pdf of Yn= max{X1,...,Xn}. (b) Find E[Yn]. (c) Find the median of Yn. (d) What is the mean for n= 1, n= 2, n= 3? What happens as n→∞? Explain why.
Let X1, X2,...,Xn be independent random variables from Normal (mu, sigma_i^2), i=1, 2,...,n, where mu is...
Let X1, X2,...,Xn be independent random variables from Normal (mu, sigma_i^2), i=1, 2,...,n, where mu is unknown and sigma_1^2, sigma_2^2,...,sigma_n^2 are known. Determine a sufficient statistic for mu. Derive the UMVUE and MLE of T(mu)=mu^3.
2. Let X1, ..., Xn be a random sample from a uniform distribution on the interval...
2. Let X1, ..., Xn be a random sample from a uniform distribution on the interval (0, θ) where θ > 0 is a parameter. The prior distribution of the parameter has the pdf f(t) = βαβ/t^(β−1) for α < t < ∞ and zero elsewhere, where α > 0, β > 0. Find the Bayes estimator for θ. Describe the usefulness and the importance of Bayesian estimation. We are assuming that theta = t, but we are unsure if...
Let X1, … , Xn. be a random sample from gamma (2, theta) distribution. a) Show...
Let X1, … , Xn. be a random sample from gamma (2, theta) distribution. a) Show that it is the regular case of the exponential class of distributions. b) Find a complete, sufficient statistic for theta. c) Find the unique MVUE of theta. Justify each step.
Suppose X1,···, Xn ∼ Exp(λ) are independent. What is the distribution of X1/S where S =...
Suppose X1,···, Xn ∼ Exp(λ) are independent. What is the distribution of X1/S where S = X1+X2+···+Xn? Please show me how to do this without using the property of chi-squared dist.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT