Explanation of this code in RStudio: What is \"rvnm\" in the code? set.seed(124)
ID: 3177400 • Letter: E
Question
Explanation of this code in RStudio: What is "rvnm" in the code?
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")
It should solve the following problem:
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
(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.
It is small because the varince I get is 2.311387 and the sampling of the varince I get 0.03301982. Since n = 70 we divide by our varince. Its also becuse we are grouping them.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.