• Descriptive
    • Moments
    • Concentration
    • Central Tendency
    • Variability
    • Stem-and-Leaf Plot
    • Histogram & Frequency Table
    • Data Quality Forensics
    • Conditional EDA
    • Quantiles
    • Kernel Density Estimation
    • Normal QQ Plot
    • Bootstrap Plot

    • Multivariate Descriptive Statistics
  • Distributions
    • Binomial Probabilities
    • Geometric Probabilities
    • Negative Binomial Probabilities
    • Hypergeometric Probabilities
    • Multinomial Probabilities
    • Poisson Probabilities

    • Exponential
    • Gamma
    • Erlang
    • Weibull
    • Rayleigh
    • Lognormal
    • Pareto
    • Inverse Gamma

    • Beta
    • Power
    • Beta Prime (Inv. Beta)
    • Triangular

    • Normal (area)
    • Logistic
    • Laplace
    • Cauchy (standard)
    • Cauchy (location-scale)
    • Gumbel

    • Normal RNG
    • ML Fitting
    • Tukey Lambda PPCC
    • Box-Cox Normality Plot
    • Sample Correlation r

    • Empirical Tests
  • Hypotheses
    • Theoretical Aspects of Hypothesis Testing
    • Bayesian Inference
    • Minimum Sample Size

    • Empirical Tests
    • Multivariate (pair-wise) Testing
  • Models
    • Manual Model Building
  • Time Series
    • Time Series Plot
    • Decomposition
    • Exponential Smoothing

    • Blocked Bootstrap Plot
    • Mean Plot
    • (P)ACF
    • VRM
    • Standard Deviation-Mean Plot
    • Spectral Analysis
    • ARIMA

    • Cross Correlation Function
    • Granger Causality
  1. Probability Distributions
  2. 40  Triangular Distribution
  • Preface
  • Getting Started
    • 1  Introduction
    • 2  Why Do We Need Innovative Technology?
    • 3  Basic Definitions
    • 4  The Big Picture: Why We Analyze Data
  • Introduction to Probability
    • 5  Definitions of Probability
    • 6  Jeffreys’ axiom system
    • 7  Bayes’ Theorem
    • 8  Sensitivity and Specificity
    • 9  Naive Bayes Classifier
    • 10  Law of Large Numbers

    • 11  Problems
  • Probability Distributions
    • 12  Bernoulli Distribution
    • 13  Binomial Distribution
    • 14  Geometric Distribution
    • 15  Negative Binomial Distribution
    • 16  Hypergeometric Distribution
    • 17  Multinomial Distribution
    • 18  Poisson Distribution

    • 19  Uniform Distribution (Rectangular Distribution)
    • 20  Normal Distribution (Gaussian Distribution)
    • 21  Gaussian Naive Bayes Classifier
    • 22  Chi Distribution
    • 23  Chi-squared Distribution (1 parameter)
    • 24  Chi-squared Distribution (2 parameters)
    • 25  Student t-Distribution
    • 26  Fisher F-Distribution
    • 27  Exponential Distribution
    • 28  Lognormal Distribution
    • 29  Gamma Distribution
    • 30  Beta Distribution
    • 31  Weibull Distribution
    • 32  Pareto Distribution
    • 33  Inverse Gamma Distribution
    • 34  Rayleigh Distribution
    • 35  Erlang Distribution
    • 36  Logistic Distribution
    • 37  Laplace Distribution
    • 38  Gumbel Distribution
    • 39  Cauchy Distribution
    • 40  Triangular Distribution
    • 41  Power Distribution
    • 42  Beta Prime Distribution
    • 43  Sample Correlation Distribution

    • 44  Problems
  • Descriptive Statistics & Exploratory Data Analysis
    • 45  Types of Data
    • 46  Datasheets

    • 47  Frequency Plot (Bar Plot)
    • 48  Frequency Table
    • 49  Contingency Table
    • 50  Binomial Classification Metrics
    • 51  Confusion Matrix
    • 52  ROC Analysis

    • 53  Stem-and-Leaf Plot
    • 54  Histogram
    • 55  Data Quality Forensics
    • 56  Quantiles
    • 57  Central Tendency
    • 58  Variability
    • 59  Skewness & Kurtosis
    • 60  Concentration
    • 61  Notched Boxplot
    • 62  Scatterplot
    • 63  Pearson Correlation
    • 64  Rank Correlation
    • 65  Partial Pearson Correlation
    • 66  Simple Linear Regression
    • 67  Moments
    • 68  Quantile-Quantile Plot (QQ Plot)
    • 69  Normal Probability Plot
    • 70  Probability Plot Correlation Coefficient Plot (PPCC Plot)
    • 71  Box-Cox Normality Plot
    • 72  Kernel Density Estimation
    • 73  Bivariate Kernel Density Plot
    • 74  Conditional EDA: Panel Diagnostics
    • 75  Bootstrap Plot (Central Tendency)
    • 76  Survey Scores Rank Order Comparison
    • 77  Cronbach Alpha

    • 78  Equi-distant Time Series
    • 79  Time Series Plot (Run Sequence Plot)
    • 80  Mean Plot
    • 81  Blocked Bootstrap Plot (Central Tendency)
    • 82  Standard Deviation-Mean Plot
    • 83  Variance Reduction Matrix
    • 84  (Partial) Autocorrelation Function
    • 85  Periodogram & Cumulative Periodogram

    • 86  Problems
  • Hypothesis Testing
    • 87  Normal Distributions revisited
    • 88  The Population
    • 89  The Sample
    • 90  The One-Sided Hypothesis Test
    • 91  The Two-Sided Hypothesis Test
    • 92  When to use a one-sided or two-sided test?
    • 93  What if \(\sigma\) is unknown?
    • 94  The Central Limit Theorem (revisited)
    • 95  Statistical Test of the Population Mean with known Variance
    • 96  Statistical Test of the Population Mean with unknown Variance
    • 97  Statistical Test of the Variance
    • 98  Statistical Test of the Population Proportion
    • 99  Statistical Test of the Standard Deviation \(\sigma\)
    • 100  Statistical Test of the difference between Means -- Independent/Unpaired Samples
    • 101  Statistical Test of the difference between Means -- Dependent/Paired Samples
    • 102  Statistical Test of the difference between Variances -- Independent/Unpaired Samples

    • 103  Hypothesis Testing for Research Purposes
    • 104  Decision Thresholds, Alpha, and Confidence Levels
    • 105  Bayesian Inference for Decision-Making
    • 106  One Sample t-Test
    • 107  Skewness & Kurtosis Tests
    • 108  Paired Two Sample t-Test
    • 109  Wilcoxon Signed-Rank Test
    • 110  Unpaired Two Sample t-Test
    • 111  Unpaired Two Sample Welch Test
    • 112  Two One-Sided Tests (TOST) for Equivalence
    • 113  Mann-Whitney U test (Wilcoxon Rank-Sum Test)
    • 114  Bayesian Two Sample Test
    • 115  Median Test based on Notched Boxplots
    • 116  Chi-Squared Tests for Count Data
    • 117  Kolmogorov-Smirnov Test
    • 118  One Way Analysis of Variance (1-way ANOVA)
    • 119  Kruskal-Wallis Test
    • 120  Two Way Analysis of Variance (2-way ANOVA)
    • 121  Repeated Measures ANOVA
    • 122  Friedman Test
    • 123  Testing Correlations
    • 124  A Note on Causality

    • 125  Problems
  • Regression Models
    • 126  Simple Linear Regression Model (SLRM)
    • 127  Multiple Linear Regression Model (MLRM)
    • 128  Logistic Regression
    • 129  Generalized Linear Models
    • 130  Multinomial and Ordinal Logistic Regression
    • 131  Cox Proportional Hazards Regression
    • 132  Conditional Inference Trees
    • 133  Leaf Diagnostics for Conditional Inference Trees
    • 134  Hypothesis Testing with Linear Regression Models (from a Practical Point of View)

    • 135  Problems
  • Introduction to Time Series Analysis
    • 136  Case: the Market of Health and Personal Care Products
    • 137  Decomposition of Time Series
    • 138  Ad hoc Forecasting of Time Series
  • Box-Jenkins Analysis
    • 139  Introduction to Box-Jenkins Analysis
    • 140  Theoretical Concepts
    • 141  Stationarity
    • 142  Identifying ARMA parameters
    • 143  Estimating ARMA Parameters and Residual Diagnostics
    • 144  Forecasting with ARIMA models
    • 145  Intervention Analysis
    • 146  Cross-Correlation Function
    • 147  Transfer Function Noise Models
    • 148  General-to-Specific Modeling
  • References
  • Appendices
    • Appendices
    • A  Method Selection Guide
    • B  Presentations and Teaching Materials
    • C  R Language Concepts for Statistical Computing
    • D  Matrix Algebra
    • E  Standard Normal Table (Gaussian Table)
    • F  Critical values of Student’s \(t\) distribution with \(\nu\) degrees of freedom
    • G  Upper-tail critical values of the \(\chi^2\)-distribution with \(\nu\) degrees of freedom
    • H  Lower-tail critical values of the \(\chi^2\)-distribution with \(\nu\) degrees of freedom

Table of contents

  • 40.1 Probability Density Function
  • 40.2 Purpose
  • 40.3 Distribution Function
  • 40.4 Moment Generating Function
  • 40.5 1st Uncentered Moment
  • 40.6 2nd Uncentered Moment
  • 40.7 3rd Uncentered Moment
  • 40.8 4th Uncentered Moment
  • 40.9 2nd Centered Moment
  • 40.10 3rd Centered Moment
  • 40.11 4th Centered Moment
  • 40.12 Expected Value
  • 40.13 Variance
  • 40.14 Median
  • 40.15 Mode
  • 40.16 Coefficient of Skewness
  • 40.17 Coefficient of Kurtosis
  • 40.18 Parameter Estimation
  • 40.19 R Module
    • 40.19.1 RFC
    • 40.19.2 Direct app link
    • 40.19.3 R Code
  • 40.20 Example
  • 40.21 Random Number Generator
  • 40.22 Property 1: Fixed Kurtosis
  • 40.23 Property 2: Symmetric Special Case
  • 40.24 Property 3: Sum of Two Uniforms
  • 40.25 Related Distributions 1: Uniform Distribution
DRAFT This draft is under development — DO NOT CITE OR SHARE.
  1. Probability Distributions
  2. 40  Triangular Distribution

40  Triangular Distribution

The Triangular distribution requires only three parameters — a minimum, a maximum, and a most-likely value — making it the practical choice when expert knowledge provides only these three bounds. It is widely used in PERT project scheduling, Monte Carlo simulation, and engineering risk assessment.

Formally, the random variate \(X\) defined for the range \(X \in [a, b]\), is said to have a Triangular Distribution (i.e. \(X \sim \text{Triangular}(a, b, c)\)) with minimum \(a\), maximum \(b\), and mode \(c\), where \(a < c < b\).

40.1 Probability Density Function

\[ f(x) = \begin{cases} \dfrac{2(x-a)}{(b-a)(c-a)} & a \leq x \leq c \\[6pt] \dfrac{2(b-x)}{(b-a)(b-c)} & c < x \leq b \end{cases} \]

The figure below shows examples of the Triangular Probability Density Function for different parameter combinations.

Code
dtriangular <- function(x, a, b, c) {
  ifelse(x < a | x > b, 0,
    ifelse(x <= c,
           2 * (x - a) / ((b - a) * (c - a)),
           2 * (b - x) / ((b - a) * (b - c))))
}

par(mfrow = c(2, 2))

x <- seq(0, 10, length = 500)
plot(x, dtriangular(x, 0, 10, 5), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "f(x)", main = "a=0, b=10, c=5 (symmetric)")

plot(x, dtriangular(x, 0, 10, 2), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "f(x)", main = "a=0, b=10, c=2 (left-skewed)")

plot(x, dtriangular(x, 0, 10, 8), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "f(x)", main = "a=0, b=10, c=8 (right-skewed)")

x2 <- seq(2, 10, length = 500)
plot(x2, dtriangular(x2, 2, 10, 4), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "f(x)", main = "a=2, b=10, c=4")

par(mfrow = c(1, 1))
Figure 40.1: Triangular Probability Density Function for various parameter combinations

40.2 Purpose

The Triangular distribution is the most widely used distribution in simulation when only expert-elicited bounds and a most-likely value are available. It requires no knowledge of shape or scale parameters beyond what a domain expert can typically estimate. Common applications include:

  • PERT project scheduling: task duration given optimistic, pessimistic, and most-likely estimates
  • Monte Carlo simulation when only minimum, maximum, and mode are known
  • Engineering design: load, strength, and tolerances with known bounds
  • Financial modeling: revenue and cost estimates from business experts
  • Supply chain: lead times with lower and upper bounds from supplier data

Relation to the discrete setting. The Triangular distribution is the continuous distribution of the sum of two independent Uniform\((0,1)\) variates, restricted to \([0, 2]\) — analogous to how the discrete triangular distribution (sum of two Discrete Uniform variates) arises. In project scheduling, the discrete analog is a finite probability table over integer task durations.

40.3 Distribution Function

\[ F(x) = \begin{cases} \dfrac{(x-a)^2}{(b-a)(c-a)} & a \leq x \leq c \\[6pt] 1 - \dfrac{(b-x)^2}{(b-a)(b-c)} & c < x \leq b \end{cases} \]

The figure below shows the Triangular Distribution Function for \(a = 2\), \(b = 10\), \(c = 4\).

Code
ptriangular <- function(x, a, b, c) {
  ifelse(x <= a, 0,
    ifelse(x <= c,
           (x - a)^2 / ((b - a) * (c - a)),
           1 - (b - x)^2 / ((b - a) * (b - c))))
}

x <- seq(0, 12, length = 500)
plot(x, ptriangular(x, 2, 10, 4), type = "l", lwd = 2, col = "blue",
     xlab = "x", ylab = "F(x)", main = "Triangular Distribution Function",
     sub = "a = 2, b = 10, c = 4")
Figure 40.2: Triangular Distribution Function (a = 2, b = 10, c = 4)

40.4 Moment Generating Function

\[ M_X(t) = \frac{2\bigl[(b-c)e^{at} - (b-a)e^{ct} + (c-a)e^{bt}\bigr]}{(b-a)(c-a)(b-c)\,t^2} \]

40.5 1st Uncentered Moment

\[ \mu_1' = \frac{a + b + c}{3} \]

40.6 2nd Uncentered Moment

\[ \mu_2' = \frac{a^2 + b^2 + c^2 + ab + ac + bc}{6} \]

40.7 3rd Uncentered Moment

Obtained via the MGF.

40.8 4th Uncentered Moment

Obtained via the MGF.

40.9 2nd Centered Moment

\[ \mu_2 = \frac{a^2 + b^2 + c^2 - ab - ac - bc}{18} \]

40.10 3rd Centered Moment

\[ \mu_3 = \frac{\sqrt{2}(a+b-2c)(2a-b-c)(a-2b+c)}{135} \]

40.11 4th Centered Moment

\[ \mu_4 = \frac{12}{5}\mu_2^2 \]

Note: since \(g_2 = 12/5\), we have \(\mu_4 = (12/5)\mu_2^2\).

40.12 Expected Value

\[ \text{E}(X) = \frac{a + b + c}{3} \]

40.13 Variance

\[ \text{V}(X) = \frac{a^2 + b^2 + c^2 - ab - ac - bc}{18} \]

40.14 Median

\[ \text{Med}(X) = \begin{cases} a + \sqrt{(b-a)(c-a)/2} & \text{if } c \geq (a+b)/2 \\[4pt] b - \sqrt{(b-a)(b-c)/2} & \text{if } c < (a+b)/2 \end{cases} \]

40.15 Mode

\[ \text{Mo}(X) = c \]

40.16 Coefficient of Skewness

\[ g_1 = \frac{\sqrt{2}(a+b-2c)(2a-b-c)(a-2b+c)}{5\,(a^2+b^2+c^2-ab-ac-bc)^{3/2}} \]

For the symmetric case \(c = (a+b)/2\): \(g_1 = 0\).

40.17 Coefficient of Kurtosis

\[ g_2 = \frac{12}{5} = 2.4 \]

This is a remarkable fixed constant — the kurtosis is always 2.4, regardless of \(a\), \(b\), and \(c\). The Triangular distribution always has lighter tails than the Normal (\(g_2 = 3\)).

40.18 Parameter Estimation

In practice, parameters are estimated from expert elicitation or sample extremes:

\[ \hat a = x_{(1)}, \quad \hat b = x_{(n)}, \quad \hat c = \text{sample mode estimate} \]

For simulation purposes, the parameters are typically given directly by domain experts rather than estimated from data.

# Example: verify mean and variance for Triangular(2, 10, 4)
a <- 2; b <- 10; c <- 4

mean_tri <- (a + b + c) / 3
var_tri  <- (a^2 + b^2 + c^2 - a*b - a*c - b*c) / 18

cat("Mean:", round(mean_tri, 4), "\n")
cat("Variance:", round(var_tri, 4), "\n")
cat("SD:", round(sqrt(var_tri), 4), "\n")
cat("Kurtosis g2:", 12/5, "(always 2.4)\n")
Mean: 5.3333 
Variance: 2.8889 
SD: 1.6997 
Kurtosis g2: 2.4 (always 2.4)

40.19 R Module

40.19.1 RFC

The Triangular Distribution module is available in RFC under the menu “Distributions / Triangular Distribution”.

40.19.2 Direct app link

  • https://shiny.wessa.net/triangular/

40.19.3 R Code

The following code demonstrates Triangular probability calculations:

a <- 2; b <- 10; c <- 4

ptriangular <- function(x, a, b, c) {
  ifelse(x <= a, 0,
    ifelse(x <= c,
           (x - a)^2 / ((b - a) * (c - a)),
           1 - (b - x)^2 / ((b - a) * (b - c))))
}

# P(task <= 5 days)
ptriangular(5, a, b, c)

# P(task <= mean)
ptriangular((a + b + c)/3, a, b, c)

# Mean
cat("Mean:", (a + b + c) / 3, "\n")
cat("Mode:", c, "\n")
[1] 0.4791667
[1] 0.5462963
Mean: 5.333333 
Mode: 4 

40.20 Example

A project task has a minimum duration of \(a = 2\) days, maximum \(b = 10\) days, and most-likely duration \(c = 4\) days: \(X \sim \text{Triangular}(2, 10, 4)\). The expected duration is \((2+10+4)/3 \approx 5.33\) days.

a <- 2; b <- 10; c <- 4

ptriangular <- function(x, a, b, c) {
  ifelse(x <= a, 0,
    ifelse(x <= c,
           (x - a)^2 / ((b - a) * (c - a)),
           1 - (b - x)^2 / ((b - a) * (b - c))))
}

# Expected duration
cat("Expected duration (days):", (a + b + c) / 3, "\n")

# P(task done within 5 days)
cat("P(done within 5 days):", round(ptriangular(5, a, b, c), 4), "\n")

# P(task takes more than 8 days)
cat("P(takes > 8 days):", round(1 - ptriangular(8, a, b, c), 4), "\n")
Expected duration (days): 5.333333 
P(done within 5 days): 0.4792 
P(takes > 8 days): 0.0833 
Interactive Shiny app (click to load).
Open in new tab

40.21 Random Number Generator

Triangular random variates are generated via the inverse-CDF method. Let \(p_c = (c-a)/(b-a)\):

\[ X = \begin{cases} a + \sqrt{U(b-a)(c-a)} & U \leq p_c \\[4pt] b - \sqrt{(1-U)(b-a)(b-c)} & U > p_c \end{cases} \]

set.seed(123)
n <- 10000; a <- 2; b <- 10; c <- 4

pc <- (c - a) / (b - a)
u  <- runif(n)
x_sim <- ifelse(u <= pc,
                a + sqrt(u * (b - a) * (c - a)),
                b - sqrt((1 - u) * (b - a) * (b - c)))

cat("Simulated mean:", round(mean(x_sim), 4), "\n")
cat("Theoretical mean:", (a + b + c) / 3, "\n")
cat("Simulated var:", round(var(x_sim), 4), "\n")
cat("Theoretical var:",
    (a^2 + b^2 + c^2 - a*b - a*c - b*c) / 18, "\n")
Simulated mean: 5.3143 
Theoretical mean: 5.333333 
Simulated var: 2.8332 
Theoretical var: 2.888889 
Interactive Shiny app (click to load).
Open in new tab

40.22 Property 1: Fixed Kurtosis

The kurtosis \(g_2 = 12/5 = 2.4\) is always fixed, regardless of \(a\), \(b\), and \(c\). This means the Triangular distribution is always platykurtic (lighter-tailed than the Normal), which follows from the bounded support.

40.23 Property 2: Symmetric Special Case

When \(c = (a+b)/2\) the distribution is symmetric (\(g_1 = 0\)) and resembles a tent function. The Uniform distribution is not the limit of this case — the symmetric Triangular distribution retains its triangular density.

40.24 Property 3: Sum of Two Uniforms

The Triangular\((0, 2, 1)\) distribution is the distribution of the sum of two independent Uniform\((0,1)\) random variables. More generally, Triangular\((a, b, (a+b)/2)\) arises as a scaled and shifted sum of two Uniforms.

40.25 Related Distributions 1: Uniform Distribution

The Uniform distribution on \([a, b]\) is the limiting case when all three parameters \(a, c, b\) provide equal weight (flat density, \(c\) varies), and when \(a=b=c\) would be degenerate. The Triangular is a first-order improvement over the Uniform when expert knowledge about the most-likely value is available (see Chapter 19).

39  Cauchy Distribution
41  Power Distribution

© 2026 Patrick Wessa. Provided as-is, without warranty.

Feedback: e-mail | Anonymous contributions: click to copy (Sats) | click to copy (XMR)

Cookie Preferences