A616 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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, f(t)=re−rt, a common model for the time until a part fails. The shaded area between a and b is the probability that the failure falls in that window.
  • Change the rate r. The total area under the curve stays exactly 1. Why must it?
  • Compare the readout with e−ra−e−rb.

Predict

A density curve has a peak height of 3. Is that a problem?

Name it

Densities

A probability density f(x) describes a quantity X that can take any value in a range. It satisfies

f(x)≥0∫−∞∞f(x)dx=1

and the probability that X lands between a and b is the area

P(a<X<b)=∫abf(x)dx

Mean and variance

The mean is the density-weighted average, exactly like the center of charge in lesson 14:

μ=∫xf(x)dx

The variance measures spread: σ2=∫(x−μ)2f(x)dx. Its square root σ is the standard deviation, which for a zero-mean error is the RMS.

Three densities you'll meet constantly

Densityf(x)MeanVariance
Uniform on [a,b]1b−aa+b2(b−a)212
Exponential, rate rre−rx for x≥01r1r2
Gaussian1σ2πe−(x−μ)2/2σ2μσ2

The exponential gives P(X>t)=e−rt, the survival curve. The Gaussian's normalizing constant comes from ∫−∞∞e−x2dx=π, 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
  1. Find the rate. The mean is 10 years, so the rate is r=1/10 per year.
  2. Integrate the tail. P(X>5)=∫5∞0.1e−0.1xdx=e−0.5=0.607
  3. 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
  1. Step size. q=1V210=0.977mV
  2. Variance. The error is uniform on [−q/2,q/2], so its variance is ∫−q/2q/2x21qdx=1q⋅23(q2)3=q212
  3. RMS. q12=0.977mV12=0.282mV 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 −5% to +5%. What are its mean and standard deviation?

Show the solution
  1. Recall the uniform density. A uniform density on [a,b] has height 1b−a, mean a+b2 and variance (b−a)212.
  2. Mean. The range runs from −5% to +5%, so the mean is 0.
  3. Standard deviation. The width b−a is 10%: σ=10%12=2.89% Most parts are well inside the marked tolerance.

Answer the mean is 0 and the standard deviation is 2.89%.

Check

f(x)=cx on [0,4] (and zero elsewhere) is a probability density. What must c be?

Check

A part's lifetime is exponential with mean 100 hours. What is the probability it lasts more than 50 hours?

Check

f(x)=3x2 on [0,1]. 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 P(0.2<X<3)?

Check

What is the variance of a uniform density on [0,6]?

Check

A quantity is uniform on [−5,1].

(a)

What is its mean?

(b)

What is its standard deviation?

(c)

What is the probability of landing within 0.5(b−a) of the mean?

Check

Derive the variance of a uniform density on [a,b].

Step 1

What is the mean of x2, 1b−a∫abx2dx?

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°.

Explain why

Why is the mean of a density computed the same way as the center of charge on a rod?

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.