Observe the following code:
p = 0.5; n = 10^2;
XbarObservationSet = Mean[RandomVariate[GeometricDistribution[p], {n, n}]]
myplot1 = ?????
myplot2 = Plot[PDF[NormalDistribution[0, 1], x], {x, -3, 3}]
Show[myplot1, myplot2]
Suppose my goal is to take all of the data collected in XbarObservationSet
and display an approximated, continuous probability density function corresponding to the observed data and then compare it to a typical normal distribution. In other words, I want to see the continuous PDF approximation of the 100 instances of the estimator Xbar that I have collected. How can I do this? How would I define myplot1
?
{n, n}
rather than something like{n, 100n}
? With just 100 simulations of the mean of 100 samples you're not going to get a very good estimate (let alone a good estimate from a secondary continuous approximation). With a much larger sample size (say '100 n = 10,000`) then all 3 of the answers below will work fine and you'll see that the distribution of the mean of 100 samples is approximately normal (i.e., the Central Limit Theorem kicks in). $\endgroup$