I generated a series of 20 numbers uniformly distributed in the interval [0,1].
i Ui
1 0.179249377
2 0.55231524
3 0.845266587
4 0.335790807
5 0.755363948
6 0.136198531
7 0.641448669
8 0.479322568
9 0.779031078
10 0.610433663
11 0.989860381
12 0.765129741
13 0.840363047
14 0.255395385
15 0.002587429
16 0.311871613
17 0.081981029
18 0.791845714
19 0.896312967
20 0.858145209
For Uniform distribution
mean = (a+b)/2
variance = (b-a)2/12
Does this mean that for this data set:
mean = (min+max)/2 = (0.002587+0.989860)/2 = 0.4962
variance = (max-min)2/12 =(0.989860-0.002587)2/12=0.0812
Or would I calculate the mean and variance for this data set the regular way?
mean = ∑Ui/20 = 0.5554
variance = ∑(Ui-μ)2/20-1 = 0.0954