Question

In the notes there is a Central Limit Theorem example in which a sampling distribution of means is created using a for loop,

R Programming codes for the above questions?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

a)  

sdx <- rep(0,10000)
set.seed(10)
for (i in 1:10000) {
x <- runif(30,100,300)
sdx[i]=sd(x)
}

hist(sdx, probability = TRUE, xlab = "Sample standard deviation")

b)   

sdx <- rep(0,10000)

set.seed(10)
for (i in 1:10000) {
x <- runif(50,100,300)
sdx[i]=sd(x)
}
hist(sdx, probability = TRUE, xlab = "Sample standard deviation")

c)

sdx <- rep(0,10000)

set.seed(10)
for (i in 1:10000) {
x <- runif(30,100,500)
sdx[i]=sd(x)
}
hist(sdx,probability = TRUE,xlab = "Sample standard deviation")

d) For multiple histograms to compare, we will use 'par' command. and For common scales, we will set a common limit on x axis, i.e. 0 to 150.

par(mfrow=c(2,2))

sdx <- rep(0,10000)
set.seed(10)
for (i in 1:10000) {
x <- runif(30,100,300)
sdx[i]=sd(x)
}

hist(sdx,probability = TRUE,xlab = "Sample standard deviation",xlim = c(0,150))

sdx <- rep(0,10000)
set.seed(10)
for (i in 1:10000) {
x <- runif(50,100,300)
sdx[i]=sd(x)
}
hist(sdx,probability = TRUE,xlab = "Sample standard deviation",xlim = c(0,150))


set.seed(10)
sdx <- rep(0,10000)
for (i in 1:10000) {
x <- runif(30,100,500)
sdx[i]=sd(x)
}
hist(sdx,probability = TRUE,xlab = "Sample standard deviation",xlim = c(0,150))

Histogram of sdx Histogram of sdx 50 100 150 50 100 150 Sample standard deviation Sample standard deviation Histogram of sdx

The histogram squeezes as we increase the sample size and becomes more normally distributed.

On changing the maximum value for uniform distribution, the graph shifts towards the right.

  For any query related to the codes used above, please comment the same.

Add a comment
Know the answer?
Add Answer to:
In the notes there is a Central Limit Theorem example in which a sampling distribution of means i...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Which of the following statements concerning sampling is false? (1) The Central Limit Theorem is very...

    Which of the following statements concerning sampling is false? (1) The Central Limit Theorem is very important for statistical inference. (2) The standard error of an estimator is the standard deviation of a statistic. (3) Regardless of the sample size n, if the population distribution is normal then the sampling distribution of ī will be exactly normal. (4) If the sampled population is uniform then the sampling distribution of ī is also approximately uniform.

  • Which of the following statements concerning sampling is false? (1) The Central Limit Theorem is very...

    Which of the following statements concerning sampling is false? (1) The Central Limit Theorem is very important for statistical inference. (2) The standard error of an estimator is the standard deviation of a statistic. (3) Regardless of the sample size n, if the population distribution is normal then the sampling distribution of ī will be exactly normal. (4) If the sampled population is uniform then the sampling distribution of ī is also approximately uniform.

  • R problem 1: The reason that the t distribution is important is that the sampling distribution...

    R problem 1: The reason that the t distribution is important is that the sampling distribution of the standardized sample mean is different depending on whether we use the true population standard deviation or one estimated from sample data. This problem addresses this issue. 1. Generate 10,000 samples of size n- 4 from a normal distribution with mean 100 and standard deviation σ = 12, Find the 10,000 sample means and find the 10,000 sample standard deviations. What are the...

  • Question 19 (8 points) Determine in each of the following situations whether the Central Limit Theorem...

    Question 19 (8 points) Determine in each of the following situations whether the Central Limit Theorem applies in order to conclude that sampling distribution of the sample mean, that X-NI 7-N (M, ) For each distribution, determine whether CLT applies. If it does not, then enter NA as your answer in the blank number that corresponds to the distribution number. If it does, then enter the shape of the sample means as your first item in a list, the mean...

  • The Central Limit Theorem states that the sampling distribution will be normal as long as the...

    The Central Limit Theorem states that the sampling distribution will be normal as long as the subgroup size is large enough. Explain what role the subgroup size has on the Variability of the means

  • Central Limit Theorem for Means/Calculator Understand sampling distributions and the Central Limit Theorem for Means Question...

    Central Limit Theorem for Means/Calculator Understand sampling distributions and the Central Limit Theorem for Means Question A head librarian for a large city is looking at the overdue fees per user system wide to determine if the library should extend its lending period. The average library user has $19.67 in fees, with a standard deviation of $7.02. The data is normally distributed and a sample of 72 library users is selected at random from the population. Select the expected mean...

  • The Central Limit Theorem basically states that the sampling distribution will be normal as long as...

    The Central Limit Theorem basically states that the sampling distribution will be normal as long as the subgroup size is large enough. Explain what role the subgroup size has on the: a. normality of the means. b. variability of the means

  • The sampling distribution of means is: A list of all members of the population you are...

    The sampling distribution of means is: A list of all members of the population you are studying. Also called the standard error of the mean. A set of numbers representing all of the possible sample means on a variable you could draw from a given population and a given sample size. A list of all members of the sample that you draw. 1 points Question 2 The standard deviation of the sampling distribution of means is called the: Margin of...

  • Use the Central Limit Theorem to find the mean and standard error of the mean of...

    Use the Central Limit Theorem to find the mean and standard error of the mean of the sampling distribution. Then sketch a graph of the sampling distribution. The mean price of photo printers on a website is ​$243 with a standard deviation of ​$59. Random samples of size 26 are drawn from this population and the mean of each sample is determined. The mean of the distribution of sample means is _______.

  • Use the Central Limit Theorem to find the mean and standard error of the mean of...

    Use the Central Limit Theorem to find the mean and standard error of the mean of the sampling distribution. Then sketch a graph of the sampling distribution The mean price of photo printers on a website is $250 with a standard deviation of $63. Random samples of size 20 are drawn from this population and the mean of each sample is determined. The mean of the distribution of sample means is The standard deviation of the distribution of sample means...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT