Question

In: Statistics and Probability

Assume that we draw random numbers from a normal distribution with mean μ = 5, variance...

Assume that we draw random numbers from a normal distribution with mean μ = 5, variance σ2 = 10.
• (a) According to Central Limit Theorem what is the sample mean and SE when we have sample size

of 10, 100, 1000 and 10000?

• (b) Experimentally justify the Central Limit Theorem using simulation given sample a size of 10, 100 and 1000 (for each given sample size you can use 50000 simulations to explore the sampling distribution of the mean )

• (c)

When sample size is 10, obtain the t scores and z scores of the sampling means (from 50000 simulations). Plot the distributions in a histogram with the theoretical Gaussian curve and t-distribution (9 degrees of freedom). For t score and z score, which of the theoretical curve fits better? Why?

For each simulation: the z score of the mean can be calculated as:

( X̄ − μ )/(σ/√ n)

where X̄ is the mean of the sample, μ is the population mean and σ is the population SD.

The t score of the mean can be alculated as:

( X̄ − μ )/(S/√ n)

where X̄ is the mean of the sample, μ is the population mean and S is the SD of the sample.

Solutions

Expert Solution

a)The Central Limit Theorem states that if are IID random variables with mean and standard deviation , then the distribution of the mean is approximately normal with mean and standard deviation as .

With and

, the mean of is 5 and sd

, the mean of is 5 and sd .

, the mean of is 5 and sd

, the mean of is 5 and sd .

b) The R code for 50000 simulations with sample size given below.

n <- 10
sims <- 50000
mu <- 5
sigma <- sqrt(10)
mean_normVec <- array(dim=c(sims))
for ( i in 1:sims)
{
normVec <- rnorm(n, mean = mu, sd = sigma)
mean_normVec[i] <- mean(normVec)
}
mean(mean_normVec)
var(mean_normVec)

The outputs are for
> mean(mean_normVec)
[1] 4.998703
> var(mean_normVec)
[1] 1.01

> mean(mean_normVec)
[1] 5.001954
> var(mean_normVec)
[1] 0.1009115

> mean(mean_normVec)
[1] 4.99969
> var(mean_normVec)
[1] 0.01007502

> mean(mean_normVec)
[1] 5.00003
> var(mean_normVec)
[1] 0.001009504

The experimental means and sd are , , , .

c) When , the R code for calculating the z and t score is given below.

n <- 10
sims <- 50000
mu <- 5
sigma <- sqrt(10)
mean_normVec <- array(dim=c(sims))
for ( i in 1:sims)
{
normVec <- rnorm(n, mean = mu, sd = sigma)
mean_normVec[i] <- mean(normVec)
}
xbar <- mean(mean_normVec)
s <- sd(mean_normVec)
z <- (xbar-mu)/(sigma/sqrt(n))
t <- (xbar-mu)/(s/sqrt(n))
z
t

The output is:

[1] 0.001943632
> t
[1] 0.00615145

The R cod for plotting the histogram and theoretical distributions is given below

n <- 10
sims <- 50000
mu <- 5
sigma <- sqrt(10)
mean_normVec <- array(dim=c(sims))
std_mean_tVec <- array(dim=c(sims))
std_mean_normVec <- array(dim=c(sims))
for ( i in 1:sims)
{
normVec <- rnorm(n, mean = mu, sd = sigma)
mean_normVec[i] <- mean(normVec)
std_mean_normVec[i] <- (mean_normVec[i]-mu)/(sigma/sqrt(n))
std_mean_tVec[i] <- (mean_normVec[i]-mu)/(sd(normVec)/sqrt(n))
}
xbar <- mean(mean_normVec)
s <- sd(mean_normVec)
z <- (xbar-mu)/(sigma/sqrt(n))
t <- (xbar-mu)/(s/sqrt(n))
z
t

#hist(std_mean_tVec)
hist(std_mean_tVec, density=20, breaks=20, prob=TRUE,
xlab="x", ylim=c(0, 0.5),
main="standar normal & t curve over histogram")
curve(dnorm(x, mean=0, sd=1),
col="darkblue", lwd=2, add=TRUE, yaxt="n")
curve(dt(x, df=9),
col="darkred", lwd=2, add=TRUE, yaxt="n")

The plots are:


Related Solutions

Generate 1000 random numbers from a normal distribution with mean 1 and variance 2 using Box‐Muller...
Generate 1000 random numbers from a normal distribution with mean 1 and variance 2 using Box‐Muller transformation in R.
Draw 100 numbers from a normal distribution with a mean of **7** and standard deviation of...
Draw 100 numbers from a normal distribution with a mean of **7** and standard deviation of **4**, and store the output in an object called "x1": (R STUDIO)
The following numbers constitute a random sample from a normal distribution with an unknown mean and...
The following numbers constitute a random sample from a normal distribution with an unknown mean and unknown variance σ 2 1 : 15.0 19.1 16.6 20.4 13.5 (a) Test at the 5% significance level H0 : µ = 15 against Ha : µ > 15. Again, do the problem in two ways- first by obtaining the rejection region and second, by using the p-value. (b) Suppose we have another random sample from a normal distribution with an unknown mean and...
We draw a random sample of size 49 from a normal population with variance 2.1. If...
We draw a random sample of size 49 from a normal population with variance 2.1. If the sample mean is 21.5, what is a 99% confidence interval for the population mean?
Question: Consider a normal distribution with mean m and variance s2. Assume we know that s2...
Question: Consider a normal distribution with mean m and variance s2. Assume we know that s2 = 4 and suspect that m 6= 3. Assume further that we have independently drawn 100 values from the distribution and have obtained a sample mean of 5. (a) Explain the notion of a sampling distribution and state the central limit theorem. (b) Approximately, what is the sampling distribution in the above situation? Assume now that we want to conduct a hypothesis test concerning...
Let the random variable X follow a normal distribution with a mean of μ and a...
Let the random variable X follow a normal distribution with a mean of μ and a standard deviation of σ. Let 1 be the mean of a sample of 36 observations randomly chosen from this population, and 2 be the mean of a sample of 25 observations randomly chosen from the same population. a) How are 1 and 2 distributed? Write down the form of the density function and the corresponding parameters. b) Evaluate the statement: ?(?−0.2?< ?̅1 < ?+0.2?)<?(?−0.2?<...
For this question assume that we have a random sample from a normal distribution with unknown...
For this question assume that we have a random sample from a normal distribution with unknown mean but known variance. (a) Suppose that we have 36 observations, the sample mean is 5, and the population variance is 9. Construct a 95% confidence interval for the population mean. (b) Repeat the preceding with a population variance of 25 rather than 9. (c) Repeat the preceding with a sample size of 25 rather than 36. (d) Repeat the preceding but construct a...
Assume that lengths of newborn babies follow a normal distribution with mean μ. The lengths (in...
Assume that lengths of newborn babies follow a normal distribution with mean μ. The lengths (in centimeters) of seven randomly selected newborn babies are :45、46、59、53、46、51、54 (give answer to TWO places past decimal) 1. Construct a 99% confidence interval for μ: Lower Bound?, Upper Bound: ? 2. Perform a hypothesis test to see if the population mean length is more than 50 centimeters (HA : μ > 50) at the significant level α = 0.05: Compute the test statistic:_____ Indicate the...
1. Suppose X follows the normal distribution with mean μ and variance σ^2 . Then: (Circle...
1. Suppose X follows the normal distribution with mean μ and variance σ^2 . Then: (Circle all that apply.) A. X is symmetric with respect to the y-axis. B. P(X=2)=P(X=-2). C. Y=aX follows the same distribution as X, where a is a constant. D. None of the above statements is correct. 2. Given a random variable X having a normal distribution with μ=50, and σ=10. The probability that Z assumes a value between 45 and 62 is: ___________. 3. Which...
Suppose X1, . . . , Xn is a random sample from the Normal(μ, σ2) distribution,...
Suppose X1, . . . , Xn is a random sample from the Normal(μ, σ2) distribution, where μ is unknown but σ2 is known, and it is of interest to test H0: μ = μ0 versus H1: μ ̸= μ0 for some value μ0. The R code below plots the power curve of the test Reject H0 iff |√n(X ̄n − μ0)/σ| > zα/2 for user-selected values of μ0, n, σ, and α. For a sequence of values of μ,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT