Question

In: Statistics and Probability

Both X and S2 are unbiased for the Poisson λ. Which is better? Use the following...

Both X and S2 are unbiased for the Poisson λ. Which is better? Use the following steps to answer this question.

a) Generate 200000 random numbers from the Poisson(λ = 2) distribution and arrange them in a matrix with 20 rows. Thus you have 10000 samples of size 20.
b) Compute the 10000 sample means and sample variances and store them in objects means and vars, respectively.

c) Compute the average of the 10000 sample means and the average of the 10000 sample variances. Report the two averages. Do they support the claim that they are unbiased for λ = 2?
d) Compute the sample variance of the 10000 sample means and the sample variance of the 10000 sample variances. Report the two variances. Which estimator of λ is preferable.

Solutions

Expert Solution

We generate random numbers using R

The R code is

set.seed(0) # For same result
X=rpois(200000,2) # For generating random numbers
D=matrix(X,nrow=20) #Storing values in matrix
means=rowMeans(D) # calculate row mean and store it
rowVar <- function(x, ...) {
rowSums((x - rowMeans(x, ...))^2, ...)/(dim(x)[2] )
} # creating function for calculating row variance
vars=rowVar(D)
mean(means) #average of sample means
mean(vars) # average of sample variances
Var=function(x){ var(x)*((length(x)-1)/length(x))}
Var(means) # Variance of sample mean
Var(vars) # Variance of sample variances
#Variance of sample mean is less than Variance of sample variances
#Estimator Sample mean is best preferable for λ

The Output of code is

>set.seed(0) # For same result

>X=rpois(200000,2) # For generating random numbers

>D=matrix(X,nrow=20) #Storing values in matrix

>means=rowMeans(D) # calculate row mean and store it

>rowVar <- function(x, ...) {

>rowSums((x - rowMeans(x, ...))^2, ...)/(dim(x)[2] )

>} # creating function for calculating row variance

>vars=rowVar(D)

>mean(means) #average of sample means

[1] 2.001445

>mean(vars) # average of sample variances

[1] 2.002059

#Both estimator are approximately equal to 2 i.e. Both are unbiased for λ = 2

>Var=function(x){ var(x)*((length(x)-1)/length(x))}

>Var(means) # Variance of sample mean

[1] 0.0001334735

>Var(vars) # Variance of sample variances

[1] 0.001134832

>#Variance of sample mean is less than Variance of sample variances

>#Estimator Sample mean is best preferable for λ


Related Solutions

Both Xand S2 are unbiased for the Poissonλ. Which is better? Use the following steps to...
Both Xand S2 are unbiased for the Poissonλ. Which is better? Use the following steps to answer this question using R. a) Generate 200000 random numbers from the Poisson(λ= 2) distribution and arrange them in a matrix with 20 rows. Thus you have 10000 samples of size 20. b) Compute the 10000 sample means and sample variances and store them in objects means and vars, respectively. c) Compute the average of the 10000 sample means and the average of the...
Show that the skewness of X~Poisson(λ) is λ^-(1/2)
Show that the skewness of X~Poisson(λ) is λ^-(1/2)
Question: (Bayesian) Suppose that X is Poisson(λ + 1), and the prior distribution of λ is...
Question: (Bayesian) Suppose that X is Poisson(λ + 1), and the prior distribution of λ is binomial(2,1/3). (a) Find the Bayesian estimate of λ for mean square loss based on the single observation X, if X = 1. (b) Find the Bayesian estimate of λ for mean square loss based on the single observation X, if X = 2 Hints: Because of its prior distribution, λ can take only three values, 0,1,2. Don’t expect its posterior distribution to be any...
Let X ∼ Poisson(λ) and Y ∼ U[X, 2X]. Find E(Y ) and V ar(Y ).
Let X ∼ Poisson(λ) and Y ∼ U[X, 2X]. Find E(Y ) and V ar(Y ).
Suppose that X is a Poisson random variable with λ=39. Round your answers to 3 decimal...
Suppose that X is a Poisson random variable with λ=39. Round your answers to 3 decimal places (e.g. 98.765). (a) Compute the exact probability that X is less than 26. (b) Use normal approximation to approximate the probability that X is less than 26. Without continuity correction: With continuity correction: (c) Use normal approximation to approximate the probability that 52<X<78. Without continuity correction: With continuity correction:
For which values of λ does the system of equations (λ − 2)x + y =...
For which values of λ does the system of equations (λ − 2)x + y = 0 x + (λ − 2)y = 0 have nontrivial solutions? (That is, solutions other than x = y = 0.) For each such λ find a nontrivial solution.
Find the (probability generating function) p.g.f.’s of the following distributions:[3+3=6] •P(X=x) =(exp(−λ)λ^x)/((1−exp(−λ))x!) , for x= 1,2,3,...,...
Find the (probability generating function) p.g.f.’s of the following distributions:[3+3=6] •P(X=x) =(exp(−λ)λ^x)/((1−exp(−λ))x!) , for x= 1,2,3,..., and λ >0. •P(X=x) =((pq)^x)(1−q^(N+1))^−1,for x= 0,1,..., N; where 0 < p < 1, p+q= 1.
Consider two machines both of which have an exponential lifetime with rate λ. There is a...
Consider two machines both of which have an exponential lifetime with rate λ. There is a single repairman that can service machines at an exponential rate μ. – Set up the Kolmogorov backward equations in the matrix format P′(t) = RP(t). You do not need to solve the system. – Find the proportion of time that 0, 1, or 2 machines are down
Let X have a Poisson distribution with mean μ . Find E(X(X-1)) and use it to...
Let X have a Poisson distribution with mean μ . Find E(X(X-1)) and use it to prove that μ = σ 2 .
Let X be an exponential random variable with parameter λ, which means that fX(x) = λe^(−λx)...
Let X be an exponential random variable with parameter λ, which means that fX(x) = λe^(−λx) * u(x). (a) For x > 0, find P(X ≤ x). (b) For x2 > x1 > 0, find P(x1 ≤ X ≤ x2). (c) For x > 0, find P(X ≥ x). (d) Segment the positive real line into three equally likely disjoint intervals.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT