# How do you generate mean from a uniform distribution between 0 and 1

How do you generate mean from a uniform distribution between 0 and 1 with a sample size of 10? using excel?

Do you have to first generate random numbers from 0 to 1?

-
I don't remember much from the course I took on it, but if I understand what you're asking, maybe something like en.wikipedia.org/wiki/Rejection_sampling would work? –  Zach L. Apr 3 '13 at 3:09

To have a "sample size of 10" we need to take 10 samples from the distribution. In Excel, this is achieved by:

=RAND()


So type this into one cell, then click and drag this to fill 10 cells, say cells A1 to A10. Then to compute the sample mean:

=AVERAGE(A1:A10)


The actual mean is $0.5$, so the sample mean should be somewhat close to this.

This is what it looks like on my computer:

(This is actually LibreOffice Calc, but I believe the syntax is the same.)

-