# What would the calculated value of the standard deviation of a uniform distribution be?

A colleague wants to compare models that use either a Gaussian distribution or a uniform distribution and for other reasons needs the standard devation of these two distributions to be equal. In R I can do a simulation...

sd(runif(100000000))
sd(runif(100000000,min=0,max=2))


and see that the calculated standard deviation is likely to be ~.2887 * the range of the uniform distribution. However, I was wondering if there was an equation that could yield the exact value, and if so, what that formula was.

• What is "not meaningful" about the standard deviation of a uniform distribution? It is a measure of spread for the uniform, just as it is for almost every other distribution. It may not be the best measure of spread, but it is certainly meaningful. – Rob Hyndman Jul 29 '10 at 23:32
• All I meant was that the standard deviation is not really a parameter that defines or describes the uniform distribution well. In my mind, the standard deviation refers to the spread of a normal, or near normal distribution. Simply because a value is calculable does not mean that it is interesting or meaningful. For example, I might be able to calculate what rate parameter from an exponential distribution best matches a normal distribution, but to me such a value would not be particularly meaningful because the distribution being described is not actually exponential. – russellpierce Jul 30 '10 at 6:51
• I can define a uniform distribution with mean 0.5 and standard deviation 1/12. It is perfectly well defined, but it is not the most natural parameterization. There is nothing about standard deviations that implies normality. – Rob Hyndman Jul 30 '10 at 11:36

## 2 Answers

In general, the standard deviation of a continous uniform distribution is (max - min) / sqrt(12).

The standard deviation of the continous uniform distribution on the interval [0,1] is 12-1/2≈0.288675. The Wikipedia article lists of it's more properties.

• you mean the standard deviation... – shabbychef Sep 29 '10 at 4:16
• @shabbychef: You are right. Fixed. – Benjamin Bannier Sep 29 '10 at 14:35