14
Sep 23

The magic of the distribution function

The magic of the distribution function

Let X be a random variable. The function F_{X}\left( x\right) =P\left(  X\leq x\right) , where x runs over real numbers, is called a distribution function of X. In statistics, many formulas are derived with the help of F_{X}\left( x\right) . The motivation and properties are given here.

Oftentimes, working with the distribution function is an intermediate step to obtain a density f_{X} using the link

F_{X}\left( x\right) =\int_{-\infty }^{x}f_{X}\left( t\right) dt.

A series of exercises below show just how useful the distribution function is.

Exercise 1. Let Y be a linear transformation of X, that is, Y=\sigma X+\mu , where \sigma >0 and \mu \in R. Find the link between F_{X} and F_{Y}. Find the link between f_{X} and f_{Y}.

The solution is here.

The more general case of a nonlinear transformation can also be handled:

Exercise 2. Let Y=g\left( X\right) where g is a deterministic function. Suppose that g is strictly monotone and differentiable. Then g^{-1} exists. Find the link between F_{X} and F_{Y}. Find the link between f_{X} and f_{Y}.

Solution. The result differs depending on whether g is increasing or decreasing. Let's assume the latter, so that x_{1}\leq x_{2} is equivalent to g\left( x_{1}\right) \geq g\left( x_{2}\right) . Also for simplicity suppose that P\left( X=c\right) =0 for any c\in R. Then

F_{Y}\left( y\right) =P\left( g\left( X\right) \leq y\right) =P\left( X\geq g^{-1}\left( y\right) \right) =1-P\left( X\leq g^{-1}\left( y\right) \right)=1-F_{X}\left( g^{-1}\left( y\right) \right) .

Differentiation of this equation produces

f_{Y}\left( y\right)=-f_{X}\left( g^{-1}\left( y\right) \right) \left( g^{-1}\left( y\right)  \right) ^{\prime }=f_{X}\left( g^{-1}\left( y\right) \right) \left\vert\left( g^{-1}\left( y\right) \right) ^{\prime }\right\vert

(the derivative of g^{-1} is negative).

For an example when g is not invertible see the post about the chi-squared distribution.

Exercise 3. Suppose T=X/Y where X and Y are independent, have densities f_{X},f_{Y} and Y>0. What are the distribution function and density of T?

Solution. By independence the joint density f_{X,Y} equals f_{X}f_{Y}, so

F_{T}\left( t\right) =P\left( T\leq t\right) =P\left( X\leq tY\right) = \underset{x\leq ty}{\int \int }f_{X}\left( x\right) f_{Y}\left( y\right) dxdy

(converting a double integral to an iterated integral and remembering that f_{Y} is zero on the left half-axis)

=\int_{0}^{\infty }\left( \int_{-\infty }^{ty}f_{X}\left( x\right) dx\right) f_{Y}\left( y\right)dy=\int_{0}^{\infty }F_{X}\left( ty\right) f_{Y}\left( y\right) dy.

Now by the Leibniz integral rule

(1) f_{T}\left( t\right) =\int_{0}^{\infty }f_{X}\left( ty\right) yf_{Y}\left( y\right) dy.

A different method is indicated in Activity 4.11, p.207 of J.Abdey, Guide ST2133.

Exercise 4. Let X,Y be two independent random variables with densities f_{X},f_{Y}. Find F_{X+Y} and f_{X+Y}.

See this post.

Exercise 5. Let X,Y be two independent random variables. Find F_{\max \left\{ X_{1},X_{2}\right\} } and F_{\min \left\{ X_{1},X_{2}\right\} }.

Solution. The inequality \max \left\{ X_{1},X_{2}\right\} \leq x holds if and only if both X_{1}\leq x and X_{2}\leq x hold. This means that the event \left\{ \max \left\{ X_{1},X_{2}\right\} \leq x\right\} coincides with the event \left\{ X_{1}\leq x\right\} \cap \left\{ X_{2}\leq x\right\}. It follows by independence that

(2) F_{\max \left\{ X_{1},X_{2}\right\} }\left( x\right) =P\left( \max \left\{ X_{1},X_{2}\right\} \leq x\right) =P\left( \left\{ X_{1}\leq x\right\} \cap \left\{ X_{2}\leq x\right\} \right)

=P(X_{1}\leq x)P\left( X_{2}\leq x\right) =F_{X_{1}}\left( x\right) F_{X_{2}}\left( x\right) .

For \min \left\{ X_{1},X_{2}\right\} we need one more trick, namely, pass to the complementary event by writing

F_{\min \left\{ X_{1},X_{2}\right\} }\left(x\right) =P\left( \min \left\{ X_{1},X_{2}\right\} \leq x\right) =1-P\left(\min \left\{ X_{1},X_{2}\right\} >x\right) .

Now we can use the fact that the event \left\{ \min \left\{ X_{1},X_{2}\right\} >x\right\} coincides with the event \left\{ X_{1}>x\right\} \cap \left\{ X_{2}>x\right\} . Hence, by independence

(3) F_{\min \left\{ X_{1},X_{2}\right\} }\left( x\right) =1-P\left( \left\{X_{1}>x\right\} \cap \left\{ X_{2}>x\right\} \right) =1-P\left(X_{1}>x\right) P\left( X_{2}>x\right)

=1-\left[ 1-P\left( X_{1}\leq x\right) \right] \left[ 1-P\left( X_{2}\leq  x\right) \right] =1-\left( 1-F_{X_{1}}\left( x\right) \right) \left(1-F_{X_{2}}\left( x\right) \right) .

Equations (2) and (3) can be differentiated to obtain the links in terms of densities.

Leave a Reply

You must be logged in to post a comment.