Skip to main content

Triangular Distribution

Where do you meet this distribution?

Shape of Distribution

Basic Properties

  • Three parameters a,b,ca, b, c are required (How can you get these).

    a<c<ba<c<b

    These parameters are minimum value of variable, maximum value of variable and mode of the distribution respectively.

  • Continuous distribution defined on bounded range axba\leq x \leq b

  • This distribution can be symmetric or asymmetric.

Probability

  • Cumulative distribution function

    F(x)={(xa)2(ba)(ca)(ax<c)1(bx)2(ba)(bc)(cxb)F(x)=\begin{cases}\frac{(x-a)^2}{(b-a)(c-a)}\quad&(a\leq x<c)\\1-\frac{(b-x)^2}{(b-a)(b-c)}\quad&(c\leq x\leq b)\end{cases}
  • Probability density function

    f(x)={2(xa)(ba)(ca)(ax<c)2(bx)(ba)(bc)(cxb)f(x)=\begin{cases}\frac{2(x-a)}{(b-a)(c-a)}\quad&(a\leq x<c)\\\frac{2(b-x)}{(b-a)(b-c)}\quad&(c\leq x\leq b)\end{cases}
  • How to compute these on Excel.

AB
1DataDescription
21.5Value for which you want the distribution
31Value of parameter Min
43Value of parameter Max
51.4Value of parameter Mode
6FormulaDescription (Result)
7=NTTRIANGULARDIST(A2,A3,A4,A5,TRUE)Cumulative distribution function for the terms above
8=NTTRIANGULARDIST(A2,A3,A4,A5,FALSE)Probability density function for the terms above

Triangular distribution

Quantile

  • Inverse function of cumulative distribution function

    F1(P)={P(ca)(ba)+a(P<caba)(1P)(bc)(ba)+b(Pcaba)F^{-1}(P)=\begin{cases}\sqrt{P(c-a)(b-a)}+a\quad&\left(P< \frac{c-a}{b-a}\right)\\-\sqrt{(1-P)(b-c)(b-a)}+b\quad&\left(P\geq \frac{c-a}{b-a}\right)\end{cases}
  • How to compute this on Excel.

AB
1DataDescription
20.5Probability associated with the distribution
31Value of parameter Min
43Value of parameter Max
51.4Value of parameter Mode
6FormulaDescription (Result)
7=NTTRIANGULARINV(A2,A3,A4,A5)Inverse of the cumulative distribution function for the terms above

Characteristics

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

  • Mean of the distribution is given as

    a+b+c3\frac{a+b+c}{3}
  • How to compute this on Excel

AB
1DataDescription
21Value of parameter Min
33Value of parameter Max
41.4Value of parameter Mode
5FormulaDescription (Result)
6=NTTRIANGULARMEAN(A2,A3,A4)Mean of the distribution for the terms above

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

  • Variance of the distribution is given as

    a2+b2+c2abbcca18\frac{a^2+b^2+c^2-ab-bc-ca}{18}

    Standard Deviation is a positive square root of Variance.

  • How to compute this on Excel

AB
1DataDescription
21Value of parameter Min
33Value of parameter Max
41.4Value of parameter Mode
5FormulaDescription (Result)
6=NTTRIANGULARSTDEV(A2,A3,A4)Standard deviation of the distribution for the terms above

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

  • Skewness of the distribution is given as

    2(a+b2c)(2abc)(a2b+c)5(a2+b2+c2abbcca)3/2\frac{\sqrt{2}(a+b-2c)(2a-b-c)(a-2b+c)}{5(a^2+b^2+c^2-ab-bc-ca)^{3/2}}
  • How to compute this on Excel

AB
1DataDescription
21Value of parameter Min
33Value of parameter Max
41.4Value of parameter Mode
5FormulaDescription (Result)
6=NTTRIANGULARSKEW(A2,A3,A4)Skewness of the distribution for the terms above

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

  • Kurtosis is 0.6-0.6 .

Random Numbers

  • Random number x is generated by inverse function method, which is for uniform random U,

    x={U(ca)(ba)+a(U<caba)(1U)(bc)(ba)+b(Ucaba)x=\begin{cases}\sqrt{U(c-a)(b-a)}+a\quad&\left(U< \frac{c-a}{b-a}\right)\\-\sqrt{(1-U)(b-c)(b-a)}+b\quad&\left(U\geq \frac{c-a}{b-a}\right)\end{cases}
  • How to generate random numbers on Excel.

AB
1DataDescription
20Value of parameter A
33Value of parameter B
41.8Value of parameter C
5FormulaDescription (Result)
6=NTRANDTRIANGULAR(100,A2,A3,A5,0)100 triangular 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 A6:A105 starting with the formula cell. Press F2, and then press CTRL+SHIFT+ENTER.

NtRand Functions

Reference