From: Robin Hankin
[stuff about the CLT deleted]
So you can use R usefully to eveluate general statisical
issues of this kind!
absolutely! R is excellent for this sort of thing. I use it for
teaching stats all the time.
I'd say that without a tool like R you cannot learn statistics.
Consider an exponential distribution, which is very skewed.
f <- function(n){mean(rexp(n))}
then f(10) gives the mean of 10 independent exponentially distributed
random
variables. Then
hist(replicate(10000,f(10)))
gives us a histogram of 10000 observations of a variable that
is itself
the mean of 10 exponential variables. It still looks a bit
skew to me.
Try 100 exponential variables:
hist(replicate(10000,f(100)))
Still a tiny bit skew.
hist(replicate(1000,f(1000)))
which is indistinguishable from a Gaussian.
So as n -> infinity, the CLT kicks in. But here 100 is a bit
less than
infinity and 1000 ~= infinity.
It's one thing to know a theoretical result, it's quite another to
verify it numerically.