Question

In: Statistics and Probability

For each of the following subproblems:i. Plot the distribution you’re sampling from (e.g., ifXi∼Exp(λ), plot the...

For each of the following subproblems:i. Plot the distribution you’re sampling from (e.g., ifXi∼Exp(λ), plot the exponentialdistribution with rateλ). See Lab 3 for a reminder on how to do this.ii. Generate a sample of sizen= 10 from the distribution, and find the sample mean.iii. Repeat step ii. 999 times (i.e.,k= 1000), and then plot a histogram of the samples.iv. Add a plot of the approximate normal density on top of the histogram.v. Repeat steps ii. – iv. with sample sizen= 100.

(a)Xiiid∼Uniform(−2,2)

(b)Xiiid∼Gamma(k= 2,λ= 0.5)

(c)Xiiid∼Poisson(λ= 1)

(d)Xiiid∼Geometric(p= 0.2)

Solutions

Expert Solution

from the given data of information

R code:

n=10
x=matrix(0,nrow=1000,ncol=n)
m=1:1000*0
for(i in 1:1000)
{
x[i,]=runif(n, min = -2, max = 2)
m[i]=mean(x[i,])
}
hist(m, density=20, breaks=20, prob=TRUE,
xlab="x-variable", ylim=c(0, 1.4),
main="normal curve over histogram when n=10")
curve(dnorm(x,mean(m),sd(m)),col="blue", lwd=2, add=TRUE, yaxt="n")

.

R code:

n=100
x=matrix(0,nrow=1000,ncol=n)
m=1:1000*0
for(i in 1:1000)
{
x[i,]=runif(n, min = -2, max = 2)
m[i]=mean(x[i,])
}
hist(m, density=20, breaks=20, prob=TRUE,
xlab="x-variable", ylim=c(0, 4),
main="normal curve over histogram when n=100")
curve(dnorm(x,mean(m),sd(m)),col="blue", lwd=2, add=TRUE,

R code:

n=10
x=matrix(0,nrow=1000,ncol=n)
m=1:1000*0
for(i in 1:1000)
{
x[i,]=rgamma(n, 2,0.5)
m[i]=mean(x[i,])
}
hist(m, density=20, breaks=20, prob=TRUE,
xlab="x-variable", ylim=c(0, 0.6),
main="normal curve over histogram when n=10")
curve(dnorm(x,mean(m),sd(m)),col="blue", lwd=2, add=TRUE

R code:

n=10
x=matrix(0,nrow=1000,ncol=n)
m=1:1000*0
for(i in 1:1000)
{
x[i,]=rgamma(n, 2,0.5)
m[i]=mean(x[i,])
}
hist(m, density=20, breaks=20, prob=TRUE,
xlab="x-variable", ylim=c(0, 0.6),
main="normal curve over histogram when n=10")
curve(dnorm(x,mean(m),sd(m)),col="blue", lwd=2, add=TRUE

R code:

n=10
x=matrix(0,nrow=1000,ncol=n)
m=1:1000*0
for(i in 1:1000)
{
x[i,]=rpois(n, 1)
m[i]=mean(x[i,])
}
hist(m, density=20, breaks=20, prob=TRUE,
xlab="x-variable", ylim=c(0, 2),
main="normal curve over histogram when n=10")
curve(dnorm(x,mean(m),sd(m)),col="blue", lwd=2, add=TRUE, yaxt="n")

R code:

n=100
x=matrix(0,nrow=1000,ncol=n)
m=1:1000*0
for(i in 1:1000)
{
x[i,]=rpois(n, 1)
m[i]=mean(x[i,])
}
hist(m, density=20, breaks=20, prob=TRUE,
xlab="x-variable", ylim=c(0, 4),
main="normal curve over histogram when n=100")
curve(dnorm(x,mean(m),sd(m)),col="blue", lwd=2, add=TRUE, yaxt="n")

R code:

n=10
x=matrix(0,nrow=1000,ncol=n)
m=1:1000*0
for(i in 1:1000)
{
x[i,]=rgeom(n, 0.2)
m[i]=mean(x[i,])
}
hist(m, density=20, breaks=20, prob=TRUE,
xlab="x-variable", ylim=c(0, 0.5),
main="normal curve over histogram when n=10")
curve(dnorm(x,mean(m),sd(m)),col="blue", lwd=2, add=TRUE, yaxt="n")

R code:

n=100
x=matrix(0,nrow=1000,ncol=n)
m=1:1000*0
for(i in 1:1000)
{
x[i,]=rgeom(n, 0.2)
m[i]=mean(x[i,])
}
hist(m, density=20, breaks=20, prob=TRUE,
xlab="x-variable", ylim=c(0, 2),
main="normal curve over histogram when n=100")
curve(dnorm(x,mean(m),sd(m)),col="blue", lwd=2, add=TRUE, yaxt="n")


Related Solutions

a) Find the analytic MLE formula for exponential distribution exp(λ). Show that MLE is the same...
a) Find the analytic MLE formula for exponential distribution exp(λ). Show that MLE is the same as MoM estimator here. (b) A random sample of size 6 from the exp(λ) distribution results in observations: 1.636, 0.374, 0.534, 3.015, 0.932, 0.179. Find the MLE on this data set in two ways: by numerical optimization of the likelihood and by the analytic formula. For (b): please give both values from the analytic MLE formula and numerical MLE solution on this data set....
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.
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.
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.
X ∼ exp(λ). Determine PDF of Y for the following cases. Make sure that you specify...
X ∼ exp(λ). Determine PDF of Y for the following cases. Make sure that you specify the range for Y values. Be extra cautious with many-to-one mappings. (a) Y = X − X2 (b)  Y = 16 − X4 (b) Y = cos(X).
Activity One: Sampling Distribution and Central Limit Theorem In each situation, nominate whether the sampling distribution...
Activity One: Sampling Distribution and Central Limit Theorem In each situation, nominate whether the sampling distribution of the sample mean can be assumed to be normally distributed or not? The population age is normally distributed, with a mean of 45 years and standard deviation of 12 years. These statistics are based on 25 observations. The population sales are uniformly distributed, with a mean of $600 and standard deviation of $2. These statistics are based on 12 observations. The population time...
Sampling 2 periods of each signal in (below) with 100 samples and plot the signal with...
Sampling 2 periods of each signal in (below) with 100 samples and plot the signal with respect to the same frequency reference signal cos(ω0t): a.xa(t)=50sin(100t+0.2) b.xb(t)=25cos(5000t−π/4) c.xc(t)=50sin(1000t+ π/4)−20cos(1000t−0.5) d.xd(t)=30sin(3000(t−5×10−5)) e.xe(t)=25cos(5000t−2.25π) f.xf(t)=−25cos(5000t+3π/4)
For each of the following research scenarios, give the appropriate sampling distribution (i.e., test statistic) and...
For each of the following research scenarios, give the appropriate sampling distribution (i.e., test statistic) and indicate the appropriate statistical procedure to test the null hypothesis, and state the most appropriate null and alternate hypotheses A research group believes that changes in the annual extent of sea ice cover in the Beaufort Sea affects the mercury concentration in ringed seals that the people of Ulukhaktok (formerly known as Holman) NWT rely on as an important food source. They measured mercury...
For each of the following research scenarios, give the appropriate sampling distribution (i.e., test statistic) and...
For each of the following research scenarios, give the appropriate sampling distribution (i.e., test statistic) and indicate the appropriate statistical procedure to test the null hypothesis, and state the most appropriate null and alternate hypotheses House sales price is known to be highly influenced by location. An urban geographer believes that suburban houses within walking distance (<1.5 km) of transit hubs such as rail or subway stations will be more attractive and thus more expensive than similar sized houses more...
Match the following -A.B.C. A sampling distribution is centered at -A.B.C. A bootstrap distribution is centered...
Match the following -A.B.C. A sampling distribution is centered at -A.B.C. A bootstrap distribution is centered at -A.B.C. A randomization distribution is centered at A. the statistic from the original sample. B. the null hypothesis value for parameter. C. the population parameter.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT