Functions of a Random Variable
Why Functions of Random Variables?
In practice, the quantity we observe is rarely the "raw" random variable β it is some function of it. A detector squares the received signal; an amplifier clips it; a phase estimator applies the arctangent. To analyze these systems, we need to derive the distribution of from the known distribution of . The tools in this section β the CDF method and the change-of-variables formula β are the workhorses for this task.
Theorem: The CDF Method
Let be a continuous RV with CDF and let for a Borel-measurable . Then the CDF of is
where . For continuous :
The PDF of (when it exists) is obtained by differentiating: .
The CDF method is completely general β it works for any measurable , monotone or not. The procedure is: (1) express the event in terms of , (2) integrate the density of over the resulting region, (3) differentiate in if you want the PDF.
Direct from the definition
.
Theorem: Change of Variables for Monotonic Transformations
Let be a continuous RV with PDF and let be a strictly monotonic, differentiable function with inverse . Then has PDF
Case 1: $g$ strictly increasing
. Differentiating: .
Case 2: $g$ strictly decreasing
. Differentiating: , since . Both cases yield the same formula with the absolute value.
Theorem: Non-Monotonic Transformations
Let be piecewise monotonic. Partition into intervals on each of which is strictly monotonic with inverse . Then has PDF
Partition and sum
. These events are disjoint. On each , is monotonic, so we apply the previous theorem to each piece and sum.
Example: Squared Gaussian Chi-Squared
Let and . Derive the PDF of .
CDF method
For : .
Differentiate
for .
Identify the distribution
This is the distribution, also known as the chi-squared distribution with 1 degree of freedom, .
Example: Complex Gaussian Envelope Rayleigh
Let where are independent. Derive the distribution of the envelope .
CDF of $R$
.
Switch to polar coordinates
Let , : .
Differentiate to get PDF
for . This is the Rayleigh distribution with parameter .
Example: Squared Envelope Exponential
With Rayleigh as above, show that is exponentially distributed.
CDF method
for .
Identify
This is the CDF of . The squared envelope of a complex Gaussian signal is exponentially distributed. This fact underpins the analysis of Rayleigh fading channels, where the instantaneous received power (proportional to ) is exponential.
RV Transformation Visualizer
Visualize how the CDF method works: choose a transformation and see how the PDF of maps to the PDF of . The shaded regions show corresponding probability masses.
Parameters
The CDF Method for Deriving Distributions
Step 2 is the critical step. For monotone , is a half-line. For non-monotone (e.g., ), may be a union of intervals.
Common Mistake: Forgetting the Jacobian
Mistake:
Writing without the factor.
Correction:
The correct formula is . The Jacobian factor accounts for the "stretching" or "compression" of probability mass under the transformation. Without it, will not integrate to 1.
Quick Check
If and , what is the distribution of ?
with . So and . The Gaussian is closed under affine transformations.
Jacobian
In the change-of-variables formula, the Jacobian is the absolute value of the derivative of the inverse transformation. It corrects for the stretching or compression of the density under the mapping .
Chi-Squared Distribution
The distribution of where . More generally, with i.i.d. standard normals. It is a special case of the Gamma distribution: .
Key Takeaway
The CDF method (, then differentiate) is the universal technique for deriving the distribution of a transformed random variable. For monotonic , the change-of-variables shortcut with the Jacobian is faster. For non-monotonic , partition the domain and sum contributions from each monotonic piece.