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, , 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 is random with a known distribution, what is the distribution of , and what is its mean?
- is Gaussian with mean and standard deviation . The histogram shows the power into 1 Ω; the line is the exact density.
- Compare the measured mean power with , the power of the average voltage. Which is bigger, and by how much?
- Set : 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 Ω?
4.25 W. Power goes as the square, and . The fluctuations add power whichever way they go, because the square of a negative swing is positive. That's the variance formula from lesson 9 read backward, and it's why noise power adds to signal power.
Name it
The mean of a function
For any function ,
You don't need the distribution of to find its mean. But in general : the average of the squares isn't the square of the average, . Only for straight lines, , do the two agree.
The distribution of a function
Through the CDF. Work with probabilities of ranges, then differentiate:
For example, with uniform on and : , so .
Monotonic functions. If is always increasing or always decreasing, probability in a small range maps to a range , so
Where is steep, the probability gets spread thin; where it's flat, it piles up.
Simulating any distribution. If is uniform on , then has CDF . For the exponential, . That's how this course's sims draw lifetimes.
Small errors: linearization
If varies only a little around , a function is nearly a straight line there:
This is the error propagation of A9.6 and of lesson 36, for one variable. In relative terms, a power law has : a resonant frequency 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
- Write the average. The output is , so its mean is
- Fold onto the positive half. The integrand is even, so
- 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 .
Worked example
A simulator draws uniform on and returns . Show that is exponential with rate .
Show the solution
- Write the survival function. For , since is also uniform on .
- Recognize it. That's the exponential survival function, so is exponential with rate .
Answer for , so is exponential with rate .
Worked example
Gaussian noise of 1 V RMS appears across 50 Ω. What average power does it deliver?
Show the solution
- Average the power. The power is , a function of the random voltage, so its mean is
- 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
has mean 2 and standard deviation 0.5. What is ?
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 spread, from this alone?
Check
is uniform on and . What is ?
Check
and are independent and uniform on . 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 ?
Check
A simulator returns for uniform on .
Step 1
What value does 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°.
Step 2
What is the exponential CDF at that value?
Explain why
Why is the average of larger than the square of the average of ?
Squaring bends upward: a swing above the mean raises the square by more than an equal swing below the mean lowers it. So the fluctuations, whichever way they go, push the average of the squares up. The amount is exactly the variance: . Only a straight-line function treats upward and downward swings symmetrically, which is why only for those does the average of equal of the average.
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.