Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How do I solve this question in R studio? A Sampling distribution can be conside

ID: 3843615 • Letter: H

Question

How do I solve this question in R studio?


A Sampling distribution can be considered in the context of theoretical distribution models as well. We can approximate the distribution of the sample mean by simulation:

We do a measurement X from the abstract population distributed by Binomial(10,0.5) . Assume that 70 independent measurements are done with this distribution,(i.e.,the sample size n=70).

(a) Construct the distribution of the sample mean by using a simulation producing 10000 sample means.

(b) Plot the histogram of the distribution that you constructed in (a).

(c) Overlay the smooth density curve of the Normal distribution on the histogram of the sampling distribution that was plotted in (b).

(d) Explain why the variance of the sampling distribution is always smaller than that of the distribution of the population.

Explanation / Answer

set.seed(124)
binom <- rbinom(10000, 70, 0.5)
binom[1:10]
mean(binom)
> samplemeans <- apply(rnvm,1,mean)

> hist(samplemeans)
> hist(samplemeans,prob=T,ylim=c(0,.5))
> xs <-seq((mu-4*sigma.xbar),(mu+4*sigma.xbar),length=10000)
> ys <- dnorm(xs,mu,sigma.xbar)
> lines(xs,ys,type="l")

According to Law of Large Numbers the variance goes down when the sample size increases.

Accordingly, the average of the results obtained from a large number of trials(sample size) should be close to the expected value, and will tend to become closer as more trials are performed.
In terms of the Central Limit Theorem:

When drawing a single random sample, the larger the sample is the closer the sample mean will be to the population mean . Therefore, when drawing an infinite number of random samples, the variance of the sampling distribution will be lower the larger the size of each sample is.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote