Random Variables and Probability DistributionsIntroduction and contextProbability models translate uncertain observations into quantities that can be analysed, compared and used for decisions. In Total Quality Management (TQM), uncertainty appears in the number of defects on a production lot, the lifetime of a component, the waiting time for a service request, the amount of material consumed, and the variation in a critical process measurement. A random variable provides the bridge between these real-world outcomes and mathematical distributions. This chapter develops the theory and use of discrete and continuous random variables, distribution functions, moments, and major probability distributions. Particular attention is given to quality-control applications: defect counts, nonconformities, demand, process variation and reliability. The emphasis is not merely on calculating probabilities, but on selecting an appropriate model, checking its assumptions and interpreting its implications for managerial action. Learning objectivesBy the end of this chapter, the reader should be able to: - Define random variables and distinguish discrete from continuous variables.
- Construct and interpret probability mass functions, probability density functions and cumulative distribution functions.
- Calculate expectations, variances, covariances and selected higher moments.
- Use binomial, Poisson, geometric, negative binomial, uniform, exponential and normal distributions appropriately.
- Explain transformations of random variables and the role of standardisation.
- Select and critique probability models for quality, reliability and demand applications.
- Recognise modelling risk, data-quality issues and ethical implications of probabilistic decisions.
1. Random variables: from outcomes to measurementsLet Ω denote the sample space of all possible outcomes of a random experiment. A random variable X is a function that assigns a real number to each outcome in Ω. The word “random” describes the uncertainty in the value before observation; after observation, X has a realised value x. Examples include: - X = number of defective units in a sample of 100;
- X = lifetime, in hours, of a pump;
- X = diameter of a machined shaft, in millimetres;
- X = number of customer complaints received in one day.
A random variable is not itself a probability. It is a numerical representation of uncertain outcomes. Probabilities are assigned to events such as X = 3, X ≤ 10 or 5 < X < 8. Discrete and continuous random variablesA discrete random variable has a finite or countably infinite set of possible values. Defect counts, numbers of returns and numbers of failures are discrete. Its probability mass function (pmf) is pX(x) = P(X = x) The pmf must satisfy pX(x) ≥ 0, ∑x pX(x) = 1 where the summation covers every possible value of X. For any set A of possible values, P(X ∈ A) = ∑x ∈ A pX(x) A continuous random variable can take values throughout an interval or collection of intervals. Measurements such as length, temperature and lifetime are commonly modelled as continuous. Its probability density function (pdf) f_X(x) satisfies fX(x) ≥ 0, ∫−∞∞ fX(x) dx = 1 Probabilities are areas under the density: P(a ≤ X ≤ b) = ∫ab fX(x) dx For a continuous variable, P(X = x) = 0 for every individual x. This does not mean that x is impossible; it means that a single point has zero length and therefore zero area under a density. 2. Distribution functionsThe cumulative distribution function (cdf) of any random variable X is FX(x) = P(X ≤ x) A cdf is non-decreasing, satisfies 0 ≤ FX(x) ≤ 1, and has limits limx→−∞ FX(x) = 0, limx→∞ FX(x) = 1 For any a < b, P(a < X ≤ b) = FX(b) − FX(a) This relationship applies to both discrete and continuous variables. For a discrete variable, the cdf is a step function. For a continuous variable with a differentiable cdf, fX(x) = dFX(x)/dx The distinction between a density and a probability is essential. A density may exceed 1 when its units are sufficiently small; only its integral over an interval is a probability. Quantiles and percentilesThe p-quantile q_p is commonly defined as a value satisfying FX(qp) ≥ p with suitable conventions for discrete distributions. In continuous distributions, it usually satisfies FX(qp) = p. Quantiles are useful in quality planning: the 0.99 quantile of delivery time is a service-level threshold that only 1% of deliveries are expected to exceed under the model. 3. Expectation, moments and variabilityThe expectation, or mean, summarises the long-run average value. For a discrete variable, E[X] = ∑x x pX(x) For a continuous variable, E[X] = ∫−∞∞ x fX(x) dx These expressions exist when the relevant sum or integral is finite. More generally, for a function g(X), E[g(X)] = ∑x g(x)pX(x) (discrete) or E[g(X)] = ∫−∞∞ g(x)fX(x) dx (continuous) The rth raw moment is E[Xr]. The rth central moment is E[(X−μ)r], where μ = E[X]. The variance is the second central moment: Var(X) = E[(X − μ)2] = E[X2] − μ2 The standard deviation is σ = √Var(X). Variance has squared units, while standard deviation has the same units as X. This distinction matters: if X is measured in millimetres, Var(X) is in square millimetres and σ is in millimetres. For constants a and b, E[aX + b] = aE[X] + b and Var(aX + b) = a2 Var(X) Adding a constant changes location but not spread; multiplying by a changes spread by |a|. For random variables X and Y, covariance is Cov(X,Y) = E[(X−μX)(Y−μY)] = E[XY] − E[X]E[Y] The correlation coefficient is ρXY = Cov(X,Y)/(σX σY) provided both standard deviations are positive. Correlation is dimensionless and lies between −1 and 1. Zero covariance implies uncorrelatedness, but not generally independence. If X and Y are independent and their expectations exist, then E[XY] = E[X]E[Y] and covariance is zero. For a sum, Var(X + Y) = Var(X) + Var(Y) + 2Cov(X,Y) If X and Y are independent, the covariance term is zero. Assuming independence when production measurements are serially correlated can substantially understate uncertainty. Worked example 1: defect-count momentsSuppose the number X of surface defects on a randomly selected panel has the following pmf: | x | 0 | 1 | 2 | 3 |
|---|
| P(X = x) | 0.50 | 0.30 | 0.15 | 0.05 |
The probabilities sum to 1. The mean is E[X] = 0(0.50) + 1(0.30) + 2(0.15) + 3(0.05) = 0.75 defects Also, E[X2] = 02(0.50) + 12(0.30) + 22(0.15) + 32(0.05) = 1.50 Therefore, Var(X) = 1.50 − (0.75)2 = 0.9375 defects2 and σ ≈ 0.968 defects. The probability of at least two defects is P(X ≥ 2) = 0.15 + 0.05 = 0.20. A quality manager might use this probability to assess whether additional inspection or process intervention is justified. 4. Important discrete distributionsBernoulli distributionA Bernoulli variable records one trial with two outcomes, conventionally success and failure. If the probability of success is p, then X has a Bernoulli distribution when P(X = 1) = p, P(X = 0) = 1 − p where 0 ≤ p ≤ 1. Its mean and variance are E[X] = p, Var(X) = p(1−p) In quality work, “success” may mean that a unit is nonconforming, provided the definition is stated clearly. Binomial distributionIf n trials are independent, each has the same success probability p, and each trial has only two outcomes, the number X of successes has a binomial distribution: P(X = x) = C(n,x)px(1−p)n−x, x = 0,1,…,n where C(n,x) = n!/[x!(n−x)!]. The assumptions are fixed n, identical p, independence and binary classification. The moments are E[X] = np, Var(X) = np(1−p) Example: if the nonconformance probability is 0.02 and 20 independent units are inspected, the probability of no nonconforming units is P(X=0) = (0.98)20 ≈ 0.6676. The expected number is 20(0.02) = 0.4. Sampling without replacement from a small finite lot violates exact independence; a hypergeometric model may then be preferable. Poisson distributionThe Poisson distribution models a count of events in a fixed interval of time, area, length or volume when events occur singly, at a constant average rate and independently. If λ is the expected count in the specified exposure, then P(X=x) = e−λ λx/x!, x = 0,1,2,… and E[X] = Var(X) = λ The equality of mean and variance is a diagnostic implication, not a universal fact about counts. If observed variation substantially exceeds the mean, overdispersion may indicate clustering, changing rates or unobserved heterogeneity. The Poisson distribution is also an approximation to a binomial distribution when n is large, p is small and λ = np is moderate. For example, the number of scratches per square metre may be modelled as Poisson if scratches are approximately independent and spatially homogeneous. Geometric and negative binomial distributionsLet X be the trial number on which the first success occurs, with independent trials and success probability p. Then P(X=x) = (1−p)x−1p, x = 1,2,… and E[X] = 1/p, Var(X) = (1−p)/p2 This geometric model has the memoryless property: the remaining number of trials until success does not depend on how many failures have already occurred. A negative binomial variable can represent the number of trials required to obtain r successes. Under the same independence and constant-p assumptions, P(X=x) = C(x−1,r−1)pr(1−p)x−r, x = r,r+1,… with E[X] = r/p and Var(X) = r(1−p)/p2. Alternative parameterisations count failures rather than trials; analysts must state the convention. 5. Important continuous distributionsUniform distributionIf every value in [a,b] is equally plausible, X has a uniform distribution: fX(x) = 1/(b−a), a ≤ x ≤ b and zero otherwise. Its moments are E[X] = (a+b)/2, Var(X) = (b−a)2/12 Uniformity is often useful for representing ignorance over a bounded interval, but it should not be used merely because minimum and maximum values are known. Exponential distributionThe exponential distribution models a nonnegative waiting time or lifetime with constant hazard rate λ > 0: fX(x) = λe−λx, x ≥ 0 Its cdf, mean and variance are FX(x) = 1−e−λx, E[X] = 1/λ, Var(X) = 1/λ2 The survival function is S(x) = P(X>x) = e−λx. The constant hazard assumption implies memorylessness: P(X>s+t | X>s) = P(X>t) = e−λt This may be suitable for random failures in a stable operating period, but not for components that wear out or improve during early life. Normal distributionA normal variable with mean μ and variance σ² has density fX(x) = [1/(σ√(2π))] exp{−(x−μ)2/(2σ2)}, −∞ < x < ∞ where σ > 0. The parameters μ and σ are respectively the mean and standard deviation. The normal model is important because additive effects often produce approximately bell-shaped measurements and because sums of many small, weakly dependent effects may be approximately normal under the central limit theorem. Standardisation converts X to a standard normal variable Z: Z = (X−μ)/σ, Z ~ N(0,1) Consequently, P(X ≤ x) = Φ((x−μ)/σ) where Φ is the standard normal cdf. Approximately 68%, 95% and 99.7% of a normal population lie within one, two and three standard deviations of μ, respectively. These are useful approximations, not exact rules for every process. Worked example 2: a process measurementA shaft diameter X is approximately normal with μ = 50.00 mm and σ = 0.04 mm. The probability that a shaft is below 50.06 mm is P(X < 50.06) = Φ((50.06−50.00)/0.04) = Φ(1.5) ≈ 0.9332 Thus about 93.32% are expected below the upper value under the model. If the specification is 49.90 to 50.10 mm, the probability of conformance is P(49.90 ≤ X ≤ 50.10) = Φ(2.5) − Φ(−2.5) ≈ 0.9876 This is a population probability, not a guarantee for every future sample. It also depends on process stability and the validity of the normal approximation. 6. Transformations and mixturesIf Y = g(X), the distribution of Y can often be obtained from the distribution of X. For a strictly increasing differentiable transformation, fY(y) = fX(g−1(y)) |d g−1(y)/dy| For a decreasing transformation, the absolute derivative still ensures a nonnegative density. The Jacobian factor is necessary because intervals are stretched or compressed by the transformation. For a linear transformation Y = aX + b, the mean and variance are E[Y] = aμX + b, Var(Y) = a2σX2 A mixture distribution arises when observations come from different subpopulations. If process state J is selected with probabilities w_j and X conditional on J=j has density f_j(x), then fX(x) = ∑j wj fj(x), ∑j wj = 1 Mixtures are important in TQM because data pooled across machines, shifts, suppliers or product grades may appear more variable than each subgroup. Aggregation can conceal special causes and lead to incorrect capability conclusions. 7. Model selection in quality and operationsA defensible model-selection process includes the following steps: - Define the unit of observation and the exposure: one unit, one batch, one hour or one square metre.
- Identify the measurement type: binary, count, continuous measurement, waiting time or lifetime.
- Specify the estimand and decision: defect probability, upper percentile, expected demand or reliability at time t.
- Check assumptions using process knowledge, plots and diagnostic statistics.
- Estimate parameters from appropriate data, while distinguishing estimation uncertainty from process variation.
- Validate predictions on new or temporally later observations.
- Analyse sensitivity to alternative distributions and dependence structures.
A distribution should not be selected solely because it gives a convenient calculation. For example, Poisson modelling of defects requires attention to the exposure and to overdispersion; normal modelling of a lifetime can assign positive probability to negative times and is therefore generally inappropriate without a compelling approximation argument. 8. Reliability and lifetime interpretationFor a nonnegative lifetime T, the reliability or survival function is R(t) = P(T>t) = 1−FT(t) When a density f(t) exists and R(t)>0, the hazard rate is h(t) = f(t)/R(t) It represents the instantaneous failure rate conditional on survival to t, subject to the usual limiting interpretation. The exponential model has constant hazard. A Weibull model is often more flexible: F(t) = 1−exp[−(t/η)^β], t ≥ 0 where η > 0 is a scale parameter and β > 0 is a shape parameter. Its hazard is h(t) = (β/η)(t/η)β−1 Thus β < 1 indicates decreasing hazard, β = 1 gives exponential constant hazard, and β > 1 indicates increasing hazard. Censored observations—units that have not failed by the end of study—must be incorporated rather than discarded, because discarding them biases lifetime analysis. 9. Applied case: defects in a coating processBackgroundThe following is an illustrative case. A manufacturer applies a protective coating to metal panels. Inspectors record the number of pinholes per panel and the panel area is approximately constant. Management wants to estimate inspection workload and determine whether a Poisson model is credible. ProblemDuring 200 panels, the mean number of pinholes is 1.8 per panel and the sample variance is 4.7. A simple Poisson model would use λ = 1.8 and imply that the variance is also 1.8. AnalysisThe observed variance is much larger than the mean. This overdispersion suggests that panels may differ in coating conditions, that pinholes cluster, or that the rate changes by operator, humidity or batch. If a Poisson model were nevertheless used, the probability of no pinholes would be P(X=0) = e−1.8 ≈ 0.1653 However, this value may be misleading if the population is a mixture of low- and high-defect panels. The quality team stratifies the data by production shift and finds means of 0.9 and 3.1, with distinct environmental conditions. Within each shift, the variances are closer to the means. Approach and solutionThe team records humidity and coating viscosity, establishes control limits for these process variables, and reports defect rates by shift rather than only as a pooled average. A Poisson model is retained for preliminary workload planning within stable strata, while a negative binomial or hierarchical model is considered if residual overdispersion remains. A capability or improvement decision is based on the process mechanism, not on a mechanically fitted distribution. Outcome and learning pointsThe principal outcome is better diagnosis: a single pooled distribution had obscured process stratification. The case demonstrates that the mean alone does not validate a count model, exposure and homogeneity matter, and model checking can reveal actionable special causes. It also illustrates a governance principle: probabilistic outputs used to release or reject product should be traceable to data, assumptions and documented validation. 10. Technology, governance and contemporary practiceStatistical software can evaluate cdfs, fit distributions, simulate outcomes and compare predictive performance. Machine-learning systems can detect complex patterns, but they do not remove the need to define the random variable, preserve measurement integrity or explain assumptions. Automated anomaly detection may confuse a rare but acceptable event with a defect if labels are incomplete. For responsible use, organisations should maintain data provenance, version-controlled analysis, access controls and audit trails. Models affecting supplier qualification, employee evaluation or product release require documented validation and human oversight. Privacy is relevant when quality data can be linked to operators or customers. Fairness concerns arise if inspection intensity differs systematically across suppliers or facilities, creating unequal probabilities of being classified as defective. Uncertainty intervals and sensitivity analyses should accompany point predictions, especially when data are sparse or conditions are changing. Challenges and limitationsProbability distributions are abstractions. Common limitations include: - non-stationary processes whose parameters change over time;
- dependence between observations, such as serial correlation or common-cause batches;
- measurement error and rounding, which can make a continuous variable appear discrete;
- censoring, truncation and missing-not-at-random observations;
- selection bias from inspecting only suspect units;
- mixtures of heterogeneous populations;
- parameter uncertainty ignored in plug-in probabilities;
- extrapolation beyond the range of observed data.
A fitted distribution can describe historical data while failing under a process change. TQM therefore requires integration of probability modelling with process knowledge, control charts, designed experiments and continual verification. Best-practice checklist- Define the random variable and its measurement unit explicitly.
- State whether observations are independent and whether the rate or distribution is stable.
- Match the support of the distribution to the physical variable.
- Check both location and dispersion; for counts, compare mean and variance.
- Use plots, stratification and subject-matter knowledge alongside formal tests.
- Report assumptions, parameter uncertainty and the decision consequence.
- Validate models prospectively and revise them when the process changes.
- Treat software output as evidence requiring interpretation, not as an automatic conclusion.
Chapter SummaryA random variable maps uncertain outcomes to numerical values. Discrete variables are described by probability mass functions, whereas continuous variables are described by densities; both are unified by the cumulative distribution function. Expectation, variance, covariance and correlation quantify location, dispersion and dependence, while transformations permit analysis on alternative scales. The Bernoulli and binomial distributions describe binary outcomes and fixed-sample counts; the Poisson distribution describes counts over an exposure under a constant-rate independence assumption; geometric and negative binomial models describe repeated trials. Uniform, exponential and normal distributions provide important continuous models, and the Weibull distribution offers flexible lifetime analysis. Correct application requires attention to support, units, independence, stationarity, censoring and heterogeneity. In TQM, distributions support decisions about defects, demand, process measurements and reliability, but model validation and governance are as important as calculation. Key TermsRandom variable: A function assigning a numerical value to each outcome of a random experiment. Sample space: The set of all possible outcomes of an experiment. Discrete random variable: A random variable with finite or countably infinite possible values. Continuous random variable: A random variable capable of taking values over intervals. Probability mass function: The function assigning probabilities to values of a discrete variable. Probability density function: A nonnegative function whose area over an interval is a probability. Cumulative distribution function: FX(x)=P(X≤x), the probability that X does not exceed x. Expectation: The probability-weighted long-run average of a random variable. Variance: The expected squared deviation from the mean. Standard deviation: The square root of variance, expressed in the units of the variable. Covariance: A measure of joint directional variation between two variables. Correlation: Standardised covariance, bounded between −1 and 1. Bernoulli distribution: A distribution for one binary trial. Binomial distribution: The distribution of successes in a fixed number of independent Bernoulli trials. Poisson distribution: A count distribution for events occurring at a constant average rate over an exposure. Exponential distribution: A continuous waiting-time model with constant hazard. Normal distribution: A symmetric continuous distribution determined by its mean and standard deviation. Reliability function: The probability that a lifetime exceeds a specified time. Hazard rate: The conditional instantaneous failure rate among units surviving to a given time. Overdispersion: Variability greater than that implied by a chosen model, especially when a count variance exceeds its mean. Review QuestionsShort Answer Questions- What distinguishes a probability density from a probability mass function?
- Why does a continuous random variable have zero probability at any single exact value?
- State the mean and variance of a binomial random variable.
- What does the parameter λ represent in a Poisson model?
- Explain the difference between uncorrelatedness and independence.
Long Answer Questions- Explain how the cdf unifies the analysis of discrete and continuous random variables, including its principal properties.
- Derive the mean and variance of a Bernoulli random variable and explain their quality-management interpretation.
- Compare the binomial and Poisson distributions, including assumptions, parameters and an appropriate quality application for each.
- Explain the exponential and Weibull lifetime models and discuss when the exponential assumption may be inadequate.
- Discuss why model validation, stratification and governance are necessary when probability distributions are used for product-release decisions.
Analytical / Application Questions- A process produces 50 independent units with nonconformance probability 0.03. Model the number of nonconforming units and calculate the probability of exactly two.
- A service centre records an average of 4 complaints per day. Under a Poisson model, calculate the probability of no complaints on a day and discuss two reasons the model might fail.
- A lifetime variable is modelled as Weibull with β = 2 and η = 1,000 hours. Explain whether the hazard is increasing or decreasing and interpret the reliability at 1,000 hours without relying on a numerical software output.
Multiple Choice Questions with AnswersQuestion 1Which statement correctly defines the cumulative distribution function of X? A. P(X = x) B. P(X ≤ x) C. P(X > x) D. E[X] Correct Answer: B. P(X ≤ x) Question 2A discrete random variable has probabilities 0.2, 0.5 and 0.3 for its three possible values. What must be true? A. Its variance must equal 1 B. Its mean must equal 1 C. The probabilities sum to 1 D. Each probability must be equal Correct Answer: C. The probabilities sum to 1 Question 3If X has mean μ and variance σ², what is Var(3X + 5)? A. 3σ² B. 9σ² C. σ² + 5 D. 9σ² + 5 Correct Answer: B. 9σ² Question 4Which distribution is most directly associated with the number of successes in n independent trials with constant success probability p? A. Binomial B. Exponential C. Uniform D. Normal Correct Answer: A. Binomial Question 5For a Poisson random variable with λ = 2, what are its mean and variance? A. Mean 2 and variance 1 B. Mean 1 and variance 2 C. Mean 2 and variance 2 D. Mean 4 and variance 2 Correct Answer: C. Mean 2 and variance 2 Question 6A continuous variable X has density f. How is P(a ≤ X ≤ b) obtained? A. f(a) + f(b) B. ∫_a^b f(x) dx C. f(b) − f(a) without integration D. E[X] − a Correct Answer: B. ∫_a^b f(x) dx Question 7If X is exponential with rate λ, which property does the model possess? A. A decreasing hazard for all λ B. A constant hazard rate C. A bounded upper support D. A symmetric density about λ Correct Answer: B. A constant hazard rate Question 8A normal measurement has mean 50 and standard deviation 2. What is the standardised value of x = 54? A. −2 B. 0.5 C. 2 D. 27 Correct Answer: C. 2 Question 9A count process has sample mean 3 and sample variance 12. Relative to a basic Poisson model, this suggests: A. Underdispersion B. Overdispersion C. A continuous variable D. A zero variance process Correct Answer: B. Overdispersion Question 10For a Weibull lifetime model, what does β > 1 indicate? A. Increasing hazard with time B. Constant hazard with time C. Decreasing hazard with time D. Negative lifetimes Correct Answer: A. Increasing hazard with time
|