Docsity

Random Variables and Probability Distributions: A Comprehensive Guide, Summaries of Probability and Statistics

Toggle sidebar
bg1
Random Variables and Probability
Distributions
Random Variables and Distributions
This chapter defines random variables, distribution functions, probability
functions, and density functions. It also develops the concepts needed to
perform calculations for a probability model using these entities.
Conditional distributions of random variables provide a framework for
discussing relationships between variables, which is important in
probability and statistics applications.
Random Variables
A random variable is a function from a sample space S to the set of real
numbers (R1). It can be constant or correspond to counting a random
quantity.
A random variable can be written formally as X : {rain, snow, clear} → R1,
where X(rain) = 3, X(snow) = 6, and X(clear) = −2.7.
If the sample space involves flipping three coins, X could be the number of
heads, Y the number of tails, and Z could be 0 if there's one head and 17
otherwise.
If the sample space involves rolling two dice, X could be the square of the
first die's number, Y the square of the second die's number, Z the sum, W
the square of the sum, and R the sum of the squares.
A constant value c can be a random variable where c(s) = c for all s ∈ S. For
example, 5 is a random variable.
The indicator function IA is a random variable defined as IA(s) = 1 if s ∈ A
and 0 if s ∉ A.
Arithmetic operations can be performed on random variables. If Z = X + Y,
then Z(s) = X(s) + Y(s). If X = Y, then X(s) = Y(s) for all s ∈ S. Similarly, X ≤
Y means X(s) ≤ Y(s) for all s ∈ S.
Consider rolling a fair six-sided die, where S = {1, 2, 3, 4, 5, 6}. Let X(s) =
s and Y(s) = s + 3. Then Z = X * Y, so Z(s) = s2 + 3s.
Consider rolling a fair six-sided die, with S = {1, 2, 3, 4, 5, 6}. Let X(s) = s,
and let Y = X + I{6}. Then Y(s) = s if s ≤ 5, and Y(s) = 7 if s = 6.
The probabilities associated with a random variable X are called the
distribution of X.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Random Variables and Probability Distributions: A Comprehensive Guide and more Summaries Probability and Statistics in PDF only on Docsity!

Random Variables and Probability

Distributions

Random Variables and Distributions

This chapter defines random variables, distribution functions, probability functions, and density functions. It also develops the concepts needed to perform calculations for a probability model using these entities. Conditional distributions of random variables provide a framework for discussing relationships between variables, which is important in probability and statistics applications.

Random Variables

A random variable is a function from a sample space S to the set of real numbers (R1). It can be constant or correspond to counting a random quantity.

A random variable can be written formally as X : {rain, snow, clear} → R1, where X(rain) = 3, X(snow) = 6, and X(clear) = −2.7.

If the sample space involves flipping three coins, X could be the number of heads, Y the number of tails, and Z could be 0 if there's one head and 17 otherwise.

If the sample space involves rolling two dice, X could be the square of the first die's number, Y the square of the second die's number, Z the sum, W the square of the sum, and R the sum of the squares.

A constant value c can be a random variable where c(s) = c for all s ∈ S. For example, 5 is a random variable.

The indicator function IA is a random variable defined as IA(s) = 1 if s ∈ A and 0 if s ∉ A.

Arithmetic operations can be performed on random variables. If Z = X + Y, then Z(s) = X(s) + Y(s). If X = Y, then X(s) = Y(s) for all s ∈ S. Similarly, X ≤ Y means X(s) ≤ Y(s) for all s ∈ S.

Consider rolling a fair six-sided die, where S = {1, 2, 3, 4, 5, 6}. Let X(s) = s and Y(s) = s + 3. Then Z = X * Y, so Z(s) = s2 + 3s.

Consider rolling a fair six-sided die, with S = {1, 2, 3, 4, 5, 6}. Let X(s) = s, and let Y = X + I{6}. Then Y(s) = s if s ≤ 5, and Y(s) = 7 if s = 6.

The probabilities associated with a random variable X are called the distribution of X.

Distributions of Random Variables

The value of a random variable is random because it's a function of a random outcome s. The probability that X equals a particular value x depends on the probability of the outcome s such that X(s) = x.

Consider S = {rain, snow, clear}, with X(rain) = 3, X(snow) = 6, and X(clear) = −2.7. If P(rain) = 0.4, P(snow) = 0.15, and P(clear) = 0.45, then P(X = 3) = 0.4, P(X = 6) = 0.15, and P(X = −2.7) = 0.45. P(X = x) = 0 for all x ∉ {3, 6, −2.7}.

The distribution of X is the collection of probabilities P(X ∈ B) for all subsets B of real numbers.

Consider S = {rain, snow, clear}, with X(rain) = 3, X(snow) = 6, and X(clear) = −2.7. If B = (4, 7), then P(X ∈ B) = P(X = 6) = P(snow) = 0.15.

Consider S = {rain, snow, clear}, P(rain) = 0.4, P(snow) = 0.15, and P(clear) = 0.45. Let Y(rain) = 3, Y(snow) = 3, and Y(clear) = −2.7. Then P(Y = 3) = P(rain) + P(snow) = 0.55, and P(Y = −2.7) = P(clear) = 0.45.

Simpler functions, like cumulative distribution functions, probability functions, and density functions, help track probability distributions.

Discrete Distributions

For many random variables X, P(X = x) > 0 for certain x values. If Σ P(X = x) = 1, then all probability is found from the probability that X equals particular values.

A random variable X is discrete if Σ P(X = x) = 1.

A discrete random variable X takes on a finite or countably infinite number of values x1, x2, x3,... , with probabilities p1, p2, p3,... , where P(X = xi) = pi and Σ pi = 1.

For a discrete random variable X, its probability function is pX(x) = P(X = x).

Theorem 2.3.1 (Law of total probability, discrete random variable version): Let X be a discrete random variable, and let A be some event. Then P(A) = Σ P(X = x) P(A | X = x).

A constant c is discrete, with pc(c) = 1 and pc(x) = 0 for x ≠ c. The distribution of c is called a point mass, point distribution, or degenerate distribution.

Let X = 1 if a coin is heads and X = 0 if tails. Then pX(1) = P(X = 1) = θ, and pX(0) = P(X = 0) = 1 − θ. X has the Bernoulli(θ) distribution, written as X ∼ Bernoulli(θ).

Let X be the total number of heads showing in n independent coin flips, each with probability θ of heads. Then P(X = x) = (n choose x) * θx * (1 −

Continuous Distributions

A random variable X is continuous if P(X = x) = 0 for all x in the real numbers.

The Uniform[0, 1] distribution is defined such that for 0 ≤ a ≤ b ≤ 1, P(a ≤ X ≤ b) = b - a, with P(X < 0) = P(X > 1) = 0.

For continuous distributions, probabilities cannot be simply added up as with discrete variables. Instead, probabilities are calculated using integrals.

P(a ≤ X ≤ b) = integral from a to b of f(x) dx

where f(x) is a density function. A function f is a density function if f(x) ≥ 0 for all x and the integral of f(x) from -∞ to ∞ equals 1.

A random variable X is absolutely continuous if there exists a density function f such that P(a ≤ X ≤ b) = integral from a to b of f(x) dx.

Theorem 2.4.1: If X is an absolutely continuous random variable, then X is a continuous random variable, meaning P(X = a) = 0 for all a in the real numbers.

The Uniform[L, R] distribution has a density function f(x) = 1/(R-L) for L < x < R, and 0 otherwise.

The Exponential(1) distribution has a density function f(x) = e^(-x) for x > 0, and 0 otherwise. P(a ≤ X ≤ b) = integral from a to b of e^(-x) dx = e^(-a)

  • e^(-b).

The Exponential(λ) distribution has a density function f(x) = λe^(-λx) for x

0, and 0 otherwise. P(a ≤ X ≤ b) = integral from a to b of λe^(-λx) dx = e^(-λa) - e^(-λb).

The Gamma(α, λ) distribution has a density function f(x) = (λ^α * x^(α-1) / Γ(α)) * e^(-λx) for x > 0, and 0 for x ≤ 0, where Γ(α) is the gamma function.

The N(0, 1) distribution (standard normal distribution) has a density function φ(x) = (1 / √(2π)) * e^(-x^2 / 2).

The N(μ, σ^2) distribution has a density function f(x) = (1 / (σ√(2π))) * e^(- (x-μ)^2 / (2σ^2)).

Density functions are not unique.

Important absolutely continuous distributions include the uniform, exponential, gamma, and normal.

Cumulative Distribution Functions

The cumulative distribution function (CDF) of a random variable X , denoted as FX(x), is defined as FX(x) = P(X ≤ x). The full distribution of X can be determined directly from FX.

For a left-open interval (a, b], P(X ∈ (a, b]) = FX(b) - FX(a).

For a closed interval [a, b], P(X ∈ [a, b]) = FX(b) - FX(a-) + P(X = a).

P(X = a) = FX(a) - FX(a-).

For an open interval (a, b), P(X ∈ (a, b)) = FX(b-) - FX(a).

Theorem 2.5.1: The cumulative distribution function FX determines P(X ∈ B) for all relevant subsets B.

Theorem 2.5.2: Let FX be the cumulative distribution function of a random variable X. Then:

(a) 0 ≤ FX(x) ≤ 1 for all x. (b) FX(x) ≤ FX(y) if x ≤ y (FX is nondecreasing). (c) lim (x→-∞) FX(x) = 0. (d) lim (x→∞) FX(x) = 1. (e) FX is right continuous.

Theorem 2.5.3: Let X be a discrete random variable with probability function pX.

Cumulative Distribution Functions

Definition and Properties

The cumulative distribution function (CDF) of a random variable X, denoted by FX(x), gives the probability that X takes on a value less than or equal to x. Mathematically, FX(x) = P(X ≤ x). For a discrete random variable, the CDF is the sum of probabilities of all possible values xi less than or equal to x: FX(x) = Σxi≤x P(X = xi) = Σy≤x P(X = y). The CDF of a discrete random variable is piecewise constant, with jumps at each value xi. The size of the jump at xi is equal to pX(xi), the probability of X taking the value xi.

Example: Consider rolling a fair six-sided die, where S = {1, 2, 3, 4, 5, 6} and P(s) = 1/6 for each s ∈ S. Let X = s/6. The CDF FX(x) is: * 0 for x < 1/6 * 1/6 for 1/6 ≤ x < 2/6 * 2/6 for 2/6 ≤ x < 3/6 * 3/6 for 3/6 ≤ x < 4/6 * 4/6 for 4/6 ≤ x < 5/6 * 5/6 for 5/6 ≤ x < 6/6 * 1 for x ≥ 6/

CDFs of Absolutely Continuous Distributions

For an absolutely continuous random variable X with density function fX, the CDF FX is given by the integral of the density function from negative infinity to x: FX(x) = ∫-∞ to x fX(t) dt. Conversely, the density function fX can be obtained by differentiating the CDF: fX(x) = F'X(x).

Standard Normal Distribution

The CDF of a standard normal distribution, denoted by Φ(x), is defined as: Φ(x) = ∫-∞ to x φ(t) dt = ∫-∞ to x (1/√(2π))e^(-t^2/2) dt. This integral cannot be evaluated exactly except for specific values of x. Probabilities involving normal distributions can be calculated using the CDF. For example, P(a ≤ X ≤ b) = Φ((b-μ)/σ) - Φ((a-μ)/σ), where μ is the mean and σ is the standard deviation.

Example: Suppose X1 ~ Poisson(3) is discrete with CDF F1, and X2 ~ N(0,

  1. is continuous with CDF F2. Let Y have the mixture distribution FY(y) = (1/5)F1(y) + (4/5)F2(y). Then P(Y = y) = (1/5)P(X1 = y) + (4/5)P(X2 = y).

Properties and Summary

The cumulative distribution function (CDF) of X is FX(x). All probabilities associated with X can be determined from FX. If X is absolutely continuous, then FX(x) = ∫-∞ to x fX(t) dt, and fX(x) = F'X(x). Φ(x) denotes the CDF of the standard normal distribution evaluated at x.

One-Dimensional Change of Variable

The Discrete Case

If X is a discrete random variable and Y = h(X), where h is a function, then Y is also discrete. The probability function of Y, pY(y), is given by pY(y) = Σx∈h-1{y} pX(x), where h-1{y} is the set of all x such that h(x) = y.

Example: Let X be the number of heads when flipping three fair coins. Let Y = 1 if X ≥ 1, and Y = 0 if X = 0. Then h-1{0} = {0}, so P(Y = 0) = P(X =

  1. = 1/8. Also, P(Y = 1) = P(X ≥ 1) = P(X = 1) + P(X = 2) + P(X = 3) = 3/
  • 3/8 + 1/8 = 7/8.

Example: Let X be the number showing on a fair six-sided die, so that P(X = x) = 1/6 for x = 1, 2, 3, 4, 5, and 6. Let Y = 1 if X = 1 or X = 2, and Y = 0 otherwise.

Example: Let X have the uniform distribution on [0, 1], i.e., X ~ Uniform[0, 1]. Let Y = h(X), where h(x) = 7 if x ≤ 3/4 and h(x) = 5 if x > 3/4. Then Y is discrete, with pY(7) = 3/4, pY(5) = 1/4, and pY(y) = 0 otherwise.

The Absolutely Continuous Case

If X is an absolutely continuous random variable with density function fX, and Y = h(X), where h is a differentiable and strictly increasing function, then Y is also absolutely continuous. The density function of Y, fY(y), is given by fY(y) = fX(h-1(y)) / |h'(h-1(y))|, where h' is the derivative of h, and h-1(y) is the unique number x such that h(x) = y.

Example: Let X ~ Uniform[0, 1], and let Y = 3X. Then X has density fX(x) = 1 if 0 ≤ x ≤ 1, and fX(x) = 0 otherwise. Here, h(x) = 3x, h'(x) = 3, and h-1(y) = y/3. Then Y is absolutely continuous with density fY(y) = (1/3)fX(y/3) = 1/3 if 0 ≤ y ≤ 3, and 0 otherwise. Thus, Y ~ Uniform[0, 3].

Example: Let X ~ N(0, 1), and let Y = 2X + 5. Then X has density fX(x) = φ(x) = (1/√(2π))e^(-x^2/2). Here, h(x) = 2x + 5, h'(x) = 2, and h-1(y) = (y - 5)/2. Then Y is absolutely continuous with density fY(y) = fX((y - 5)/2) / 2 = (1/(2√(2π)))e^(-(y-5)^2/8). Thus, Y ~ N(5, 4).

If h is a differentiable and strictly decreasing function, then Y is also absolutely continuous, and its density function fY may again be defined by fY(y) = fX(h-1(y)) / |h'(h-1(y))|.

Example: Let X ~ Uniform[0, 1], and let Y = ln(1/X). Then X has density fX(x) = 1 for 0 ≤ x ≤ 1, and fX(x) = 0 otherwise. Here, h(x) = ln(1/x), h'(x) = -1/x, and h-1(y) = e^(-y). Then Y is absolutely continuous with density fY(y) = e^(-y) if y ≥ 0, and 0 otherwise. Thus, Y ~ Exponential(1).

Important Considerations

If fX(x) = 0 for an interval of x values, then it does not matter how the function h behaves in that interval. If X ~ Exponential(λ), then fX(x) = 0 for x < 0. Thus, functions such as h(x) = x^2, h(x) = x^8, and h(x) = √x could still be used with Theorem 2.6.2, while functions such as h(x) = -x^2, h(x) = -x^8, and h(x) could still be used with Theorem 2.6.3, even though such functions may not necessarily be strictly increasing (or decreasing) and well defined on the entire real line.

Random Variables and Distributions: Joint

Distributions

Introduction to Joint Distributions

When analyzing two random variables, X and Y, knowing their individual distributions is insufficient to understand their relationship. The joint distribution captures the probabilities of X and Y occurring together.

Example: Consider X following a Bernoulli(1/2) distribution. Knowing X = 1 implies Y1 = 1, but Y2 = 0, highlighting the need for a joint distribution to define the relationship between X and other variables.

Definition of Joint Distribution

The joint distribution of X and Y is the set of probabilities P((X, Y) ∈ B) for all subsets B of R², representing pairs of real numbers. This distribution is often described using functions like joint cumulative distribution functions, joint probability functions, and joint density functions.

Joint Cumulative Distribution Functions (Joint cdfs)

The joint cumulative distribution function (cdf) of X and Y, denoted as FX,Y(x, y), is defined as P(X ≤ x, Y ≤ y). This function captures the probability that X is less than or equal to x AND Y is less than or equal to y.

Example: If X ~ Bernoulli(1/2), Y1 = X, and Y2 = 1 - X, then FX,Y1(x, y) and FX,Y2(x, y) will differ, reflecting the different relationships between X and Y1 versus X and Y2.

Definition 2.7.5: X and Y are jointly absolutely continuous if there exists a joint density function f such that P(a ≤ X ≤ b, c ≤ Y ≤ d) = ∫(c to d) ∫(a to b) f(x, y) dx dy for all a ≤ b, c ≤ d.

Example: A function f(x, y) can be verified as a joint density function by confirming that it is non-negative and that its double integral over the entire plane equals 1.

Theorem 2.7.5: The marginal density function of X, fX(x), is given by ∫(-∞ to ∞) fX,Y(x, y) dy. Similarly, the marginal density function of Y, fY(y), is given by ∫(-∞ to ∞) fX,Y(x, y) dx.

Example: Given a joint density function fX,Y(x, y), the marginal densities fX(x) and fY(y) can be derived by integrating over all possible values of y and x, respectively.

Bivariate Normal Distribution

If X and Y have the Bivariate Normal(μ1, μ2, σ1, σ2, ρ) distribution, their joint density function is defined by a specific formula involving the parameters μ1, μ2, σ1, σ2, and ρ. The parameter ρ, called the correlation, measures the degree of the relationship between X and Y. X and Y are independent if and only if ρ = 0.

Generalization to n Random Variables

The concepts of joint distributions can be extended to more than two random variables, considering X1, ..., Xn.

Joint Distributions

Joint Cumulative Distribution Function and Probability/

Density Functions

The joint cumulative distribution function (cdf) of random variables X and Y is defined as FX,Y (x, y) = P(X ≤ x, Y ≤ y). For discrete random variables X and Y, the joint probability function is given by pX,Y (x, y) = P(X = x, Y = y). If X and Y are absolutely continuous, their joint density function fX,Y (x, y) satisfies P(a ≤ X ≤ b, c ≤ Y ≤ d) = ∫c to d ∫a to b fX,Y (x, y) dx dy. The marginal densities of X and Y can be derived from FX,Y, pX,Y, or fX,Y.

Examples and Exercises

Several exercises demonstrate the computation of joint cdfs, probability functions, and density functions. For instance, given X ∼ Bernoulli(1/3) and Y = 4X − 2, the joint cdf FX,Y can be computed. Similarly, given a joint probability function pX,Y, its properties can be analyzed. For a joint density function fX,Y, one can find the constant C, marginal densities fX(x) and fY(y), and probabilities like P(X ≤ 0.8, Y ≤ 0.6). Specific examples of joint density functions are provided, such as fX,Y (x, y) = 2x^2y + Cy^5 for 0 ≤ x ≤ 1, 0 ≤ y ≤ 1, and others. Further exercises involve finding marginal

densities and joint cdfs given different joint density functions, such as fX,Y (x, y) = c sin(xy) for 0 < x < 1 and 0 < y < 2, and fX,Y (x, y) = (x^2 + y)/ for −2 < x < 1 and 0 < y < 4. The Bivariate-Normal distribution is also considered, asking for the marginal distributions of X and Y and whether they are independent.

Problems

Problems include computing the joint cdf FX,Y when X ∼ Exponential(λ) and Y = X^3. Proofs are required, such as demonstrating that limx→−∞ FX,Y (x, y) = 0 for all y ∈ R^1. Another problem involves proving that if X and Y have a Bivariate Normal distribution, then X ∼ N(μ1, σ1^2) by integrating the joint density. Determining the constant C to make a joint function a density, computing probabilities like P(1/2 < X < 1, 1/2 < Y < 1), and finding marginal densities are also covered.

Challenges

A challenge is to find an example of random variables X and Y and a function h: R^1 → R^1 such that FX(x) > 0 and FY(x) > 0 for all x ∈ R^1, but limx→∞ FX,Y (x, h(x)) ≠ FX(∞)FY(∞).

Conditioning and Independence

Conditional Distribution

The conditional distribution of Y, given X = x, is the probability distribution assigning probability P(Y ∈ B, X = x) / P(X = x) to each event Y ∈ B, provided P(X = x) > 0.

Discrete Random Variables

For discrete random variables, the conditional probability function of Y, given X, is defined as pY|X(y | x) = pX,Y (x, y) / pX(x), valid for all y ∈ R^ and all x with pX(x) > 0.

Continuous Random Variables

For jointly absolutely continuous random variables with joint density function fX,Y, the conditional density of Y, given X = x, is defined as fY|X(y | x) = fX,Y (x, y) / fX(x), valid for all y ∈ R^1 and all x such that fX(x) > 0. The conditional distribution of Y, given X = x, is defined by P(a ≤ Y ≤ b | X = x) = ∫a to b fY|X(y | x) dy, when a ≤ b, with fY|X as defined above.

Law of Total Probability

The law of total probability for absolutely continuous random variables states that P(a ≤ X ≤ b, c ≤ Y ≤ d) = ∫c to d ∫a to b fX(x) fY|X(y | x) dx dy.

Examples and Exercises

Exercise 2.8.3, 2.8.4, and 2.8.5 ask to determine the independence of X and Y given their joint density or probability function. Exercise 2.8.6 considers X following a Bernoulli distribution and Y following a Geometric distribution, both with parameter θ, and assumes independence to find the probability function of Z. Exercise 2.8.7 involves computing the conditional density fY| X(y | x) and determining independence for given joint density functions.

Special Cases of Independence

Exercise 2.8.10 states that if X and Y are Bernoulli random variables with parameters θ and ψ respectively, they must be independent. Exercise 2.8. posits that a constant random variable X and any other random variable Y are always independent.

Conditional Probability and Independence

Exercise 2.8.13 explores conditional probability functions and independence. Exercises 2.8.14 and 2.8.15 involve computing conditional densities fY|X(y|x) and fX|Y(x|y) and determining independence based on a given joint density function.

Independence and Functional Forms

Problem 2.8.18 and 2.8.19 state that if the joint probability or density function can be expressed as a product of two functions, one depending only on x and the other only on y, then X and Y are independent.

Bivariate Normal Distribution

Problem 2.8.21 discusses the bivariate normal distribution and states that X and Y are independent if and only if the correlation coefficient ρ = 0. It also provides the conditional distribution of Y given X = x.

Challenges in Proving Independence

Challenge 2.8.28 provides conditions for independence in terms of conditional probabilities and densities.

Multidimensional Change of Variable

Discrete Case

Theorem 2.9.1 addresses the discrete case, stating that if X and Y are discrete random variables with joint probability function pX,Y, then Z = h1(X, Y) and W = h2(X, Y) are also discrete, and their joint probability function pZ,W is given by summing pX,Y(x, y) over all pairs (x, y) such that h1(x, y) = z and h2(x, y) = w. Corollary 2.9.1 provides a simplified formula when the transformation h = (h1, h2) is one-to-one.

Continuous Case

Theorem 2.9.2 addresses the continuous case, stating that if X and Y are jointly absolutely continuous with joint density function fX,Y, and h = (h1, h2) is a one-to-one transformation, then Z = h1(X, Y) and W = h2(X, Y) are also jointly absolutely continuous, with joint density function fZ,W given by fX,Y(h−1(z, w)) / |J(h−1(z, w))|, where J is the Jacobian derivative of h.

Examples of Change of Variable

Example 2.9.1 illustrates the discrete case with a specific joint probability function. Example 2.9.2 demonstrates the continuous case with a given joint density function and transformations Z = X + Y^2 and W = X − Y^2. Example 2.9.3 provides another example involving transformations of uniform random variables.

Convolution

Theorem 2.9.3 addresses the convolution of independent random variables. If X and Y are independent and Z = X + Y, then the probability or density function of Z can be computed by summing or integrating the product of the probability or density functions of X and Y.

Examples of Convolution

Example 2.9.4 illustrates convolution for discrete random variables with X following a Binomial distribution and Y following a Bernoulli distribution. Example 2.9.5 demonstrates convolution for continuous random variables with X following a Uniform distribution and Y following an Exponential distribution.

Random Variables and Distributions

Binomial Distribution

If X follows a Binomial distribution with parameters n1 and θ, and Y follows a Binomial distribution with parameters n2 and θ, and X and Y are independent, then Z = X + Y follows a Binomial distribution with parameters n1 + n2 and θ. This can be proven using Theorem 2.9.3(a).

Negative Binomial Distribution

If X follows a Negative-Binomial distribution with parameters r1 and θ, and Y follows a Negative-Binomial distribution with parameters r2 and θ, and X and Y are independent, then Z = X + Y follows a Negative-Binomial distribution with parameters r1 + r2 and θ. This can be proven using Theorem 2.9.3(a).

distribution on [0, 1] and floor(r) is the greatest integer not exceeding r. Alternatively, generate independent random variables X_i until X_i = 1, and let Y be the index i of the first such variable.

Simulating Exponential Distribution

If Y follows an Exponential distribution with parameter 1, then Z = Y / λ follows an Exponential distribution with parameter λ, where λ > 0. Since Y = ln(1/U1) where U1 ~ Uniform[0,1], then Z = ln(1/U1)/λ.

Simulating Standard Normal Distribution

To generate independent standard normal random variables X and Y, use the Box-Muller transform: X = sqrt(2 log(1/U1)) cos(2πU2) and Y = sqrt( log(1/U1)) sin(2πU2), where U1 and U2 are independent Uniform[0, 1] random variables.

Simulating General Normal Distribution

If X follows a standard normal distribution N(0, 1), then Z = σX + μ follows a Normal distribution with parameters μ and σ^2.

Inverse Transform Method

If F is a cumulative distribution function (CDF) and U follows a Uniform distribution on [0, 1], then Y = F^(-1)(U) has the cumulative distribution function F.

Standard Normal CDF

Let Φ be the CDF of a standard normal random variable. If U follows a Uniform distribution on [0, 1], then Y = Φ^(-1)(U) follows a standard normal distribution N(0, 1). However, computing Φ^(-1) is difficult in practice.

Exercises

Exercise 2.10.1 asks for a formula for Z in terms of U, such that if U ∼ Uniform[0, 1], then Z has the same distribution as Y, where Y is a discrete random variable with P(Y = −7) = 1/2, P(Y = −2) = 1/2.

Exercise 2.10.2 asks for a formula for X in terms of U, such that if U ∼ Uniform[0, 1], then X has cumulative distribution function F, for various given cumulative distribution functions F.

Exercise 2.10.6 asks for a formula for Y in terms of U, such that P(Y = 3) = P(Y = 4) = 2/5 and P(Y = 7) = 1/5, otherwise P(Y = y) = 0.

Exercise 2.10.7 asks for a formula for Y in terms of U, such that Y has cdf FX, where P(X = 1) = 1/3, P(X = 2) = 1/6, P(X = 4) = 1/2, and P(X = x) = 0 otherwise.

Exercise 2.10.8 asks for a formula for Y in terms of U, such that Y has density fX(x), where X has density function fX(x) = 3x^2 for 0 < x < 1.

Problem 2.10.11 describes a CDF G(x) as a mixture of CDFs Fk(x) with weights pk, where pi ≥ 0 and Σi pi = 1. It asks for a procedure to generate a random variable Y with CDF G.

Problem 2.10.12 describes a density function fX(x) = x^(-2) for x ≥ 1, and fX(x) = 0 otherwise.

Rejection Sampling

Rejection sampling is a method for sampling from a complicated density f by using a simpler density g, provided that f(x) ≤ cg(x) for all x ∈ R1.

Proof of φ(x) is a Density

The text proves that φ(x) = (1/sqrt(2π))e^(-x^2/2) is a density function by showing that its integral from -∞ to ∞ is equal to 1.

Proof of Theorem 2.6.

Theorem 2.6.2 states that if X is an absolutely continuous random variable with density fX, and Y = h(X) where h is differentiable and strictly increasing, then Y is also absolutely continuous with density fY(y) = fX(h^(-1)(y)) / |h'(h^(-1)(y))|. The proof involves showing that P(a ≤ Y ≤ b) = integral from a to b of fY(y) dy.

Proof of Theorem 2.6.

Theorem 2.6.3 states that if X is an absolutely continuous random variable with density fX, and Y = h(X) where h is differentiable and strictly decreasing, then Y is also absolutely continuous with density fY(y) = fX(h^(-1)(y)) / |h'(h^(-1)(y))|. The proof involves showing that P(a ≤ Y ≤ b) = integral from a to b of fY(y) dy.

Joint Density Function Transformation

If X and Y are jointly absolutely continuous with joint density fX,Y, and Z = h1(X, Y) and W = h2(X, Y) where h = (h1, h2) is one-to-one, then Z and W are also jointly absolutely continuous with joint density fZ,W(z, w) = fX,Y(h^(-1)(z, w)) / |J(h^(-1)(z, w))|, where J is the Jacobian derivative of h. The proof involves showing that P(a ≤ Z ≤ b, c ≤ W ≤ d) = double integral from a to b and c to d of fZ,W(z, w) dw dz.