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.
| 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 | 
We just finished Chapter 3 (PMFs like Binomial and Poisson). Now we “zoom in” so bars become a smooth curve (a PDF). Key correspondences:
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)\)).
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)\).
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.
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.
For a continuous random variable \(X\), a probability density function is a function \(f(x)\) such that:
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. \]
Suppose the electric current \(X\) is uniformly distributed between \(4.9\) mA and \(5.1\) mA.
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\).
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) \)
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 \)
The antiderivative of \(5\) is \(5x\). So:
\( \Big[5x\Big]_{4.9}^{5} = 5(5) - 5(4.9) = 25 - 24.5 = 0.5 \)
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.
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 \)
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.
By definition:
\( P(X > 12.6) = \int_{12.6}^{\infty} 20e^{-20(x-12.5)} dx \)
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)} \)
\( 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%).
\( 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%).
Q1: What is the probability that the current is between 4.95 and 5.05?
\(X \sim \text{Uniform}(4.9, 5.1)\). Height: \(f(x)=\frac{1}{5.1-4.9}=5\)
Width: \(5.05-4.95=0.10\)
\(P= f(x)\times \text{width} = 5 \times 0.10 = 0.50\)
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?
\(X \sim \text{Uniform}(295, 325)\). Height: \(f(x)=\frac{1}{325-295}=\frac{1}{30}\approx 0.0333\)
Width: \(320-310=10\)
\(P = 0.0333 \times 10 = 0.333 \approx \frac{1}{3}\)
About 33.3% of scores will fall in this range.