Skip to main content

Uniform Distribution (Discrete)

Where do you meet this distribution?

  • Gambling, Game : Dice, Roulette
  • n-dim. random walk
  • Fisher-Yates shuffle algorithm

Shape of Distribution

Basic Properties

  • Two integer parameters a,ba,b is required.

    a<ba < b

These parameters are minimum and maximum value of variable respectively

  • Discrete distribution defined at x=a,a+1,,bx={a, a+1, \cdots, b}

Probability

  • Cumulative distribution function

    F(x)={0(x<a)xa+1ba+1(x={a,a+1,,b})1(x>b)F(x)=\begin{cases}0&(x<a)\\ \frac{x-a+1}{b-a+1}& (x=\{a,a+1,\cdots,b\})\\1&(x>b)\end{cases}
  • Probability mass function

    f(x)={1ba+1(x={a,a+1,,b})0(otherwise)f(x)=\begin{cases}\frac{1}{b-a+1}&(x=\{a,a+1,\cdots,b\})\\0&(\text{otherwise})\end{cases}
  • How to compute these on Excel.

AB
1DataDescription
23Value for which you want the distribution
31Value of parameter A
46Value of parameter B
5FormulaDescription (Result)
6=IF(A2<A3,0,IF(A2<=A4, (A2-A3+1)/(A4-A3+1),1))Cumulative distribution function for the terms above
7=IF(AND(A3<=A2,A2<=A4),1/(A4-A3+1), 0)Probability mass function for the terms above

Characteristics

Mean -- Where is the "center" of the distribution? (Definition)

  • Mean of the distribution is given as

    a+b2\frac{a+b}{2}
  • How to compute this on Excel

AB
1DataDescription
21Value of parameter A
32Value of parameter B
4FormulaDescription (Result)
5=(A2+A3)/2Mean of the distribution for the terms above

Standard Deviation -- How wide does the distribution spread? (Definition)

  • Variance of the distribution is given as

    (ba+1)2112\frac{(b-a+1)^2-1}{12}

    Standard Deviation is a positive square root of Variance

  • How to compute this on Excel

AB
1DataDescription
21Value of parameter A
36Value of parameter B
4FormulaDescription (Result)
5=SQRT(((A3-A2+1)^2-1)/12)Standard deviation of the distribution for the terms above

Skewness -- Which side is the distribution distorted into? (Definition)

  • Skewness is 00 .

Kurtosis -- Sharp or Dull, consequently Fat Tail or Thin Tail (Definition)

  • Kurtosis of the distribution is given as

    6((ba+1)2+15((ba+1)21-\frac{6((b-a+1)^2+1}{5((b-a+1)^2-1}
  • How to compute this on Excel

AB
1DataDescription
21Value of parameter A
36Value of parameter B
4FormulaDescription (Result)
5=-6*((A3-A2+1)^2+1)/(5*((A3-A2+1)^2-1))Kurtosis of the distribution for the terms above

Random Numbers

  • How to generate random numbers on Excel.
AB
1DataDescription
21Value of parameter A
36Value of parameter B
4FormulaDescription (Result)
5=INT((A3-A2+1)*NTRAND(100))+A2100 uniform deviates based on Mersenne-Twister algorithm for which the parameters above

Note The formula in the example must be entered as an array formula. After copying the example to a blank worksheet, select the range A5:A104 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER.

NtRand Functions

Not supported yet

Reference