4. Use set.seed(100) to answer this question. (a) Generate a random sample of size 30 from the exponential distribution with parameter λ = 2 and find the mean of your sample. Repeat this process 1000 times and draw a histogram of these 1000 means (use prob=T in hist). (Do not print the 1000 means.) (b) Next we check whether the Central Limit Theorem gives a good approximation for the distribution of the means. Overlay the histogram with a normal density curve with appropriate mean and variance. (You will need to use the mean and variance of exponential distributions from lectures. No need to derive). Comment on the fit.
您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632
好兄弟你也悉大的?
用set.seed(100)来回答这个问题(a) 从带参数的指数分布中生成一个大小为30的随机样本λ = 找到你的样本的平均值。重复此过程1000次,并绘制这1000个平均值的直方图(在hist中使用prob=T)((b)接下来我们检查中心极限定理是否能很好地近似平均数的分布。将直方图与具有适当均值和方差的正态密度曲线叠加(你需要使用讲座中指数分布的均值和方差。无需推导)。对适合度进行评价。