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

A11 · Lesson 17 · Functions of a random variable

What happens to randomness when you square it, rectify it or divide by it

A voltage averages 2 V but wobbles with noise. The power it delivers to a 1 Ω load, V2, averages more than 4 W. A full-wave rectifier fed pure noise with an average of zero puts out a positive average. And a simulator that can only draw uniform random numbers can still produce exponential lifetimes or Gaussian noise. All of these are about one question: if X is random with a known distribution, what is the distribution of g(X), and what is its mean?

  • V is Gaussian with mean m and standard deviation s. The histogram shows the power P=V2 into 1 Ω; the line is the exact density.
  • Compare the measured mean power with m2, the power of the average voltage. Which is bigger, and by how much?
  • Set m=0: the voltage averages zero but the power doesn't.

Predict

A voltage has mean 2 V and standard deviation 0.5 V. What is the average power it delivers to 1 Ω?

Name it

The mean of a function

For any function g,

E[g(X)]=∑g(xi)P(xi)or∫g(x)p(x)dx

You don't need the distribution of g(X) to find its mean. But in general E[g(X)]≠g(E[X]): the average of the squares isn't the square of the average, E[X2]=μ2+σ2. Only for straight lines, g(x)=ax+b, do the two agree.

The distribution of a function

Through the CDF. Work with probabilities of ranges, then differentiate:

FY(y)=P(g(X)≤y)

For example, with X uniform on [0,1] and Y=X2: P(Y≤y)=P(X≤y)=y, so pY=12y.

Monotonic functions. If g is always increasing or always decreasing, probability in a small range dx maps to a range dy=|g′(x)|dx, so

pY(y)=pX(x)|g′(x)|at x=g−1(y)

Where g is steep, the probability gets spread thin; where it's flat, it piles up.

Simulating any distribution. If U is uniform on [0,1], then Y=F−1(U) has CDF F. For the exponential, Y=−ln⁡(1−U)λ. That's how this course's sims draw lifetimes.

Small errors: linearization

If X varies only a little around μ, a function is nearly a straight line there:

g(X)≈g(μ)+g′(μ)(X−μ)⇒σg(X)≈|g′(μ)|σX

This is the error propagation of A9.6 and of lesson 36, for one variable. In relative terms, a power law g=cXk has σgg≈|k|σXX: a resonant frequency ∝C−1/2 varies by half the capacitor's percentage spread.

Worked example

Zero-mean Gaussian noise with standard deviation σ goes through an ideal full-wave rectifier. What is the average output?

Show the solution
  1. Write the average. The output is |X|, so its mean is E|X|=∫−∞∞|x|e−x2/2σ2σ2πdx
  2. Fold onto the positive half. The integrand is even, so E|X|=2∫0∞xe−x2/2σ2σ2πdx=2σ2σ2π=σ2π=0.798σ
  3. Why meters misread noise. An average-responding meter calibrated for sine waves would misread noise for this reason: the ratio of average to RMS differs between shapes.

Answer the average output is σ2/π=0.798σ.

Worked example

A simulator draws U uniform on [0,1) and returns Y=−ln⁡(1−U)/λ. Show that Y is exponential with rate λ.

Show the solution
  1. Write the survival function. For y≥0, P(Y>y)=P(−ln⁡(1−U)>λy)=P(1−U<e−λy)=e−λy since 1−U is also uniform on (0,1].
  2. Recognize it. That's the exponential survival function, so Y is exponential with rate λ.

Answer P(Y>y)=e−λy for y≥0, so Y is exponential with rate λ.

Worked example

Gaussian noise of 1 V RMS appears across 50 Ω. What average power does it deliver?

Show the solution
  1. Average the power. The power is V2R, a function of the random voltage, so its mean is E[P]=E[V2]R=σ2R=150W=20mW
  2. The fluctuations. The instantaneous power fluctuates wildly (it's a scaled chi-square variable with one degree of freedom), but its mean depends only on the variance, whatever the distribution.

Answer the noise delivers 20 mW on average.

Check

X has mean 2 and standard deviation 0.5. What is E[X2]?

Check

A voltage with mean 5 V and standard deviation 1 V drives a 50 Ω resistor. What is the average power?

Write units the way you normally would: 1.5 W, 1500 mW and 0.0015 kW are the same answer.

Check

Zero-mean Gaussian noise of RMS 2 mV is full-wave rectified. What is the average of the output?

Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.

Check

A capacitor's value has a spread of 5%. By what percentage does f0=12πLC spread, from this alone?

Check

U is uniform on [0,1) and Y=−ln⁡(1−U)/2. What is P(Y>0.5)?

Check

U1 and U2 are independent and uniform on [0,1]. What is the chance that the larger of the two is below 0.8?

Check

Gaussian noise of 0.5 V RMS appears across 50 Ω.

(a)

What average power does it deliver?

Write units the way you normally would: 1.5 mW, 1500 µW and 0.0015 W are the same answer.

(b)

What is the average of |V|?

Check

A simulator returns Y=−ln⁡(1−U)/l for U uniform on [0,1).

Step 1

What value does U=u give?

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 average of X2 larger than the square of the average of X?

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.