// Home / Documentation / Gallery of Distributions / Bernoulli Distribution

Bernoulli Distribution

Where do you meet this distribution?

  • Coin toss
  • 1-dim. random walk

Shape of Distribution

Basic Properties

  • A parameter is required.
  • Discrete distribution defined at

Probability

  • Cumulative distribution function
  • Probability mass function
  • How to compute these on Excel.

     
    1
    2
    3
    4
    5
    6
    A B
    Data Description
    1 Value for which you want the distribution
    0.6 Value of parameter p
    Formula Description (Result)
    =IF(A2=0,1-A3,1) Cumulative distribution function for the terms above
    =IF(A2=0,1-A3,A3) Probability mass function for the terms above

Characteristics

Mean – Where is the “center” of the distribution? (Definition)

  • Mean of the distribution is given as

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

  • Variance of the distribution

    Standard Deviation is a positive square root of Variance

  • How to compute this on Excel

     
    1
    2
    3
    4
    A B
    Data Description
    0.6 Value of parameter p
    Formula Description (Result)
    =SQRT(A2*(1-A2)) Variance of the distribution for the terms above

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

  • Skewness
  • How to compute this on Excel.
     
    1
    2
    3
    4
    A B
    Data Description
    0.6 Value of parameter p
    Formula Description (Result)
    =(1-2*A2)/(SQRT(A2*(1-A2)) Skewness of the distribution for the terms above

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

  • Kurtosis
  • How to compute this on Excel

     
    1
    2
    3
    4
    A B
    Data Description
    0.6 Value of parameter p
    Formula Description (Result)
    =(6*A2^2-6*A2+1)/(A2*(1-A2)) Kurtosis of the distribution for the terms above

Random Numbers

  • How to generate random numbers on Excel.
     
    1
    2
    3
    4
       
    A B
    Data Description
    0.6 Value of parameter p
    Formula Description (Result)
    =IF(NTRAND(100)<1-A2,0,1) 100 Bernoulli 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 A4:A103 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER.

NtRand Functions

Not supported yet

Reference

 

Comments are closed.