- Learn
- Mathematics
- Statistics
- Probability Theory
- Transformations of Random Variables
Transformations of Random Variables, Beta and Gamma
IntermediateLesson 6 of 9 in Probability Theory Course
What you will learn
- Derive the PMF, CDF or PDF of a function of one or two random variables with the CDF method, the change-of-variables formula and the Jacobian, and keep track of where the new variables can take values.
- Find distributions with the CDF methodTurn a question about into a question about : add probabilities in the discrete case, and work through the CDF in the continuous case.
- Apply the one-dimensional change-of-variables formulaUse the change-of-variables formula for a strictly monotone, differentiable function, include the absolute derivative and the support, and check the result.
- Transform a pair of random variables with the JacobianFind the joint PDF of two new random variables defined from two old ones, using the Jacobian determinant and the image of the original support.
- Use auxiliary variables, polar coordinates and factorizationFind the distribution of one function of two random variables by adding a helper variable and integrating it out, use polar coordinates for normal pairs, and recognize independence from a factored joint PDF.
- Find distributions with the CDF method
- Compute the distribution of a sum of independent random variables with convolution sums and integrals, and use known families and moment generating functions as shortcuts.
- Convolve discrete distributionsFind the PMF of a sum of independent discrete random variables by adding up every way to reach each total.
- Convolve continuous distributionsCompute the PDF of a sum or difference of independent continuous random variables with the convolution integral, taking its limits from the supports.
- Recognize sums that stay in a named familyUse known results and moment generating functions to identify the distribution of a sum without a full convolution, and check the conditions each result needs.
- Convolve discrete distributions
- Use the beta family on : its density, shapes, moments and integrals, and its role as a distribution for an unknown probability that is updated with binomial data.
- Describe the beta distribution and use beta integralsState the beta PDF, read its shape from the parameters, compute its mean and variance, and evaluate integrals by recognizing beta functions.
- Use the beta as a distribution for an unknown probabilityTreat an unknown success probability as random, update a beta distribution after binomial data, and interpret its parameters as prior counts.
- Describe the beta distribution and use beta integrals
- Use the gamma function and the gamma family, model waiting times in a Poisson process, and connect gamma and beta variables through the bank–post office result.
- Use the gamma function and the gamma distributionEvaluate gamma functions and gamma integrals, state the gamma PDF in the rate form, and compute its moments, scalings and sums.
- Model waiting times in a Poisson processDescribe arrival times in a Poisson process with gamma distributions, link waiting times to Poisson counts, and fit a gamma model from a mean and variance.
- Connect the beta and gamma distributionsDerive the bank–post office result with the Jacobian, and use it to find the beta normalizing constant, the beta mean and other links between the two families.
- Use the gamma function and the gamma distribution
- Find the distributions of the minimum, the maximum and any ranked value of a sample, and recognize beta and exponential patterns in them.
- Find the distribution of the minimum and the maximumDerive the CDF and PDF of the smallest and largest of several random variables, and apply them to lifetimes and reliability.
- Find the distribution of any ranked valueDerive the CDF and PDF of the -th order statistic, show that uniform order statistics are beta, and use joint densities of order statistics.
- Find the distribution of the minimum and the maximum
Transformations of Random Variables study guide
1Find the distribution of a transformed random variable
Transformed quantities include squares, logarithms, sums and ratios. Their distributions depend on which original values lead to each new value and on how the transformation changes interval lengths or areas. Begin with events and the CDF, then use inverse derivatives and Jacobians for densities. Tracking the new support also reveals when transformed variables are independent, and when an apparently simple density still hides dependence.
1.1 Find distributions with the CDF method
A transformation applies a fixed function to a random value. If , its distribution tells us the possible values of and how probability is assigned to them. The support is part of the answer, whether we give a PMF, a CDF or a density.
Add probabilities that land on the same value
For discrete variables, collect every input that produces the desired output:
If is equally likely to be and , then takes values 0, 1 and 4. Only gives 0, so its probability is . Both and 1 give 1, and both and 2 give 4. The last two probabilities are each . The transformed outcomes need not be equally likely even when the original ones are.
Rewrite an event before calculating
The CDF method starts with . Find the output range, solve this inequality for the original variable, and calculate the probability. Differentiate only when the transformed variable has a density.
For and , the output is positive. For ,
The inequality reverses because the transformation decreases. Thus for and for . Differentiation gives on : an exponential distribution with rate 1.
A function can have several input values for one output. For and , the event for is
Its interval length is , while the original interval has length 2. Therefore on this range, with CDF 0 below 0 and 1 above 1. Its density is on . Using only would wrongly include very negative values whose squares exceed .
A normal square and a point mass
For , the same event gives
Here and are the standard normal CDF and PDF. The chain rule gives
This is chi-square with one degree of freedom, also in shape–rate notation.
A continuous input can also produce a discrete output. If and is 1 when and 0 otherwise, each output has probability . Its CDF jumps by at 0 and at 1. Differentiating between these jumps would miss all the probability.
For an expectation alone, LOTUS often saves work: , with a sum in the discrete case. Generally . For the logarithmic example, these are 1 and , respectively.
Key Takeaways
- The CDF method begins with the event .
- All input values that produce the same output contribute probability.
- State the support and complete the CDF outside it.
- A continuous input can produce jumps in the output CDF.
- LOTUS computes expectations without first finding a transformed distribution.
1.2 Apply the one-dimensional change-of-variables formula
A smooth, one-to-one transformation changes interval lengths while preserving their probability. The density must adjust to that change. Solving for the old variable in terms of the new one makes the adjustment visible.
Use the derivative of the inverse
Let , where is differentiable and strictly monotone on the support of , with nonzero derivative. Write . Then
on the image of the original support, and zero elsewhere. A short output interval of length corresponds to an input interval of length about . Multiplying by the input density preserves its probability.
For increasing , the CDF is . For decreasing , it is . Differentiating explains the absolute value: the minus sign in the second case cancels the negative inverse derivative. A density cannot become negative just because a transformation reverses direction.
The practical sequence is: find the output range, invert the transformation, differentiate the inverse, substitute, and check the total area. The final expression must contain only the new variable and fixed parameters.
Convert a waiting time
Suppose measures hours, and measures minutes. The inverse is , so . Hence
This has rate per minute and mean 30 minutes. Substitution into the old density without the derivative would give a function with area 60. In general, for with ,
Applying this to , with and , gives the density.
Logarithms and reciprocals
For with , the inverse is and the inverse derivative is . Thus
This is a log-normal variable: its logarithm is normal. Its mean is , about 1.649, even though exponentiating the normal mean gives 1.
For and , the output range is . Now and , giving on that range. Its area is 1, but its mean is infinite because diverges. A valid density need not have a finite mean.
Add inverse branches
When a transformation is one-to-one only on separate pieces, sum a contribution for every valid root:
For , both and contribute. Each contributes , giving the chi-square density. Using just one branch loses half its probability. The factor in every branch is the inverse derivative, not the forward derivative.
Key Takeaways
- Use after solving for the original variable.
- Transform the support along with the density.
- A decreasing transformation still produces a nonnegative density.
- Add all valid inverse branches for a piecewise monotone transformation.
- The integral of a proposed PDF must equal 1.
- A reciprocal can have a valid PDF and an infinite mean.
1.3 Transform a pair of random variables with the Jacobian
Transforming a pair of variables changes areas as well as coordinates. The Jacobian determinant supplies the area correction. The region where the new pair can occur must be derived separately from the density formula.
Find the inverse and the area factor
Suppose is one-to-one on the original support, has continuous partial derivatives and a nonzero Jacobian determinant. Solve for and . The new joint density is
The matrix inside the determinant is
Its determinant is . The absolute value converts a small area in the new coordinates to its corresponding old area. If it is easier to differentiate the forward map, take the reciprocal of that absolute determinant, then express the result in the new variables.
Work through a normal pair
Let be independent standard normals and define and . Adding and subtracting the equations gives
The inverse determinant is , so the area factor is . Since ,
Every real pair is possible. On this whole-plane support, the expression is a product of two densities, so and are independent. Their variances are 2, matching the sum of the original variances.
For a general invertible linear map represented by a matrix , the density multiplier is . Here the forward matrix has rows and , with determinant . Its reciprocal gives the same factor.
Transform every support constraint
Now take independent and use the same sum and difference. The inverse and area factor stay the same, but the support changes the conclusion. The original constraints become
Equivalently, and . This is a tilted square of area 2. The joint density is inside it and zero outside, so its total probability is 1.
The density is constant within that region, yet the variables are dependent. If , the difference must lie between and 0.1; if , much larger differences are possible. The allowed values of one variable depend on the other.
Here . Zero covariance therefore does not establish independence. Factoring only the nonzero part of a density ignores the constraint that caused the dependence.
A map such as is not one-to-one when both signs occur. One inverse branch is insufficient; split the domain into valid branches before applying the formula.
Key Takeaways
- The joint density uses the absolute inverse Jacobian determinant.
- For a linear map , the multiplier is .
- Translate every original support constraint.
- A constant density on a tilted square can describe dependent variables.
- Zero covariance alone does not establish independence.
1.4 Use auxiliary variables, polar coordinates and factorization
A single function of two variables usually discards information. Adding an auxiliary variable can make the transformation invertible. After finding the joint density, integrate the helper out over the region allowed by the support.
Add a helper to recover both inputs
For , choose . The inverse is and , with absolute determinant 1. Therefore
The limits include only values of compatible with both original variables. Independence is not needed for this joint-density formula; it is needed to replace the joint density by a product of marginals.
For a product of independent variables, again choose . Then and . The absolute determinant is because . The constraints are and , which together give and . Consequently,
Integrating from 0 would include impossible pairs and would diverge. Integrating the resulting density gives on this interval. For example, . Products near zero can arise in many ways, which explains the density's rise near zero.
Use radius and angle for a normal pair
For independent standard normals, the joint density depends on . Set
with and . This angular interval avoids counting each point repeatedly; the origin has probability zero. The inverse Jacobian factor is , giving
The support is a product of the radius interval and the angle interval. Each displayed factor integrates to 1 on its own interval. Thus the angle is uniform, the radius has the Rayleigh density , and radius and angle are independent. Forgetting the factor would lose the area correction.
Also for , so with mean 2. The radius itself is not exponential.
Reverse the construction to simulate normals
Take independent . Set and , then form and . This Box–Muller method reproduces the independent radius and angle above, so its two outputs are independent standard normals.
Factorization proves independence only for the full density, including its support. An expression on a triangle still has a coupled restriction. On a product support, nonnegative factors can be normalized separately to obtain marginal densities. A useful helper also needs to preserve information: choosing can fail when the sign of is needed to invert the map.
Key Takeaways
- Choose a helper that makes the transformation invertible.
- Marginalize using limits obtained from the transformed support.
- Polar coordinates contribute a Jacobian factor .
- For two independent standard normals, radius and angle are independent.
- Box–Muller reverses the polar construction.
- Factorization must include the support.
2Find the distribution of a sum with convolutions
A total can arise from many pairs of component values. Convolution combines those possibilities, using sums for discrete variables and integrals for continuous ones. The supports decide which pairs contribute at each total. Some independent sums stay in familiar families, offering shortcuts through known results or moment generating functions. Conditions such as a common binomial probability or gamma rate decide whether those shortcuts apply.
2.1 Convolve discrete distributions
A sum can reach one total through several pairs of outcomes. Discrete convolution adds the probabilities of all those pairs. Independence lets us calculate each pair's probability by multiplying its two marginal probabilities.
Partition a total into disjoint pairs
For and independent discrete variables,
Once and the total are fixed, the second variable must equal . Different values of give disjoint events, so their probabilities add. Without independence, use inside the sum instead of a product.
For two fair six-sided dice, a total of 4 comes from , and . Each pair has probability , giving . A total of 7 has six possible pairs and probability . The probabilities increase toward 7, then decrease:
The sum is not uniform even though each die is uniform. There is just one way to make 2 and six ways to make 7.
Restrict the summation index
If ranges from 0 to and from 0 to , the index must satisfy both and . Hence
As an example, let independent and be uniform on and . At total 4, the valid pairs are and . Each has probability , so . An index of 0 would require , outside its support. Summing over all integers is also valid when probabilities outside the support are explicitly zero.
Derive the Poisson sum rule
Let and independently. For an integer , convolution gives
Multiply and divide by to recognize a binomial expansion:
Thus . Independent hourly email and call counts with means 2 and 3 give a total with mean 5. Its probability of zero is , and its probability of exactly five is .
Adding PMFs point by point does not describe adding random variables: it does not enumerate pairs. Nor can a variable be treated as an independent copy of itself. If , then takes only 0 and 2. Two independent copies can sum to 1, with probability .
Key Takeaways
- For each total, add the probabilities of every valid pair.
- Independence turns joint probabilities into products.
- The support determines which indices contribute.
- Independent Poisson counts add their parameters.
- Twice one random variable differs from a sum of independent copies.
2.2 Convolve continuous distributions
For continuous variables, convolution integrates over all the ways two values can make a fixed total. Its most important setup step is finding where both density factors are nonzero. These overlap limits often change as the total moves.
Derive and use the integral
For independent continuous and ,
Conditioning on gives . Average this over , then differentiate with respect to to obtain the integral. Equivalently, the transformation has inverse Jacobian factor 1.
Write both supports first. For each fixed , solve their inequalities for . Split the possible totals wherever the overlap changes. Only then integrate. With dependent variables, the corresponding integrand is the joint density .
Add two uniforms
For independent , the restrictions and give
The integrand is 1 over that overlap. When , the interval runs from 0 to , so . When , it runs from to 1, so . The density is zero elsewhere.
The graph is a triangle: extreme totals come from short overlap intervals, and middle totals from long ones. Its area is 1. For example, . Also . Integrating from 0 to 1 for every total would give a false constant density on an interval of length 2.
Add two exponential waits
If are independent variables, positive inputs require . For ,
This is . Integration gives the survival probability . Two independent batteries used one after the other, each with mean lifetime 1000 hours, give rate per hour and total mean 2000 hours. The probability that their total exceeds 2000 hours is . A sum of two exponential waits is not itself exponential.
Subtract independent variables
For , the second input must equal , giving
For independent exponentials with the same rate and , the overlap is . Integration gives . Symmetry between and then yields
This is the Laplace density. The difference can be negative even though both inputs are positive; its support must include both signs.
Key Takeaways
- Continuous convolution integrates the product of shifted densities.
- Solve both support restrictions before integrating.
- Two independent unit uniforms have a triangular sum density.
- Two independent equal-rate exponentials sum to a shape-2 gamma.
- For a difference, use and recheck the limits.
- Dependent inputs require their joint density in the integral.
2.3 Recognize sums that stay in a named family
A named family can turn a long convolution into a short identification. Each shortcut has conditions. Check those conditions before adding parameters, and check the resulting mean and variance afterward.
Multiply moment generating functions
The moment generating function, or MGF, is . For independent variables,
When these functions are finite on an open interval around zero, the MGF determines the distribution. Recognizing the product as a known MGF identifies the sum. For example, an exponential with rate has MGF for . Multiplying independent copies gives , the MGF of .
Know which parameters add
All the following rules assume independence.
| Inputs | Distribution of the sum | Additional condition |
|---|---|---|
| Poisson | Poisson with the sum of the parameters | None |
| Binomial | Binomial with the sum of the trial counts | Same success probability |
| Normal | Normal with the sum of the means and variances | None |
| Gamma | Gamma with the sum of the shapes | Same rate |
| Chi-square | Chi-square with the sum of the degrees of freedom | None |
For independent normal lengths mm and mm, the total is mm. Its standard deviation is mm, not 0.7 mm. The probability of exceeding 81 mm becomes after standardizing.
Check a tempting shortcut
Independent Bernoulli variables with probabilities 0.2 and 0.8 have a sum with mean 1 and variance . A variable has the same mean but variance 0.5, so the sum cannot have that binomial distribution. Equal average success probability is insufficient; the trial probabilities must match.
Likewise, independent gamma variables with different rates do not combine by adding shapes and retaining one rate. Their MGFs have different denominators and do not collapse to the common-rate form.
Normal marginal distributions alone are insufficient when independence is absent. Take and an independent random sign with equally likely values and 1. Then is also standard normal, but with probability . That sum has a point mass and is not normal.
Separate scaling from independent addition
For one standard normal , . The sum of two independent standard normals is . Scaling multiplies variance by the square of the multiplier; independent addition adds variances. Similarly, doubling a Poisson variable gives only even values, so it is not Poisson.
Means always add when they exist, even under dependence. For finite variances,
Zero covariance is enough for variance addition, while the named-family rules above use independence. Matching moments can reject a false candidate, but matching just the mean and variance does not identify a distribution.
Key Takeaways
- MGFs multiply for independent sums and identify distributions when finite near zero.
- Binomial sums need a common success probability.
- Gamma sums need a common rate.
- For independent normal sums, add variances before taking a square root.
- Scaling one variable changes its variance differently from summing independent copies.
- Moment checks can reject a proposed distribution.
3Model proportions and unknown probabilities with the beta distribution
Proportions and probabilities lie between zero and one, but their uncertainty can have many shapes. The beta family can be flat, concentrated in the middle or high near the endpoints. Its integrals and moments are manageable through the beta function. A beta distribution can also describe an unknown success probability, allowing binomial observations to update that uncertainty through simple changes to its two parameters.
3.1 Describe the beta distribution and use beta integrals
A beta variable lies between 0 and 1, making the family useful for proportions and uncertain probabilities. Its two positive shape parameters control how the density behaves near the two ends of that interval.
Read the density and its shape
For , the distribution has density
and zero elsewhere. The beta function supplies the normalizing constant. The parameters need not be integers.
When , the density is symmetric around . It is uniform for , has a central hump for equal parameters above 1, and has a U shape for equal parameters below 1. A parameter below 1 makes the density unbounded at its associated endpoint: at 0 and at 1. This remains compatible with a finite total area. If , the mean exceeds ; if , it is below .
The moments are
Writing the variance as shows that, at a fixed mean , a larger parameter sum means greater concentration. For instance, and both have mean 0.2, but their variances are about 0.0145 and 0.0016. When both parameters exceed 1, the mode is ; this interior-mode formula does not apply to a U-shaped beta.
Normalize and integrate an example
The beta–gamma identity is
For positive integers it becomes . Thus and a variable has density . Its mean is , variance and mode . The exponents are one less than the parameters.
For a probability, integrate over the requested interval:
The normalizing beta function integrates over the whole interval; it does not by itself give this partial-interval probability.
Recognize powers instead of expanding them
An integral equals when . For example,
Moments use the same recognition: when the integral exists. For , this gives , confirming .
Reflection swaps the two parameters: if , then . Substituting exchanges the powers of and , with inverse derivative of absolute value 1.
Key Takeaways
- The beta density has exponents and on .
- The mean is .
- At a fixed mean, increasing reduces the variance.
- Recognize beta integrals by adding 1 to each exponent.
- Reflecting a beta variable swaps its parameters.
3.2 Use the beta as a distribution for an unknown probability
An unknown success probability can be represented by a distribution on . The beta family expresses uncertainty about that fixed probability. Observations change the distribution describing our uncertainty; they do not require the underlying probability to change after every trial.
Separate the probability from the count
Given , suppose . The count is discrete, while is the unknown parameter. A prior distribution describes uncertainty before these observations. A posterior describes it after the observations.
If the prior is and the observed count is , multiply the likelihood by the prior density:
Factors independent of are absorbed into normalization. The remaining expression is a beta kernel, so
Successes add to the first parameter; failures add to the second. This return to the same family is conjugacy. The second parameter receives , not the entire trial count .
Interpret the posterior mean
A uniform prior and 7 successes in 10 trials give . Its mean is , between the prior mean 0.5 and the observed fraction 0.7. A prior with the same observations gives and mean . Its larger initial parameter sum puts more weight on 0.5.
For , the general posterior mean can be written
The weights are nonnegative and add to 1. The parameter sum acts as a prior sample size in this weighted-average interpretation. As the amount of data grows, the observed proportion receives more weight. The parameters need not be literal historical counts or whole numbers.
Updating in stages gives the same answer as pooling the observations. Starting at , 3 successes and 1 failure give . A further 4 successes and 2 failures give . The final parameters reflect all 7 successes and all 3 failures.
Explain a uniform distribution of counts
In Bayes' billiards, the first ball lands at a uniform position in . Each of later independent uniform balls lies to its left with probability . Conditional on , that left-hand count is binomial.
Across all possible first-ball positions, the first ball is equally likely to occupy any of the ranks. Its rank minus 1 is the number of later balls to its left. Therefore every count has probability . The integral confirms it:
This is a marginal distribution over counts after averaging over . For a fixed known , the binomial counts are generally not equally likely.
Key Takeaways
- A beta prior describes uncertainty about a fixed unknown probability.
- Add successes to the first parameter and failures to the second.
- The posterior mean weights the prior mean and observed proportion.
- Updating in stages and updating with pooled counts agree.
- Bayes’ billiards gives uniform marginal counts under a uniform prior.
4Work with the gamma distribution and its link to the beta
Positive waiting times connect the gamma function, exponential gaps and Poisson counts. Shape and rate determine the gamma density and its moments; scale expresses the same family with a reciprocal parameter. Independent gamma variables with a common rate give a further link: their total is gamma, their share is beta, and total and share are independent. A Jacobian derivation explains both the beta normalizer and this independence.
4.1 Use the gamma function and the gamma distribution
The gamma family models positive quantities and includes exponential and chi-square distributions. Its shape can be any positive real number. A second parameter sets the rate, so its meaning must stay explicit when comparing formulas or software.
Extend factorials with the gamma function
For ,
Integration by parts gives . Since , positive integers satisfy . In particular, , not 120. Also , so .
Substituting gives a useful integral:
For example, . Match the power to before using the formula.
Use the shape–rate density
For shape and rate ,
Its mean is and variance is . Shape 1 gives . Below shape 1, the density is unbounded near zero and decreases; at shape 1 it decreases from a finite value. Above shape 1, it rises to a peak at and then falls. Larger shapes reduce the right skew.
Multiplying the density by and recognizing a gamma integral yields
For , the mean is 1.5, the variance is 0.75 and . For , the same formula gives ; the reciprocal mean is not generally the reciprocal of the mean.
Keep rate and scale distinct
The scale is . In scale notation the density has denominator and exponential factor .
| Convention | Mean | Variance |
|---|---|---|
| Shape , rate | ||
| Shape , scale |
Thus shape 3 and second parameter 2 mean 1.5 under a rate convention and 6 under a scale convention. R's dgamma accepts rate or scale; SciPy's stats.gamma uses scale.
For , scaling a shape–rate gamma gives . Converting hours to minutes multiplies the time by 60 and divides its rate by 60.
Recognize sums and chi-square
The MGF is for . Independent gamma variables with a common rate therefore add their shapes. The sum of squares of independent standard normals is , with mean and variance .
Key Takeaways
- The gamma recurrence gives .
- Match a gamma integral’s power to .
- A shape–rate gamma has mean and variance .
- Scale equals the reciprocal of rate.
- Positive scaling divides the rate by the multiplier.
- Independent common-rate gamma variables add their shapes.
- Chi-square with degrees of freedom is .
4.2 Model waiting times in a Poisson process
Counts and waiting times describe the same arrival process from different directions. A Poisson count asks how many events have happened by a time. A gamma waiting time asks when a specified event occurs.
Build an arrival time from gaps
A Poisson process with rate has counts in every interval of length and independent counts in disjoint intervals. The gaps between consecutive arrivals are independent variables.
Starting at time zero, the time of the -th arrival is the sum of gaps. Thus
Its mean is and variance . The first arrival is exponential. Later arrival times are gamma with an integer shape, also called Erlang distributions.
Translate a time event into a count event
The event means the -th arrival has not happened by time . Equivalently, fewer than arrivals have occurred:
Consequently,
The final count is . Including would count cases where the required arrival has already occurred. For the complementary event , use .
Suppose customers arrive at rate 3 per hour. The second arrival has mean hour, or 40 minutes, and standard deviation hour, about 28 minutes. The probability it occurs after one hour is
For the third arrival within half an hour, the count mean is . Therefore
The process rate stays 3 per hour; the count parameter changes to rate times interval length.
Distinguish a total wait from a single gap
For , is not exponential or memoryless. Several arrivals are needed, so its density starts at zero. An exponential with the same mean would have variance , which is larger than the actual .
Waiting for arrivals and then more explains why independent integer-shape gamma waits with a common rate add their shapes. The total waits for arrivals in the same process.
Match a positive model to moments
A gamma with a noninteger shape remains a valid distribution, although its shape is not an arrival count. For a positive mean and variance , solve and to get
For and , the matching parameters are shape 4 and rate 0.4. The mean is measured in the original unit, the variance in its square, and the rate in the reciprocal unit.
Key Takeaways
- The -th Poisson arrival time is .
- Use exactly when .
- The Poisson count parameter is .
- Arrival times after the first are not memoryless.
- Moment matching gives shape and rate .
4.3 Connect the beta and gamma distributions
Two independent gamma variables with a common rate contain two kinds of information: their total and the fraction contributed by one component. Transforming to these coordinates reveals the beta distribution and an independence result.
Transform total and share together
Let and independently. Define and . Their inverse map is
The inverse Jacobian matrix has rows and . Its determinant is , so the density multiplier is . Substituting into the product of the original gamma densities gives
The extra power of comes from the Jacobian. Without it, the candidate total would have the wrong shape.
Factor the density on its full support
Insert in the numerator and denominator to separate the expression:
The first factor is the density. The support is the product , so the second factor is the marginal density of and the two variables are independent. Normalizing that second factor proves
This is the bank–post office result. The common rate cancels from the fraction's distribution.
Use independence to find a mean
Since and are independent,
Hence . Dividing two expectations is not a general rule for the expectation of a ratio; the independence of total and share justifies it here.
For independent waits minutes and minutes, the total is with mean 25 minutes. The fraction spent in the first wait is , with mean 0.4 and variance 0.04. Learning the total does not change the fraction's distribution. The first wait and the total themselves are dependent.
Recognize special cases and limits
Two independent equal-rate exponentials give a uniform share and a shape-2 gamma total. Two independent standard-normal squares each have shape and rate , so their first-square share is , the arcsine distribution. Its beta normalizer is .
The construction also simulates a beta variable: generate independent common-rate gammas with the desired shapes and divide the first by their sum. Different rates introduce a term coupling total and share, so the beta result and total–share independence no longer hold.
Key Takeaways
- Independent common-rate gammas give a gamma total and a beta share.
- Total and share are independent.
- The inverse Jacobian factor for total and share is .
- Normalization proves the beta–gamma identity.
- Total–share independence yields the beta mean.
- The result requires both independence and a common rate.
5Find the distributions of order statistics
The smallest, largest and middle observations have distributions created by sorting a sample. Threshold events for these ranks become statements about all observations or about a binomial count. Those statements yield CDFs and densities, connect uniform ranks to beta distributions, and describe first and last failures. Joint densities and exponential gaps let you study ranges and system lifetimes without treating the sorted observations as independent.
5.1 Find the distribution of the minimum and the maximum
Order statistics are the values of a sample sorted from smallest to largest. Write them as . Sorting creates dependence: knowing a minimum restricts every other ranked value. For an i.i.d. continuous sample, ties have probability zero.
Start with an event about every observation
The maximum is at most exactly when all observations are at most . If their common CDF is , independence gives
For the minimum, it is simpler to begin with survival: the minimum exceeds exactly when every observation does. Hence
For independent observations with different distributions, multiply their individual CDFs for a maximum and their individual survival functions for a minimum. Identical distributions are not needed for those product rules; independence is.
If the common distribution has density , differentiate to get
A PDF is not a probability of being below a threshold. Raising to a power does not give the maximum's density.
Apply the uniform and discrete formulas
For independent observations, the maximum has CDF on and mean . The minimum has CDF and mean . With four observations, the probability the maximum is at most 0.9 is , and its mean is 0.8.
CDF products also work for discrete variables, where ties can occur. For two independent fair dice, the probability the maximum is at most 4 is . To get exactly 4, subtract the probability that it is at most 3:
Model the first and last failures
Independent exponential lifetimes with rates give minimum survival . Thus the first failure is exponential with the sum of the rates. Component is first with probability .
For three independent components each with mean lifetime 5 years, a series system stops at the first failure. Its rate is 0.6 per year and mean years. A parallel system works until the last failure. Its probability of lasting beyond 10 years is
The same components produce different system lifetimes because the operating rule selects a different order statistic.
Use exponential gaps for the maximum's mean
For independent lifetimes, the first failure gap has rate . Memorylessness leaves fresh exponential waits, so the next gap has rate . The successive gaps are independent, down to a final rate . Adding their means gives
For the three-component parallel system this is years. Adding these gap means does not require treating the ranked lifetimes themselves as independent.
Key Takeaways
- Maximum CDFs multiply under independence.
- Minimum survival functions multiply under independence.
- Differentiate a CDF to obtain an extreme-value density.
- Discrete point probabilities come from CDF differences.
- Independent exponential minimum rates add.
- Independent exponential gaps give the maximum’s mean.
5.2 Find the distribution of any ranked value
An interior order statistic asks how a value ranks within the whole sample. Its distribution follows by counting how many observations fall below a threshold. This connects order statistics to binomial counts and, for uniform samples, to beta densities.
Turn a rank event into a count event
For an i.i.d. sample of size with CDF , the event means at least observations are at most . That count is , so
The tail starts at , not at . With fewer than observations below the threshold, the -th smallest must still lie above it.
For a continuous sample, the density is
To see the coefficient, choose the observation in a tiny interval near in ways. Choose which of the remaining observations fall below it in ways. The others fall above it. The small-interval probability contributes .
Identify uniform ranks as beta
For independent variables, and inside the support. Therefore
The parameters sum to . The sample points split into gaps, each with expected length . The expected -th position is the sum of the first gap lengths.
The median of five uniform observations is . It has density , mean and variance . For a threshold of , the binomial tail gives
The median being below a quarter needs at least three sample values there, not merely one.
Transfer the result through a continuous CDF
For a continuous CDF , the probability integral transform makes the values independent uniforms. Applying the same nondecreasing function preserves their order, giving
For any continuous population with median , the sample minimum and maximum enclose unless all observations fall on the same side. That probability is , or 0.9375 when .
Work with more than one ranked value
The full ordered sample has joint density on . The factor counts the original orderings. For , the minimum and maximum have joint density
For uniforms the range is with mean . These joint densities retain ordering restrictions; multiplying the separate marginal densities would incorrectly treat the ranks as independent.
Key Takeaways
- A rank threshold is a binomial tail event.
- The density coefficient counts the choices of observations below and at the rank.
- Uniform rank has parameters .
- A continuous CDF maps ranked observations to beta variables.
- Joint order-statistic densities include ordering constraints.
- The uniform sample range is for .
Transformations of Random Variables examples
1Find a distribution after changing variables
20 steps
- 1IntroductionKeep probability while changing coordinates
A transformation changes the values you observe, but the probabilities still come from the original variables. Begin by asking which inputs can produce each output.
For a single output, rewrite a CDF event or use an inverse derivative. For a pair, correct areas with a Jacobian. In both cases, the output support is part of the distribution.
- 2ExampleCollect inputs with the same square
Suppose is equally likely to be and set . The possible outputs are 0, 1 and 4.
The output 0 comes from one input, while 1 and 4 each come from two inputs. Their probabilities are . Transforming the values does not make the new outcomes equally likely; add every original probability that lands on the same output.
- 3ExampleRewrite a continuous square event
Now let and . The output lies between 0 and 1. For a threshold within that range,
The allowed interval has length inside an input interval of length 2. Thus . Both ends of the input interval matter because both signs can have a large square.
- 4ExampleFinish the CDF, then differentiate
Complete the square's CDF with 0 below 0 and 1 above 1. Inside the range, differentiating gives
The density increases without bound near zero, but its integral is 1. A density is a height, so an unbounded height at an endpoint can still enclose finite probability.
- 5ChallengeCan a continuous input give two outputs?
Let . Set when and otherwise. What does the CDF look like?
---reveal---
It jumps from 0 to 0.7 at 0 and from 0.7 to 1 at 1. The jump heights are the probabilities of the two outputs. Although the input is continuous, the output is Bernoulli with success probability 0.3; differentiating between jumps would miss both point masses.
- 6ExplanationCorrect the changed interval length
For a differentiable strictly monotone transformation with nonzero derivative, solve for . Then use
The inverse derivative tells how much input interval corresponds to one unit of output interval. Its absolute value keeps the density positive for decreasing maps. Write the formula only on the transformed support.
- 7ExampleConvert hours into minutes
Let measure hours and measure minutes. Solving gives and derivative .
Substitution and the derivative together give for . This is rate per minute and mean 30 minutes. Leaving out the derivative would make the density's area 60.
- 8ChallengeCount the branches that remain valid
If and , how many inverse branches contribute at and at ?
---reveal---
At , both roots and lie in the input support. At , only lies there; is too large. Each valid root contributes , so the density changes formula when the positive branch leaves the support.
- 9ExampleInvert sum and difference
For independent standard normals , define and . Adding the equations gives ; subtracting gives .
The inverse derivative matrix has rows and . Its determinant is , so the density multiplier is . The forward determinant would be and must be inverted.
- 10ExampleSubstitute and factor the normal density
The squared inputs satisfy . Substituting into the original joint normal density and multiplying by gives
Its support is the whole plane. The formula factors into two densities on that product support, proving that the sum and difference are independent.
- 11Key InsightWatch the support change the answer
Use the same map with independent unit uniforms. Its inverse factor is still , but the support is now
This is a tilted square. When the sum is close to zero, the difference must also be close to zero, so the outputs are dependent. Their covariance is zero, showing why zero covariance alone cannot establish independence.
- 12ChallengeChoose the density multiplier
An invertible linear map is . What multiplies the original density after evaluating it at the inverse image?
---reveal---
The forward matrix determinant is , so the multiplier is . The density compensates for threefold area expansion. You must also transform the support; the determinant alone does not tell which output pairs can occur.
- 13ExampleKeep one input as a helper
To find the product for independent unit uniforms, add . Now both inputs are recoverable:
The inverse determinant is , so the factor is on the positive support. The original joint density is 1, making the transformed joint density wherever these reconstructed inputs both lie in .
- 14ExampleIntegrate over the allowed helper values
The reconstructed inputs require and . For positive these combine into and .
Therefore . The lower limit depends on the target value. Integrating from zero would include values that force and would produce a divergent integral instead of a PDF.
- 15ExplanationUse radius and angle for circular symmetry
For independent standard normals, write with and . The original exponent becomes .
The area correction is , so . A small angular interval sweeps more area farther from the origin; the Jacobian records that increase.
- 16ConnectionSeparate angle from squared radius
The polar density factors on a product support. The angle is uniform on , and the radius has density for , independently.
Its tail is . Thus : the squared radius is exponential with rate . This is also chi-square with two degrees of freedom.
- 17ConnectionReverse the construction with Box–Muller
Generate independent unit uniforms . Set and , then output and .
The logarithm produces the exponential squared radius, and the square root produces the radius. Independence of the two uniforms gives independent radius and angle. The resulting Cartesian outputs are independent standard normals.
- 18ChallengeCheck a claimed factorization
A joint density equals for and zero elsewhere. Does the expression's lack of prove independence?
---reveal---
No. Given , the allowed values satisfy . The full density includes that coupled support, which cannot factor into one function of times one of . A formula that looks separable only inside a triangle is insufficient.
- 19ChallengeCombine a product transformation with a CDF
For the product of independent unit uniforms, use to find for .
---reveal---
Integration gives , since at zero. The inverse-map calculation supplied the density and its support; integrating only over the requested output interval supplies the probability. At the expression reaches 1, consistent with the full support.
- 20RecapChoose the calculation that matches the output
Use CDF events to collect inputs, inverse derivatives to correct lengths, and inverse Jacobians to correct areas. A helper variable restores enough information to invert a map before marginalization. Every calculation carries its transformed support, including any restriction needed when testing independence.
2Build sums from compatible inputs
14 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionA total has many possible decompositions
- 2ExampleList the pairs for one total
- 3ExampleRecognize the Poisson expansion
- 4ChallengeDistinguish doubling from convolution
- 5ExplanationFind the continuous overlap
- 6ExampleIntegrate the two pieces
- 7ExampleAdd exponential waits
- 8ConnectionAllow negative differences
- 9ChallengeFind an overlap for unequal uniforms
- 10ExplanationMultiply MGFs to identify the sum
- 11ExampleAdd variances before taking a square root
- 12TipMatch the conditions before the parameters
- 13ChallengeAlign rates before adding
- 14RecapLet the support and conditions guide the work
3Read beta shapes and update an unknown probability
11 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionUse a flexible family between zero and one
- 2ExplanationRead shapes from the powers
- 3Key InsightSee what each parameter changes
- 4ExampleNormalize a beta density
- 5ExampleUse beta integrals for moments
- 6ChallengeCompare mean and concentration
- 7ExplanationMultiply uncertainty by evidence
- 8ExampleUpdate success and failure counts
- 9Key InsightInterpret the weights
- 10ChallengeConnect a count, an update, and a rank
- 11RecapKeep the two kinds of uncertainty distinct
4Connect gamma waits to beta shares
17 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionConnect positive values, arrivals, and shares
- 2ExplanationApply the gamma recurrence
- 3ExplanationRecognize a gamma integral and density
- 4ExampleFind moments without a new integral
- 5TipCheck whether a parameter is rate or scale
- 6ChallengeUse the rate convention in a new unit
- 7ExplanationBuild arrival times from exponential gaps
- 8ExampleRead a wait as a count event
- 9ChallengeChoose the correct count tail
- 10ConnectionFit a gamma beyond integer arrival counts
- 11ExampleRecover the original values from total and share
- 12ExampleSee the density separate
- 13Key InsightDerive the normalizer and mean
- 14ExampleInterpret the bank–post office waits
- 15ChallengeUse a fixed total
- 16ChallengeConnect normal squares to a beta share
- 17RecapRead each parameter through its role
5Find probabilities for sorted samples
15 steps
Save this lesson to follow every Walkthrough step by step.
- 1IntroductionSorting changes the distributions
- 2ExplanationMake the maximum event about everyone
- 3ExampleDifferentiate the extreme CDFs
- 4ConnectionUse CDF differences for discrete extremes
- 5ChallengeChoose the lifetime selected by the system
- 6Key InsightAdd exponential spacings
- 7ExplanationTurn an interior rank into a binomial count
- 8ExplanationCount the density coefficient
- 9ConnectionIdentify the beta law of a uniform rank
- 10ExampleCalculate a median probability
- 11ChallengeRecover a missing beta parameter
- 12ConnectionTransform ranks with a continuous CDF
- 13ExplanationKeep joint ordering restrictions
- 14ChallengeCompare a range with a maximum
- 15RecapTranslate a rank into a sample event
Transformations of Random Variables practice questions
Set 1: Transform values, combine counts, and read distributions10 Practice Questions
Question 1 of 10
Show answerHide answer
Question 2 of 10
Show answerHide answer
Question 3 of 10
Show answerHide answer
Question 4 of 10
Show answerHide answer
Question 5 of 10
Show answerHide answer
Question 6 of 10
Show answerHide answer
Question 7 of 10
Show answerHide answer
Question 8 of 10
Show answerHide answer
Question 9 of 10
Show answerHide answer
Question 10 of 10
Show answerHide answer
Set 2: Track support and connect totals to ranks10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 3: Choose a method and check its conditions10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 4: Combine transformations, updates, and sample extremes10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Set 5: Transfer the methods to conditional and linked problems10 Practice Questions
Save this lesson to see every answer and practice every set.
Question 1 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 2 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 3 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 4 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 5 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 6 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 7 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 8 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 9 of 10
Show answerHide answer
Save this lesson to see this answer.
Question 10 of 10
Show answerHide answer
Save this lesson to see this answer.
Stuck on your own question? Homework Help
Key Terms
A
Arcsine distribution
Arrival time
Auxiliary variable
B
Bank–post office result
Beta distribution
Beta function
Beta kernel
Beta–gamma identity
Binomial tail
Box–Muller method
C
CDF method
Chi-square distribution
Closure under sums
Common rate
Compatible pair
Concentration
Conjugacy
Continuous convolution
Convolution index
D
Discrete convolution
E
Exponential race
Exponential spacing
G
Gamma distribution
Gamma function
I
Image of a support
Independent copy
Interarrival time
Inverse branch
Inverse function
J
Jacobian determinant
Jacobian matrix
Joint density of order statistics
L
Laplace distribution
Likelihood
Log-normal distribution
LOTUS
M
Marginalization
Memorylessness
Mode
Moment generating function
Moment matching
O
Order statistic
Overlap limits
P
Point mass
Poisson process
Polar coordinates
Posterior distribution
Prior distribution
Prior sample size
Probability integral transform
Product support
R
Rate parameter
Rayleigh distribution
Reflection
S
Sample maximum
Sample median
Sample minimum
Sample range
Scale parameter
Shape parameter
Strictly monotone function
Support
Survival function
T
Total–share transformation
Transformation
Triangular density
U
Uncorrelated variables
Uniform order statistic
V
Variance addition
About this lesson
Make your own Study Materials
Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.