A6 · Lesson 16 · Probability densities
Probability as area under a curve
An ADC rounds every voltage to the nearest step, and the rounding error could be anything between minus half a step and plus half a step. What's the RMS of that error? A component's lifetime could be anything from an hour to decades. What's the chance it lasts five years? When a quantity can take any value in a range, probabilities come from a density curve, and every question about it is an integral. A11 builds this out fully; this lesson gives you the calculus.
- The curve is an exponential density, , a common model for the time until a part fails. The shaded area between and is the probability that the failure falls in that window.
- Change the rate . The total area under the curve stays exactly 1. Why must it?
- Compare the readout with .
Predict
A density curve has a peak height of 3. Is that a problem?
No. A density is probability per unit of the variable, so its height can be anything as long as the total area is 1. A density of 3 per second over a window of 0.01 s gives a probability of about 0.03. Only areas under the curve are probabilities.
Name it
Densities
A probability density describes a quantity that can take any value in a range. It satisfies
and the probability that lands between and is the area
Mean and variance
The mean is the density-weighted average, exactly like the center of charge in lesson 14:
The variance measures spread: . Its square root is the standard deviation, which for a zero-mean error is the RMS.
Three densities you'll meet constantly
| Density | Mean | Variance | |
|---|---|---|---|
| Uniform on | |||
| Exponential, rate | for | ||
| Gaussian |
The exponential gives , the survival curve. The Gaussian's normalizing constant comes from , which has no antiderivative to evaluate; A9 proves it with a trick in polar coordinates.
Worked example
A component's lifetime is exponential with a mean of 10 years. What's the chance it lasts at least 5 years?
Show the solution
- Find the rate. The mean is 10 years, so the rate is per year.
- Integrate the tail.
- Interpret. That's about 61%. Notice the mean is 10 years, yet nearly 40% fail before 5: the exponential has many early failures and a long tail.
Answer the chance is 0.607, about 61%.
Worked example
A 10-bit ADC spans 1 V. What is the RMS of its rounding error?
Show the solution
- Step size.
- Variance. The error is uniform on , so its variance is
- RMS. a bit over a quarter of a step. S7 builds an ADC's signal-to-noise ratio from this.
Answer the RMS rounding error is 0.282 mV, a bit over a quarter of a step.
Worked example
A 5% resistor's error is modeled as uniform from to . What are its mean and standard deviation?
Show the solution
- Recall the uniform density. A uniform density on has height , mean and variance .
- Mean. The range runs from to , so the mean is 0.
- Standard deviation. The width is 10%: Most parts are well inside the marked tolerance.
Answer the mean is 0 and the standard deviation is 2.89%.
Check
on (and zero elsewhere) is a probability density. What must be?
Check
A part's lifetime is exponential with mean 100 hours. What is the probability it lasts more than 50 hours?
Check
on . What is its mean?
Check
A 10-bit ADC spans 1 V. What is the RMS of its rounding error?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
Check
For an exponential density with rate 0.5, what is ?
Check
What is the variance of a uniform density on ?
Check
A quantity is uniform on .
(a)
What is its mean?
(b)
What is its standard deviation?
(c)
What is the probability of landing within of the mean?
Check
Derive the variance of a uniform density on .
Step 1
What is the mean of , ?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
Subtract the square of the mean, , and simplify.
Explain why
Why is the mean of a density computed the same way as the center of charge on a rod?
Both are weighted averages of position. On a rod, each bit of length holds charge , and the center weights each position by that charge and divides by the total. For a density, each small range holds probability , and the mean weights each value by its probability. The total probability is 1, so there's nothing left to divide by, but the integral is the same idea.
Practice
Keep practicing
10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.