= Uniform Distribution = The '''uniform distribution''' is a flat continuous probability distribution function. All values are equally likely. <> ---- == Description == The distribution is given by {{attachment:uniform.svg}} for any ''a ≤ x ≤ b''. The function is defined for all real numbers so values of ''x'' outside that range map to 0. ---- == Moments == The [[Analysis/ExpectedValue|expected value]] is given as ''E[X] = (a+b)/2''. The derivation is: {{attachment:exp1.svg}} {{attachment:exp2.svg}} [[Analysis/Variance|Variance]] is given as ''Var[X] = (b-a)^2^/12''. It is sometimes given as ''(a-b)^2^/12'' instead, but it doesn't matter since the difference is squared and any sign is discarded. The simplest derivation is through ''Var[X] = E[X^2^] - E[X]^2^''. The second raw moment is calculated as: {{attachment:var1.svg}} {{attachment:var2.svg}} Meanwhile the square of the expected value is simple to calculate: {{attachment:var3.svg}} Altogether now: {{attachment:var4.svg}} ---- CategoryRicottone