Discrete Uniform Distribution

Author

Eric W. Weisstein
November 23, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Statistics/DiscreteUniformDistribution.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/DiscreteUniformDistribution.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Discrete Distribution

Stats

Stats[DiscreteUniformDistribution[n],n]//StatsForm//Simplify//TraditionalForm

Raw Moments

(Overscript[μ, ′])[i_]:=Factor[Limit[D[Exp[t](1-Exp[n t])/n/(1-Exp[t]),{t,i}],t->0]]

Table[(Overscript[μ, ′])[i],{i,5}]//ColumnForm

Characteristic Function

CharacteristicFunction[DiscreteUniformDistribution[n],t]

Normalization

Sum[1/n,{k,n}]

Mean

Sum[k/n,{k,n}]

Mean[DiscreteUniformDistribution[n]]

Variance

Simplify[Variance[DiscreteUniformDistribution[n]]]

Sum[(k-(1+n)/2)^2/n,{k,n}]

Mean Deviation

Sum[Abs[k-(n+1)/2]/n,{k,n}]

md=Table[Sum[Abs[k-(n+1)/2]/n,{k,n}],{n,15}]

<<Plot`

IntegerListPlot[md,AxesLabel->TraditionalForm/@{n,MD}]

Break it up into two pieces

n==2 m-1

FullSimplify[(Sum[m-k,{k,m-1}]+Sum[k-m,{k,m+1,n}])/n]

Simplify[(Sum[m-k,{k,m-1}]+Sum[k-m,{k,m+1,n}])/n /.m->(n+1)/2]

Table[(n^2-1)/(4n),{n,1,10,2}]

n==2 m

FullSimplify[(Sum[m+1/2-k,{k,m}]+Sum[k-(m+1/2),{k,m+1,n}])/n ]

Simplify[(Sum[m+1/2-k,{k,m}]+Sum[k-(m+1/2),{k,m+1,n}])/n /.m->n/2]

Table[n/4,{n,2,10,2}]

Table[If[OddQ[n],(n^2-1)/(4n),n/4],{n,15}]