Engineering Probability: Random Variables and Probability Distributions

Course Information and Core Topics

  • Required course materials for IE3301 Engineering Probability Chapter 3 (Department of Industrial, Manufacturing & Systems Engineering at The University of Texas at Arlington):
    • Hard copy of the Chapter 3 lecture notes
    • Hard copy of the Chapter 3 Handout
  • Core topics covered in Chapter 3:
    • Random Variables
    • Probability Distributions
    • Joint Probability Distributions

Chapter 3 main topics overview

Random Variables Definition and Classification

  • Definition of a Random Variable: A random variable XX is a function or mapping that assigns a real number to each simple event in a sample space SS.

Mapping from sample space S to real numbers

  • Discrete Random Variable:
    • Definition: A random variable that takes on only a finite or countable set of distinct values.
    • Examples of discrete random variables:
    • Flipping two coins where XX is the number of heads:
      • Outcome HH→X=2HH \rightarrow X = 2
      • Outcome HT→X=1HT \rightarrow X = 1
      • Outcome TH→X=1TH \rightarrow X = 1
      • Outcome TT→X=0TT \rightarrow X = 0
    • Rolling a standard six-sided die: X∈{1,2,3,4,5,6}X \in \{1, 2, 3, 4, 5, 6\}
    • Color classifications mapped to discrete numerical codes
    • Number of people waiting in line at a post office: X∈{0,1,2,3,… }X \in \{0, 1, 2, 3, \dots\}
  • Continuous Random Variable:
    • Definition: A random variable that takes on any value within a continuous range or interval, representing an uncountable set of infinitely many values.
    • Examples of continuous random variables:
    • X=the lifetime (in hours) of a light bulbX = \text{the lifetime (in hours) of a light bulb}
    • X=the weight of the next package taken to the post officeX = \text{the weight of the next package taken to the post office}
    • X=the length of time required to play 18 holes of golfX = \text{the length of time required to play 18 holes of golf}
    • X=the annual income of Texas residentsX = \text{the annual income of Texas residents}

Event Representation Using Random Variables

  • Discrete Events Notation:
    • Flipping two coins (X=number of headsX = \text{number of heads}):
    • Event of getting exactly one head: [X=1][X = 1]
    • Event of getting no more than one head: [X≤1][X \le 1]
    • Post office line (X=number of people in lineX = \text{number of people in line}):
    • Event of having at least 3 and fewer than 10 people in line: [3≤X<10][3 \le X < 10]
    • Event of having more than 3 and at most 10 people in line: [3<X≤10][3 < X \le 10]
  • Continuous Events Notation:
    • Light bulb lifetime (X=lifetime in hoursX = \text{lifetime in hours}):
    • Event that the bulb lasts more than 50 hours: [X>50][X > 50]
    • Event that the bulb never turns on: [X=0][X = 0]

Probability Distributions for Single Random Variables

  • Definition: A probability distribution defines the assignment of probabilities to the possible values that a random variable XX can assume.

Discrete vs continuous probability distributions

Probability Mass Function (p.m.f.)

  • Definition: For a discrete random variable XX, the probability mass function fX(x)f_X(x) maps each possible value xx from a finite or countable set to a probability on the interval [0,1][0, 1].
  • Formula: fX(x)=P[X=x]f_X(x) = P[X = x]
  • PMF values represent exact probabilities.
  • Fundamental properties of a valid p.m.f.:
    1. 0≤fX(x)≤10 \le f_X(x) \le 1 for all xx
    2. ∑xfX(x)=1\sum_{x} f_X(x) = 1
  • Example — Flipping Two Fair Coins:
    • Sample space: S={HH,HT,TH,TT}S = \{HH, HT, TH, TT\}
    • Let X=number of headsX = \text{number of heads}
    • fX(0)=P[X=0]=P(TT)=14=0.25f_X(0) = P[X = 0] = P(TT) = \frac{1}{4} = 0.25
    • fX(1)=P[X=1]=P(HT or TH)=24=0.50f_X(1) = P[X = 1] = P(HT \text{ or } TH) = \frac{2}{4} = 0.50
    • fX(2)=P[X=2]=P(HH)=14=0.25f_X(2) = P[X = 2] = P(HH) = \frac{1}{4} = 0.25
    • Verification: 0<fX(x)<10 < f_X(x) < 1 for x∈{0,1,2}x \in \{0, 1, 2\}; otherwise fX(x)=0f_X(x) = 0.
    • Summation check: ∑xfX(x)=fX(0)+fX(1)+fX(2)=0.25+0.50+0.25=1.0\sum_{x} f_X(x) = f_X(0) + f_X(1) + f_X(2) = 0.25 + 0.50 + 0.25 = 1.0

Probability Density Function (p.d.f.)

  • Definition: For a continuous random variable XX, the probability density function fX(x)f_X(x) describes the distribution of values over a continuous range.
  • Critical distinction: Individual p.d.f. values fX(x)f_X(x) are not probabilities.
  • Probability calculation: Probabilities are determined by calculating the definite integral (area under the fX(x)f_X(x) curve) between two bounds aa and bb:   P[a<X<b]=∫abfX(x) dxP[a < X < b] = \int_{a}^{b} f_X(x)\,dx

Area under continuous PDF curve between a and b

  • Fundamental properties of a valid p.d.f.:
    1. fX(x)≥0f_X(x) \ge 0 for all xx
    2. ∫−∞∞fX(x) dx=1\int_{-\infty}^{\infty} f_X(x)\,dx = 1
  • Single Point Probability Property: The probability that a continuous random variable takes on any exact single value aa is always zero:   P[X=a]=∫aafX(x) dx=0P[X = a] = \int_{a}^{a} f_X(x)\,dx = 0
  • Boundary Invariance: Because P[X=a]=0P[X = a] = 0, inclusion or exclusion of endpoints does not change the probability:   P[a≤X≤b]=P[a<X≤b]=P[a≤X<b]=P[a<X<b]P[a \le X \le b] = P[a < X \le b] = P[a \le X < b] = P[a < X < b]
  • Example — Lifetime of a Radio Tube:
    • Let X=lifetime (in hours) of a radio tubeX = \text{lifetime (in hours) of a radio tube}.
    • Probability density function:     fX(x)={100x2for x>1000otherwisef_X(x) = \begin{cases} \frac{100}{x^2} & \text{for } x > 100 \\ 0 & \text{otherwise} \end{cases}

Probability density function for radio tube lifetime

  • Calculation of P[X<150]P[X < 150]:     P[X<150]=∫100150100x2 dx=[−100x]100150=−100150−(−100100)=−23+1=13≈0.3333P[X < 150] = \int_{100}^{150} \frac{100}{x^2}\,dx = \left[ -\frac{100}{x} \right]_{100}^{150} = -\frac{100}{150} - \left( -\frac{100}{100} \right) = -\frac{2}{3} + 1 = \frac{1}{3} \approx 0.3333

Cumulative Distribution Function (c.d.f.)

  • Definition: The cumulative distribution function FX(x)F_X(x) measures the probability that the random variable XX takes on a value less than or equal to xx:   FX(x)=P[X≤x]for −∞<x<∞F_X(x) = P[X \le x] \quad \text{for } -\infty < x < \infty
  • Mathematical formulations:
    • For a discrete random variable XX:     FX(x)=∑t≤xfX(t)F_X(x) = \sum_{t \le x} f_X(t)
    • For a continuous random variable XX:     FX(x)=∫−∞xfX(t) dtF_X(x) = \int_{-\infty}^{x} f_X(t)\,dt
  • CDF values are always actual probabilities.
  • Fundamental properties of a c.d.f.:
    1. 0≤FX(x)≤10 \le F_X(x) \le 1 for all xx
    2. Monotonically non-decreasing: If x≤yx \le y, then FX(x)≤FX(y)F_X(x) \le F_X(y)
    3. Right-continuous step function for discrete RVs; continuous smooth curve for continuous RVs
    4. Asymptotic limits: lim⁡x→−∞FX(x)=0\lim_{x \to -\infty} F_X(x) = 0 and lim⁡x→∞FX(x)=1\lim_{x \to \infty} F_X(x) = 1

Cumulative distribution function shapes for discrete and continuous random variables

CDF Examples and Derivations

  • Discrete Example 1 — Coin Flip Experiment:
    • X=number of heads in 2 coin flipsX = \text{number of heads in 2 coin flips}
    • FX(x)={0for x<00.25for 0≤x<10.75for 1≤x<21.00for x≥2F_X(x) = \begin{cases} 0 & \text{for } x < 0 \\ 0.25 & \text{for } 0 \le x < 1 \\ 0.75 & \text{for } 1 \le x < 2 \\ 1.00 & \text{for } x \ge 2 \end{cases}
  • Discrete Example 2 — Machine Repair Cost:
    • Let X=repair cost associated with a failureX = \text{repair cost associated with a failure}
    • Given probabilities: P[X=50]=0.3P[X = 50] = 0.3, P[X=200]=0.2P[X = 200] = 0.2, P[X=350]=0.5P[X = 350] = 0.5
    • Cumulative distribution function piecewise definition:     FX(x)={0for x<500.3for 50≤x<2000.5for 200≤x<3501.0for x≥350F_X(x) = \begin{cases} 0 & \text{for } x < 50 \\ 0.3 & \text{for } 50 \le x < 200 \\ 0.5 & \text{for } 200 \le x < 350 \\ 1.0 & \text{for } x \ge 350 \end{cases}

CDF step graph for machine repair cost

  • Continuous Example — Radio Tube Lifetime:
    • Probability density function fX(x)=100x2f_X(x) = \frac{100}{x^2} for x>100x > 100; 00 otherwise.
    • Derivation of FX(x)F_X(x) for x>100x > 100:     FX(x)=∫100x100t2 dt=[−100t]100x=−100x−(−100100)=1−100xF_X(x) = \int_{100}^{x} \frac{100}{t^2}\,dt = \left[ -\frac{100}{t} \right]_{100}^{x} = -\frac{100}{x} - \left( -\frac{100}{100} \right) = 1 - \frac{100}{x}
    • Complete piecewise c.d.f. expression:     FX(x)={0for x≤1001−100xfor x>100F_X(x) = \begin{cases} 0 & \text{for } x \le 100 \\ 1 - \frac{100}{x} & \text{for } x > 100 \end{cases}

Joint Probability Distributions

  • Bivariate distributions involve two random variables, XX and YY, simultaneously.
  • The joint distribution function is denoted by fX,Y(x,y)f_{X,Y}(x,y).

Joint Probability Mass Function (Discrete Case)

  • Definition: fX,Y(x,y)=P[X=x,Y=y]f_{X,Y}(x,y) = P[X = x, Y = y]
  • Properties:
    1. 0≤fX,Y(x,y)≤10 \le f_{X,Y}(x,y) \le 1 for all (x,y)(x,y)
    2. ∑x∑yfX,Y(x,y)=1\sum_{x} \sum_{y} f_{X,Y}(x,y) = 1

Joint Probability Density Function (Continuous Case)

  • Properties:
    1. fX,Y(x,y)≥0f_{X,Y}(x,y) \ge 0 for all (x,y)(x,y)
    2. ∫−∞∞∫−∞∞fX,Y(x,y) dx dy=1\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} f_{X,Y}(x,y)\,dx\,dy = 1
    3. Probability over a two-dimensional region AA:      P[(X,Y)∈A]=∬AfX,Y(x,y) dx dyP[(X,Y) \in A] = \iint_{A} f_{X,Y}(x,y)\,dx\,dy

Marginal Probability Distributions

  • Marginal distributions isolate the probability distribution of a single random variable from a joint distribution by summing or integrating out the other variable.
  • Formulations for Discrete Random Variables:
    • Marginal PMF of XX: fX(x)=∑yfX,Y(x,y)f_X(x) = \sum_{y} f_{X,Y}(x,y)
    • Marginal PMF of YY: fY(y)=∑xfX,Y(x,y)f_Y(y) = \sum_{x} f_{X,Y}(x,y)
  • Formulations for Continuous Random Variables:
    • Marginal PDF of XX: fX(x)=∫−∞∞fX,Y(x,y) dyf_X(x) = \int_{-\infty}^{\infty} f_{X,Y}(x,y)\,dy
    • Marginal PDF of YY: fY(y)=∫−∞∞fX,Y(x,y) dxf_Y(y) = \int_{-\infty}^{\infty} f_{X,Y}(x,y)\,dx

Discrete Marginal Distribution Example

  • Joint probability mass distribution table for X∈{0,1,2}X \in \{0, 1, 2\} and Y∈{5,10}Y \in \{5, 10\}:

Discrete joint and marginal probability distribution table

  • Detailed table entries:
    • fX,Y(0,5)=0.2f_{X,Y}(0, 5) = 0.2, fX,Y(1,5)=0.1f_{X,Y}(1, 5) = 0.1, fX,Y(2,5)=0.1f_{X,Y}(2, 5) = 0.1
    • fX,Y(0,10)=0.1f_{X,Y}(0, 10) = 0.1, fX,Y(1,10)=0.2f_{X,Y}(1, 10) = 0.2, fX,Y(2,10)=0.3f_{X,Y}(2, 10) = 0.3
  • Derived marginal probabilities for YY (fY(y)f_Y(y)):
    • fY(5)=0.2+0.1+0.1=0.4f_Y(5) = 0.2 + 0.1 + 0.1 = 0.4
    • fY(10)=0.1+0.2+0.3=0.6f_Y(10) = 0.1 + 0.2 + 0.3 = 0.6
  • Derived marginal probabilities for XX (fX(x)f_X(x)):
    • fX(0)=0.2+0.1=0.3f_X(0) = 0.2 + 0.1 = 0.3
    • fX(1)=0.1+0.2=0.3f_X(1) = 0.1 + 0.2 = 0.3
    • fX(2)=0.1+0.3=0.4f_X(2) = 0.1 + 0.3 = 0.4
  • Sum of all probabilities: ∑xfX(x)=∑yfY(y)=1.0\sum_x f_X(x) = \sum_y f_Y(y) = 1.0

Continuous Marginal Distribution Example

  • Given joint PDF: fX,Y(x,y)=2e−x−2yf_{X,Y}(x,y) = 2e^{-x - 2y} for x>0,y>0x > 0, y > 0; otherwise fX,Y(x,y)=0f_{X,Y}(x,y) = 0
  • Calculation of marginal PDF fX(x)f_X(x) for x>0x > 0:   fX(x)=∫0∞2e−x−2y dy=2e−x∫0∞e−2y dy=2e−x[−12e−2y]0∞=2e−x(0−(−12))=e−xf_X(x) = \int_{0}^{\infty} 2e^{-x - 2y}\,dy = 2e^{-x} \int_{0}^{\infty} e^{-2y}\,dy = 2e^{-x} \left[ -\frac{1}{2}e^{-2y} \right]_{0}^{\infty} = 2e^{-x} \left( 0 - \left( -\frac{1}{2} \right) \right) = e^{-x}
  • Calculation of marginal PDF fY(y)f_Y(y) for y>0y > 0:   fY(y)=∫0∞2e−x−2y dx=2e−2y∫0∞e−x dx=2e−2y[−e−x]0∞=2e−2y(0−(−1))=2e−2yf_Y(y) = \int_{0}^{\infty} 2e^{-x - 2y}\,dx = 2e^{-2y} \int_{0}^{\infty} e^{-x}\,dx = 2e^{-2y} \left[ -e^{-x} \right]_{0}^{\infty} = 2e^{-2y} (0 - (-1)) = 2e^{-2y}

Conditional Probability Distributions

  • Given joint distribution fX,Y(x,y)f_{X,Y}(x,y) with fX(x)>0f_X(x) > 0 and fY(y)>0f_Y(y) > 0:
    • Conditional distribution of XX given Y=yY = y:     fX∣Y(x∣y)=fX,Y(x,y)fY(y)f_{X|Y}(x \mid y) = \frac{f_{X,Y}(x,y)}{f_Y(y)}
    • Conditional distribution of YY given X=xX = x:     fY∣X(y∣x)=fX,Y(x,y)fX(x)f_{Y|X}(y \mid x) = \frac{f_{X,Y}(x,y)}{f_X(x)}

Conditional distribution formulas

Discrete Conditional Distributions

  • Conditional PMF formula:   fX∣Y(x∣y)=P[X=x∣Y=y]=P[X=x,Y=y]P[Y=y]f_{X|Y}(x \mid y) = P[X = x \mid Y = y] = \frac{P[X = x, Y = y]}{P[Y = y]}

Conditional probability mass function equation

  • Conditional CDF formula for XX given Y=yY = y:   FX∣Y(x∣y)=P[X≤x∣Y=y]=∑t≤xfX∣Y(t∣y)F_{X|Y}(x \mid y) = P[X \le x \mid Y = y] = \sum_{t \le x} f_{X|Y}(t \mid y)
  • Numerical Example — Conditional PMF given Y=5Y = 5:
    • Given fY(5)=0.4f_Y(5) = 0.4
    • fX∣Y(0∣5)=fX,Y(0,5)fY(5)=0.20.4=0.5f_{X|Y}(0 \mid 5) = \frac{f_{X,Y}(0,5)}{f_Y(5)} = \frac{0.2}{0.4} = 0.5
    • fX∣Y(1∣5)=fX,Y(1,5)fY(5)=0.10.4=0.25f_{X|Y}(1 \mid 5) = \frac{f_{X,Y}(1,5)}{f_Y(5)} = \frac{0.1}{0.4} = 0.25
    • fX∣Y(2∣5)=fX,Y(2,5)fY(5)=0.10.4=0.25f_{X|Y}(2 \mid 5) = \frac{f_{X,Y}(2,5)}{f_Y(5)} = \frac{0.1}{0.4} = 0.25
    • Verification sum: 0.5+0.25+0.25=1.00.5 + 0.25 + 0.25 = 1.0

Calculation table for conditional PMF given Y=5

Continuous Conditional Distributions

  • Conditional PDF formula for XX given Y=yY = y: fX∣Y(x∣y)=fX,Y(x,y)fY(y)f_{X|Y}(x \mid y) = \frac{f_{X,Y}(x,y)}{f_Y(y)}
    • Note: fX∣Y(x∣y)f_{X|Y}(x \mid y) is a density, not a probability.
  • Probability over an interval given Y=yY = y:   P[a<X<b∣Y=y]=∫abfX∣Y(x∣y) dxP[a < X < b \mid Y = y] = \int_{a}^{b} f_{X|Y}(x \mid y)\,dx
  • Conditional CDF formula:   FX∣Y(x∣y)=P[X≤x∣Y=y]=∫−∞xfX∣Y(t∣y) dtF_{X|Y}(x \mid y) = P[X \le x \mid Y = y] = \int_{-\infty}^{x} f_{X|Y}(t \mid y)\,dt

Detailed Continuous Worked Example

  • Given joint PDF for 0<x<10 < x < 1 and 0<y<10 < y < 1:   fX,Y(x,y)=125x(2−x−y)f_{X,Y}(x,y) = \frac{12}{5}x(2 - x - y)

Joint probability density function equation

  • Step 1: Find marginal PDF fY(y)f_Y(y) for 0<y<10 < y < 1:   fY(y)=∫01125x(2−x−y) dx=125∫01(2x−x2−xy) dxf_Y(y) = \int_{0}^{1} \frac{12}{5}x(2 - x - y)\,dx = \frac{12}{5} \int_{0}^{1} (2x - x^2 - xy)\,dxfY(y)=125[x2−x33−x2y2]01=125(1−13−y2)=125(23−y2)=2(4−3y)5f_Y(y) = \frac{12}{5} \left[ x^2 - \frac{x^3}{3} - \frac{x^2 y}{2} \right]_{0}^{1} = \frac{12}{5} \left( 1 - \frac{1}{3} - \frac{y}{2} \right) = \frac{12}{5} \left( \frac{2}{3} - \frac{y}{2} \right) = \frac{2(4 - 3y)}{5}
  • Step 2: Determine general conditional PDF fX∣Y(x∣y)f_{X|Y}(x \mid y):   fX∣Y(x∣y)=fX,Y(x,y)fY(y)=125x(2−x−y)2(4−3y)5=6x(2−x−y)4−3yf_{X|Y}(x \mid y) = \frac{f_{X,Y}(x,y)}{f_Y(y)} = \frac{\frac{12}{5}x(2 - x - y)}{\frac{2(4 - 3y)}{5}} = \frac{6x(2 - x - y)}{4 - 3y}
  • Step 3: Evaluate conditional density at Y=0.5Y = 0.5:   fY(0.5)=2(4−3(0.5))5=2(2.5)5=1.0f_Y(0.5) = \frac{2(4 - 3(0.5))}{5} = \frac{2(2.5)}{5} = 1.0fX∣Y(x∣0.5)=125x(2−x−0.5)=125x(1.5−x)=125(32x−x2)f_{X|Y}(x \mid 0.5) = \frac{12}{5}x(2 - x - 0.5) = \frac{12}{5}x(1.5 - x) = \frac{12}{5} \left( \frac{3}{2}x - x^2 \right)
  • Step 4: Calculate probability P[X<0.25∣Y=0.5]P[X < 0.25 \mid Y = 0.5]:   P[X<0.25∣Y=0.5]=∫00.25125(32x−x2)dx=125[34x2−x33]00.25P[X < 0.25 \mid Y = 0.5] = \int_{0}^{0.25} \frac{12}{5} \left( \frac{3}{2}x - x^2 \right)dx = \frac{12}{5} \left[ \frac{3}{4}x^2 - \frac{x^3}{3} \right]_{0}^{0.25}P[X<0.25∣Y=0.5]=125[34(116)−13(164)]=125[364−1192]=125[9−1192]=125×8192=125×124=110=0.10P[X < 0.25 \mid Y = 0.5] = \frac{12}{5} \left[ \frac{3}{4}\left(\frac{1}{16}\right) - \frac{1}{3}\left(\frac{1}{64}\right) \right] = \frac{12}{5} \left[ \frac{3}{64} - \frac{1}{192} \right] = \frac{12}{5} \left[ \frac{9 - 1}{192} \right] = \frac{12}{5} \times \frac{8}{192} = \frac{12}{5} \times \frac{1}{24} = \frac{1}{10} = 0.10

Independence of Random Variables

  • Definition: Two random variables XX and YY are independent if and only if:   fX∣Y(x∣y)=fX(x)orfY∣X(y∣x)=fY(y)f_{X|Y}(x \mid y) = f_X(x) \quad \text{or} \quad f_{Y|X}(y \mid x) = f_Y(y)
  • Factorization Property: When random variables XX and YY are independent, their joint probability function equals the product of their marginal distributions:   fX,Y(x,y)=fX(x)fY(y)f_{X,Y}(x,y) = f_X(x)f_Y(y)

Discrete Independence Test Example

  • Comparing marginal fX(x)f_X(x) and conditional fX∣Y(x∣5)f_{X|Y}(x \mid 5)

Joint marginal and conditional distributions for independence test

  • Values from discrete table:
    • fX(0)=0.3f_X(0) = 0.3, whereas fX∣Y(0∣5)=0.5f_{X|Y}(0 \mid 5) = 0.5
    • fX(1)=0.3f_X(1) = 0.3, whereas fX∣Y(1∣5)=0.25f_{X|Y}(1 \mid 5) = 0.25
    • fX(2)=0.4f_X(2) = 0.4, whereas fX∣Y(2∣5)=0.25f_{X|Y}(2 \mid 5) = 0.25
  • Conclusion: Since fX∣Y(x∣5)≠fX(x)f_{X|Y}(x \mid 5) \neq f_X(x), random variables XX and YY are dependent.

Continuous Independence Test Example

  • Given joint PDF for x>0,y>0x > 0, y > 0:   fX,Y(x,y)=2e−x−2yf_{X,Y}(x,y) = 2e^{-x - 2y}
  • Derived marginal distributions:
    • fY(y)=2e−2yf_Y(y) = 2e^{-2y}
    • fX(x)=e−xf_X(x) = e^{-x}
  • Calculation of conditional PDF:   fX∣Y(x∣y)=fX,Y(x,y)fY(y)=2e−x−2y2e−2y=e−xf_{X|Y}(x \mid y) = \frac{f_{X,Y}(x,y)}{f_Y(y)} = \frac{2e^{-x - 2y}}{2e^{-2y}} = e^{-x}
  • Conclusion: Since fX∣Y(x∣y)=fX(x)=e−xf_{X|Y}(x \mid y) = f_X(x) = e^{-x}, random variables XX and YY are independent.