UNIHIVE

Study Hub UNIPORT ENG 301

ENG 301 · Engineering Mathematics IV (Probability and Statistics)

Random variables, expectation and generating functions

Discrete and continuous random variables, the probability mass, density and distribution functions, mean and variance, and moment generating functions.

Our notes

2 min read

Random variables

A random variable X assigns a number to each outcome. Discrete: countable values (number of defects). Continuous: any value in an interval (time to failure, voltage).

Discrete: probability mass function (pmf)

p(x) = P(X = x), with p(x) ≥ 0 and Σ p(x) = 1.
Cumulative distribution function (CDF): F(x) = P(X ≤ x), a non-decreasing step function from 0 to 1.

Continuous: probability density function (pdf)

f(x) ≥ 0 and ∫ f(x) dx = 1 over all x. P(a ≤ X ≤ b) = ∫ₐᵇ f(x) dx = F(b) − F(a), and P(X = a) = 0 for any single value. f(x) = F′(x).
Worked example. f(x) = kx for 0 ≤ x ≤ 2, else 0. ∫₀² kx dx = 2k = 1 → k = ½. P(X ≤ 1) = ∫₀¹ x/2 dx = ¼.

Expectation and variance

  • E[X] = Σ x p(x) or ∫ x f(x) dx (the mean, μ).
  • E[g(X)] = Σ g(x) p(x); E[aX + b] = aE[X] + b.
  • Var(X) = E[(X − μ)²] = E[X²] − (E[X])²; Var(aX + b) = a² Var(X). Standard deviation σ = √Var.

Worked example. Daily breakdowns X of a machine: P(0) = 0.1, P(1) = 0.3, P(2) = 0.4, P(3) = 0.2.
E[X] = 0 + 0.3 + 0.8 + 0.6 = 1.7; E[X²] = 0 + 0.3 + 1.6 + 1.8 = 3.7; Var = 3.7 − 1.7² = 3.7 − 2.89 = 0.81; σ = 0.9.
Worked example (continuous). For f(x) = x/2 on [0, 2]: E[X] = ∫₀² x²/2 dx = 8/6 = 4/3; E[X²] = ∫₀² x³/2 dx = 16/8 = 2; Var = 2 − 16/9 = 2/9.

Generating functions

  • Probability generating function (non-negative integer X): G(s) = E[sˣ] = Σ p(k)sᵏ; G′(1) = E[X].
  • Moment generating function: M(t) = E[e^(tX)]. Its derivatives at t = 0 give the moments: M′(0) = E[X], M″(0) = E[X²].
  • Uses: find moments easily; identify distributions (same MGF = same distribution); the MGF of a sum of independent variables is the product of their MGFs.
DistributionMGF
Bernoulli(p)q + pe^t
Binomial(n, p)(q + pe^t)ⁿ
Poisson(λ)exp(λ(e^t − 1))
Exponential(λ)λ/(λ − t), t < λ
Normal(μ, σ²)exp(μt + σ²t²/2)

Worked example. For the exponential: M′(t) = λ/(λ − t)², so E[X] = M′(0) = 1/λ; M″(t) = 2λ/(λ − t)³, E[X²] = 2/λ², Var = 2/λ² − 1/λ² = 1/λ².

  • Transform methods: Laplace transforms (for continuous times) and z-transforms do the same job in reliability and signal problems.

Random vectors

Several random variables together (X, Y): see the joint distributions topic.

Exams usually ask: check a pmf or pdf, find a constant; find the CDF and probabilities; mean and variance; derive mean and variance from an MGF; MGF of a sum.

Common mistake: writing Var(X) = E[X²] − E[X] (forgetting to square the mean), or Var(2X) = 2 Var(X). It is (E[X])², and Var(2X) = 4 Var(X).

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All ENG 301 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.