📘 4.1 – Probability Distributions and Density Functions

📘 What Is f(x)? What Is x?

x is a possible value of the continuous random variable X. For example, it could represent a current reading like 5.03 mA or a diameter like 12.57 mm.

f(x) is the height of the probability density function (PDF) at the point x. It is not the probability that X equals x. Instead, it helps us find probability over an interval.

To calculate probability between two values, say a and b, we compute the area under the curve from a to b:

P(a ≤ X ≤ b) = ∫ab f(x) dx

So, f(x) is like the height and the integral gives us the total area (probability) between two x-values.

📊 Discrete vs. Continuous Distributions

Feature Discrete Continuous
Possible values Countable (e.g., 0, 1, 2, 3...) Uncountably infinite (e.g., any real number in [a, b])
Probability of exact value Positive (e.g., P(X = 2) = 0.3) Always zero (P(X = x) = 0)
How to find probability Sum: P(X = x1) + ... Integral: ∫ f(x) dx
Example Number of defects on a chip Voltage, diameter, time

🔗 From Chapter 3 (Discrete) to Chapter 4 (Continuous)

We just finished Chapter 3 (PMFs like Binomial and Poisson). Now we “zoom in” so bars become a smooth curve (a PDF). Key correspondences:

Variance (with the x² integral) + quick calculator

General: \( Var(X)=E[(X-\mu)^2]=E[X^2]-\mu^2 \) with \( E[X^2]=\int x^2 f(x)\,dx \) (discrete: replace the integral by \(\sum_x x^2 p(x)\)).

🔢 Compute μ, E[X²], Var(X)

Uniform(a,b)

Exponential(λ)

Normal approximation to Binomial (with continuity correction)

For \(X\sim \text{Bin}(n,p)\) with \(np(1-p)\) not too small, \(X\) is approximated by \(Y\sim \mathcal{N}(\mu=np,\sigma^2=np(1-p))\). Use a continuity correction to convert a discrete statement into a continuous one:

\(P(X\le k)\approx \Phi\!\big(\frac{(k+0.5)-\mu}{\sigma}\big)\), \(P(a\le X \le b)\approx \Phi\!\big(\frac{b+0.5-\mu}{\sigma}\big)-\Phi\!\big(\frac{a-0.5-\mu}{\sigma}\big)\).

Poisson counts vs. Exponential waiting times

If counts of events in time follow \(N(t)\sim \text{Poisson}(\lambda t)\), then the waiting time between events is \(T\sim \text{Exponential}(\lambda)\) with PDF \(f(t)=\lambda e^{-\lambda t}\) for \(t\ge 0\). Discrete counts ↔ continuous times.

🎛️ Try it: Discrete bars → Smooth curve

Blue bars: Binomial PMF. Black curve: Normal approximation to those bars (with continuity correction guiding the “fit”).


Same process, two views: counts in a fixed time (Poisson) vs. time until next event (Exponential).

Orange bars: Poisson PMF for counts in one time unit. Green curve: Exponential PDF for waiting time between events.

Probability Density Function (PDF)

For a continuous random variable \(X\), a probability density function is a function \(f(x)\) such that:

  1. Nonnegativity: \( f(x) \ge 0 \) for all \( x \).
  2. Total Probability = 1: \[ \int_{-\infty}^{\infty} f(x)\,dx = 1 \]
  3. Probability over Interval: \[ P(a \le X \le b) = \int_{a}^{b} f(x)\,dx \quad \text{(area under \(f(x)\) from \(a\) to \(b\))} \]
Variance: discrete vs. continuous (with the x² integral)

Definition (both): \( \mathrm{Var}(X) = \mathbb{E}\big[(X-\mu)^2\big] = \mathbb{E}[X^2] - \mu^2 \), where \( \mu=\mathbb{E}[X] \).

Discrete (PMF \(p(x)\)):

\[ \mathbb{E}[X] = \sum_x x\,p(x), \quad \mathbb{E}[X^2] = \sum_x x^2\,p(x), \quad \mathrm{Var}(X) = \sum_x (x-\mu)^2 p(x) = \sum_x x^2 p(x) - \mu^2. \]

Continuous (PDF \(f(x)\)):

\[ \mathbb{E}[X] = \int_{-\infty}^{\infty} x\,f(x)\,dx, \quad \mathbb{E}[X^2] = \int_{-\infty}^{\infty} x^2\,f(x)\,dx, \quad \mathrm{Var}(X) = \int_{-\infty}^{\infty} (x-\mu)^2 f(x)\,dx = \int x^2 f(x)\,dx - \mu^2. \]


📊 Example 4.1: Uniform Distribution (Electric Current)

Suppose the electric current \(X\) is uniformly distributed between \(4.9\) mA and \(5.1\) mA.

Step 1: Write Down the Distribution

Since \(X \sim \text{Uniform}(4.9, 5.1)\), the probability density function (PDF) is:

\( f(x) = \frac{1}{5.1 - 4.9} = \frac{1}{0.2} = 5 \quad \text{for } 4.9 \le x \le 5.1 \)

This means the PDF is a flat horizontal line at height \(5\) between \(4.9\) and \(5.1\).

Step 2: Identify What We Are Asked For

We want \(P(X < 5)\), which means the probability that the current is less than 5.

Because this is a continuous distribution, we can ignore equality (less than or less than-or-equal gives the same result):

\( P(X < 5) = P(4.9 \le X \le 5) \)

Step 3: Write the Probability as an Integral

For a continuous random variable, probability is the area under the curve of \(f(x)\) over the interval.

\( P(4.9 \le X \le 5) = \int_{4.9}^{5} f(x) dx = \int_{4.9}^{5} 5 dx \)

Step 4: Compute the Integral

The antiderivative of \(5\) is \(5x\). So:

\( \Big[5x\Big]_{4.9}^{5} = 5(5) - 5(4.9) = 25 - 24.5 = 0.5 \)

Step 5: Interpret the Result

The probability is \(0.5\), or \(50\%\). This makes sense — since the distribution is uniform (flat), the probability of being below \(5\) is exactly half of the total interval \([4.9, 5.1]\).

The shaded area under the curve from 4.9 to 5 represents 50% of the total area.

🔩 Example 4.2: Exponential Distribution (Hole Diameter)

Let \(X\) be the hole diameter (in mm), and assume the probability density function (PDF) is:

\( f(x) = 20e^{-20(x-12.5)}, \quad x \ge 12.5 \)

Step 1: Verify This Is a Valid PDF

Check that the total probability is 1:

\( \int_{12.5}^{\infty} 20e^{-20(x-12.5)} dx = \Big[-e^{-20(x-12.5)}\Big]_{12.5}^{\infty} = 0 - (-1) = 1 \)

✅ This confirms it is a valid probability density function.

Q1: Find \(P(X > 12.6)\)

By definition:

\( P(X > 12.6) = \int_{12.6}^{\infty} 20e^{-20(x-12.5)} dx \)

Step 2: Find the Antiderivative

The derivative of \(e^{-20(x-12.5)}\) is \(-20e^{-20(x-12.5)}\). Therefore, the antiderivative of \(20e^{-20(x-12.5)}\) is:

\( \frac{20}{-20}e^{-20(x-12.5)} = -e^{-20(x-12.5)} \)

Step 3: Apply Limits

\( P(X > 12.6) = \Big[-e^{-20(x-12.5)}\Big]_{12.6}^{\infty} = 0 - \big(-e^{-20(12.6-12.5)}\big) = e^{-2} \approx 0.1353 \)

Answer: \( P(X > 12.6) \approx 0.135 \) (13.5%).

Q2: Find \(P(12.5 < X < 12.6)\)

\( P(12.5 < X < 12.6) = 1 - P(X > 12.6) = 1 - 0.135 = 0.865 \)

Answer: \( P(12.5 < X < 12.6) = 0.865 \) (86.5%).

🧠 Practice Questions

Q1: What is the probability that the current is between 4.95 and 5.05?

Show Answer

Step 1 — Write the PDF

\(X \sim \text{Uniform}(4.9, 5.1)\). Height: \(f(x)=\frac{1}{5.1-4.9}=5\)

Step 2 — Find the interval width

Width: \(5.05-4.95=0.10\)

Step 3 — Probability = area of rectangle

\(P= f(x)\times \text{width} = 5 \times 0.10 = 0.50\)

Interpretation

There’s a 50% chance that the current is between 4.95 and 5.05 mA.


Q2: Suppose your GRE trial test scores are uniformly distributed between 295 and 325. What is the probability that your score is between 310 and 320?

Show Answer

Step 1 — Write the PDF

\(X \sim \text{Uniform}(295, 325)\). Height: \(f(x)=\frac{1}{325-295}=\frac{1}{30}\approx 0.0333\)

Step 2 — Interval width

Width: \(320-310=10\)

Step 3 — Probability

\(P = 0.0333 \times 10 = 0.333 \approx \frac{1}{3}\)

Interpretation

About 33.3% of scores will fall in this range.