Properties of the Distribution
Calculation of Mean and Variance
Calculating E( X ), the expectation or mean of the Discrete Uniform ( N ) distribution.
> restart;
> with(plots, display):
>
> f:=x->1/N;
> F:=x->floor(x)/N;
> EX:=simplify(sum(x*f(x),x=1..N));
Calculating Var( X ), the variance of the Discrete Uniform ( N ) distribution.
We will employ the formula: Var( X ) = E( ) -
> E_X_SQ:=simplify(sum(x^2*f(x),x=1..N));
> VarX:=simplify(E_X_SQ-EX^2);
>