Week 7 - Continuous Random Variables and Probability Distributions

Introduction to Continuous Random Variables

  • Instructor: Petar Zivkovic
  • Institution: EHL
  • Date: 02.06.2026

Learning Objectives

  • Probability Density Functions (PDFs): Explain and apply PDFs to determine probabilities for continuous random variables.
  • Continuous Probability Distributions: Describe and distinguish various continuous probability distributions and compute their key statistical measures.
  • Normal Distribution and Z-scores: Interpret and apply the normal distribution and Z-scores to solve real-world probability problems.

Definitions of Random Variables

  • Random Variable: A numerical description of the outcome of an experiment.
  • Discrete Random Variable: A variable that may assume either a finite number of values or an infinite sequence of values.
  • Continuous Random Variable: A variable that may assume any numerical value in an interval or collection of intervals.

Real-World Examples of Continuous Random Variables

  • Guest Check-in Process:
    • X=Time between guest arrivals (minutes)X = \text{Time between guest arrivals (minutes)}
    • Interval: {X0}\{X \geq 0\}
  • Room Temperature Control:
    • X=Temperature in a guest room (°C)X = \text{Temperature in a guest room (\degree C)}
    • Interval: {15X30}\{15 \leq X \leq 30\}
  • Hotel Restaurant Operations:
    • X=Amount spent by a guest on dinner (USD)X = \text{Amount spent by a guest on dinner (USD)}
    • Interval: {X0}\{X \geq 0\}
  • Energy Management:
    • X=Daily electricity consumption (kWh)X = \text{Daily electricity consumption (kWh)}
    • Interval: {X0}\{X \geq 0\}
  • Guest Satisfaction Tracking:
    • X=Average satisfaction score (%)X = \text{Average satisfaction score (\%)}
    • Interval: {0X100}\{0 \leq X \leq 100\}

Common Continuous Probability Distributions

DistributionDensity Function f(x)f(x)ShapeTypical Use / ConditionsExpected Value E[X]E[X]Variance Var(X)Var(X)
Uniformf(x)=1baf(x) = \frac{1}{b-a} for axba \leq x \leq bFlat / rectangularAll outcomes equally likely within an interval.a+b2\frac{a+b}{2}(ba)212\frac{(b-a)^2}{12}
Normalf(x)=1σ2πe(xμ)22σ2f(x) = \frac{1}{\sigma \sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}Bell-shaped, symmetricNatural variation (room temp, spending, satisfaction).μ\muσ2\sigma^2
Exponentialf(x)=λeλxf(x) = \lambda e^{-\lambda x} for x0x \geq 0Right-skewed, decreasingTime between arrivals or service calls.1λ\frac{1}{\lambda}1λ2\frac{1}{\lambda^2}
Z (Std. Normal)f(z)=12πez22f(z) = \frac{1}{\sqrt{2\pi}} e^{-\frac{z^2}{2}}Normalize data to compare values ZN(0,1)Z \sim N(0,1)Standardization (z-scores)0011
Student tf(x)=Γ(v+12)vπΓ(v2)(1+x2v)v+12f(x) = \frac{\Gamma(\frac{v+1}{2})}{\sqrt{v\pi} \Gamma(\frac{v}{2})} (1 + \frac{x^2}{v})^{-\frac{v+1}{2}}Normal with extra uncertainty (fatter tails)Small samples, unknown variance; Xt(v)X \sim t(v)00 (if v>1v > 1)vv2\frac{v}{v-2} (if v>2v > 2)
Chi-Squaref(x)=12v/2Γ(v/2)xv/21ex/2f(x) = \frac{1}{2^{v/2}\Gamma(v/2)} x^{v/2 - 1} e^{-x/2}Measures variability (always positive)Test of independence; Xχ2(v)X \sim \chi^2(v)vv2v2v

The Uniform Continuous Distribution: Empirical Example

  • Context: Weight of a cheeseburger.
  • Experiment: Making a cheeseburger.
  • Random Variable (XX): Weight of a cheeseburger.
  • Possible Values: 40x6040 \leq x \leq 60
  • Formula Representation:
    • f(x)=120f(x) = \frac{1}{20} for 40x6040 \leq x \leq 60
    • f(x)=0f(x) = 0 otherwise.
  • Graphical Representation: A rectangular distribution with a height (hh) of 0.050.05 (since 16040=0.05\frac{1}{60-40} = 0.05), spanning the interval from 4040 to 6060 on the x-axis.

The Normal Distribution

  • Notation: XN(μ,σ2)X \sim N(\mu, \sigma^2)
  • Parameters:
    • μ\mu: Mean (center of the distribution).
    • σ2\sigma^2: Variance (spread of the distribution).

Standardization

Standardization in Life

  • Consistency: Ensures room standards.
  • Fair Comparison: Facilitates standardized tests and recipe measurements.
  • Efficiency and Safety: Relates to traffic rules and electrical plugs.
  • Error Reduction: Standardizes clothing sizes and document formats.

Standardization in Statistics

  • Scale: Puts data on a common scale (e.g., z-scores).
  • Comparison: Makes comparison across different units possible.
  • Interpretation: Enables interpretation relative to the mean and standard deviation.
  • Outlier Detection: Helps in identifying outliers.
  • Technical Requirement: Required for techniques like regression, Principal Component Analysis (PCA), and clustering.

Standardization Example: Restaurant Spending

  • Restaurant A:
    • Average spend (μ\mu) = 100CHF100\,CHF
    • Standard deviation (σ\sigma) = 20CHF20\,CHF
    • Distribution: XN(100,202)X \sim N(100, 20^2)
  • Restaurant B:
    • Average spend (μ\mu) = 20\,\text{\euro}
    • Standard deviation (σ\sigma) = 5\,\text{\euro}
    • Distribution: XN(20,52)X \sim N(20, 5^2)
  • Standardization Formula:
    • Z=XμσZ = \frac{X - \mu}{\sigma}
    • The resulting ZZ follows a standard normal distribution: ZN(0,1)Z \sim N(0, 1).
    • Units of measurement correspond to a standard deviation of 11.

Properties of the Standard Normal Distribution

  • Empirical Rule (68-95-99.7 Rule):
    • Approximately 68% of data falls within 11 standard deviation of the mean (±1σ\pm 1\sigma).
    • Approximately 95% of data falls within 22 standard deviations of the mean (±2σ\pm 2\sigma).
    • Approximately 99.7% of data falls within 33 standard deviations of the mean (±3σ\pm 3\sigma).
  • Area Breakdown (Symmetric):
    • Center to 1σ1\sigma: 34%34\%
    • 1σ1\sigma to 2σ2\sigma: 13.5%13.5\%
    • Beyond 2σ2\sigma: 2.35%2.35\%

Using Microsoft Excel for Normal Distributions

Finding Probabilities (Area under the curve)

  • Cumulative Probability P(Xx)P(X \leq x):
    • =NORM.DIST(x; \mu; \sigma; 1)
  • Right-Tail Probability P(X>x)P(X > x):
    • =1 - NORM.DIST(x; \mu; \sigma; 1)
  • Interval Probability P(x0<Xx1)P(x_0 < X \leq x_1):
    • =NORM.DIST(x1; \mu; \sigma; 1) - NORM.DIST(x0; \mu; \sigma; 1)

Finding Values (Inverse functions)

  • Find xx such that P(Xx)=aP(X \leq x) = a:
    • x = NORM.INV(a; \mu; \sigma)

Standard Normal Distribution (Z)

  • Distribution Check: ZN(0,1)Z \sim N(0, 1)
  • Standard Normal Probability:
    • =NORM.S.DIST(z; 1) which is equivalent to =NORM.DIST(z; 0; 1; 1)
  • Standard Normal Inverse:
    • =NORM.S.INV(cumulative_probability) which is equivalent to =NORM.INV(cumulative_probability; 0; 1)