0% found this document useful (0 votes)
2 views28 pages

Random Variables

This document introduces the concept of random variables in the context of probability and statistics, defining them as functions that map outcomes from a sample space to real numbers. It discusses the types of random variables (discrete and continuous), their probability density functions, and cumulative distribution functions, providing examples to illustrate these concepts. The document emphasizes the importance of these definitions and functions in characterizing random variables and their behavior in statistical experiments.

Uploaded by

Ayush Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views28 pages

Random Variables

This document introduces the concept of random variables in the context of probability and statistics, defining them as functions that map outcomes from a sample space to real numbers. It discusses the types of random variables (discrete and continuous), their probability density functions, and cumulative distribution functions, providing examples to illustrate these concepts. The document emphasizes the importance of these definitions and functions in characterizing random variables and their behavior in statistical experiments.

Uploaded by

Ayush Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Probability and Mathematical Statistics 45

Chapter 3
RANDOM VARIABLES
AND
DISTRIBUTION FUNCTIONS

3.1. Introduction

In many random experiments, the elements of sample space are not nec-
essarily numbers. For example, in a coin tossing experiment the sample space
consists of
S = {Head, Tail}.

Statistical methods involve primarily numerical data. Hence, one has to


‘mathematize’ the outcomes of the sample space. This mathematization, or
quantification, is achieved through the notion of random variables.

Definition 3.1. Consider a random experiment whose sample space is S. A


random variable X is a function from the sample space S into the set of real
numbers RI such that for each interval I in R,
I the set {s 2 S | X(s) 2 I} is an
event in S.

In a particular experiment a random variable X would be some function


that assigns a real number X(s) to each possible outcome s in the sample
space. Given a random experiment, there can be many random variables.
This is due to the fact that given two (finite) sets A and B, the number
of distinct functions one can come up with is |B||A| . Here |A| means the
cardinality of the set A.

Random variable is not a variable. Also, it is not random. Thus some-


one named it inappropriately. The following analogy speaks the role of the
random variable. Random variable is like the Holy Roman Empire – it was
Random Variables and Distribution Functions 46

not holy, it was not Roman, and it was not an empire. A random variable is
neither random nor variable, it is simply a function. The values it takes on
are both random and variable.

Definition 3.2. The set {x 2 R


I | x = X(s), s 2 S} is called the space of the
random variable X.

The space of the random variable X will be denoted by RX . The space


of the random variable X is actually the range of the function X : S ! R.
I

Example 3.1. Consider the coin tossing experiment. Construct a random


variable X for this experiment. What is the space of this random variable
X?

Answer: The sample space of this experiment is given by

S = {Head, Tail}.

Let us define a function from S into the set of reals as follows

X(Head) = 0
X(T ail) = 1.

Then X is a valid map and thus by our definition of random variable, it is a


random variable for the coin tossing experiment. The space of this random
variable is
RX = {0, 1}.

Tail
X

Head
Real line
0 1

Sample Space

X(head) = 0 and X(tail) = 1

Example 3.2. Consider an experiment in which a coin is tossed ten times.


What is the sample space of this experiment? How many elements are in this
sample space? Define a random variable for this sample space and then find
the space of the random variable.
Probability and Mathematical Statistics 47

Answer: The sample space of this experiment is given by

S = {s | s is a sequence of 10 heads or tails}.

The cardinality of S is
|S| = 210 .
Let X : S ! R I be a function from the sample space S into the set of reals R
I
defined as follows:

X(s) = number of heads in sequence s.

Then X is a random variable. This random variable, for example, maps the
sequence HHT T T HT T HH to the real number 5, that is

X(HHT T T HT T HH) = 5.

The space of this random variable is

RX = {0, 1, 2, ..., 10}.

Now, we introduce some notations. By (X = x) we mean the event {s 2


S | X(s) = x}. Similarly, (a < X < b) means the event {s 2 S | a < X < b}
of the sample space S. These are illustrated in the following diagrams.

S S

X X
A B
Real line Real line
x
a b
Sample Space Sample Space
(X=x) means the event A (a<X<b) means the event B

There are three types of random variables: discrete, continuous, and


mixed. However, in most applications we encounter either discrete or contin-
uous random variable. In this book we only treat these two types of random
variables. First, we consider the discrete case and then we examine the con-
tinuous case.
Definition 3.3. If the space of random variable X is countable, then X is
called a discrete random variable.
Random Variables and Distribution Functions 48

3.2. Distribution Functions of Discrete Random Variables


Every random variable is characterized through its probability density
function.
Definition 3.4. Let RX be the space of the random variable X. The
function f : RX ! R
I defined by

f (x) = P (X = x)

is called the probability density function (pdf) of X.


Example 3.3. In an introductory statistics class of 50 students, there are 11
freshman, 19 sophomores, 14 juniors and 6 seniors. One student is selected at
random. What is the sample space of this experiment? Construct a random
variable X for this sample space and then find its space. Further, find the
probability density function of this random variable X.
Answer: The sample space of this random experiment is

S = {F r, So, Jr, Sr}.

Define a function X : S ! R
I as follows:

X(F r) = 1, X(So) = 2
X(Jr) = 3, X(Sr) = 4.

Then clearly X is a random variable in S. The space of X is given by

RX = {1, 2, 3, 4}.

The probability density function of X is given by

11
f (1) = P (X = 1) =
50
19
f (2) = P (X = 2) =
50
14
f (3) = P (X = 3) =
50
6
f (4) = P (X = 4) = .
50

Example 3.4. A box contains 5 colored balls, 2 black and 3 white. Balls
are drawn successively without replacement. If the random variable X is the
Probability and Mathematical Statistics 49

number of draws until the last black ball is obtained, find the probability
density function for the random variable X.

Answer: Let ‘B’ denote the black ball, and ‘W’ denote the white ball. Then
the sample space S of this experiment is given by (see the figure below)

B B B B

B
W W W
2B B B B
B
3W
W
W W
B
B
W
B
W
B

W B

S = { BB, BW B, W BB, BW W B, W BW B, W W BB,


BW W W B, W W BW B, W W W BB, W BW W B}.

Hence the sample space has 10 points, that is |S| = 10. It is easy to see that
the space of the random variable X is {2, 3, 4, 5}.

BB X
BWB
2
WBB
BWWB
3
WBWB
WWBB
4
BWWWB
WWBWB
5
WWWBB
WBWWB
Real line
Sample Space S

Therefore, the probability density function of X is given by

1 2
f (2) = P (X = 2) = , f (3) = P (X = 3) =
10 10
3 4
f (4) = P (X = 4) = , f (5) = P (X = 5) = .
10 10
Random Variables and Distribution Functions 50

Thus
x 1
f (x) = , x = 2, 3, 4, 5.
10

Example 3.5. A pair of dice consisting of a six-sided die and a four-sided


die is rolled and the sum is determined. Let the random variable X denote
this sum. Find the sample space, the space of the random variable, and
probability density function of X.

Answer: The sample space of this random experiment is given by

{(1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6)


(2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6)
S=
(3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6)
(4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6)}

The space of the random variable X is given by

RX = {2, 3, 4, 5, 6, 7, 8, 9, 10}.

Therefore, the probability density function of X is given by

1 2
f (2) = P (X = 2) = , f (3) = P (X = 3) =
24 24
3 4
f (4) = P (X = 4) = , f (5) = P (X = 5) =
24 24
4 4
f (6) = P (X = 6) = , f (7) = P (X = 7) =
24 24
3 2
f (8) = P (X = 8) = , f (9) = P (X = 9) =
24 24
1
f (10) = P (X = 10) = .
24

Example 3.6. A fair coin is tossed 3 times. Let the random variable X
denote the number of heads in 3 tosses of the coin. Find the sample space,
the space of the random variable, and the probability density function of X.

Answer: The sample space S of this experiment consists of all binary se-
quences of length 3, that is

S = {T T T, T T H, T HT, HT T, T HH, HT H, HHT, HHH}.


Probability and Mathematical Statistics 51

TTT X
TTH 0
THT
HTT 1
THH
HTH 2
HHT
HHH 3

Sample Space S Real line

The space of this random variable is given by

RX = {0, 1, 2, 3}.

Therefore, the probability density function of X is given by


1
f (0) = P (X = 0) =
8
3
f (1) = P (X = 1) =
8
3
f (2) = P (X = 2) =
8
1
f (3) = P (X = 3) = .
8
This can be written as follows:
✓ ◆ ✓ ◆x ✓ ◆3 x
3 1 1
f (x) = x = 0, 1, 2, 3.
x 2 2

The probability density function f (x) of a random variable X completely


characterizes it. Some basic properties of a discrete probability density func-
tion are summarized below.
Theorem 3.1. If X is a discrete random variable with space RX and prob-
ability density function f (x), then
(a) f (x) 0 for all x in RX , and
X
(b) f (x) = 1.
x2RX

Example 3.7. If the probability of a random variable X with space RX =


{1, 2, 3, ..., 12} is given by

f (x) = k (2x 1),


Random Variables and Distribution Functions 52

then, what is the value of the constant k?

Answer: X
1= f (x)
x2RX
X
= k (2x 1)
x2RX
12
X
= k (2x 1)
x=1
" 12
#
X
=k 2 x 12
x=1

(12)(13)
=k 2 12
2
= k 144.
Hence
1
k= .
144

Definition 3.5. The cumulative distribution function F (x) of a random


variable X is defined as
F (x) = P (X  x)

for all real numbers x.

Theorem 3.2. If X is a random variable with the space RX , then


X
F (x) = f (t)
tx

for x 2 RX .

Example 3.8. If the probability density function of the random variable X


is given by
1
(2x 1) for x = 1, 2, 3, ..., 12
144
then find the cumulative distribution function of X.

Answer: The space of the random variable X is given by

RX = {1, 2, 3, ..., 12}.


Probability and Mathematical Statistics 53

Then
X 1
F (1) = f (t) = f (1) =
144
t1

X 1 3 4
F (2) = f (t) = f (1) + f (2) = + =
144 144 144
t2

X 1 3 5 9
F (3) = f (t) = f (1) + f (2) + f (3) = + + =
144 144 144 144
t3

.. ........
.. ........
X
F (12) = f (t) = f (1) + f (2) + · · · + f (12) = 1.
t12

F (x) represents the accumulation of f (t) up to t  x.

Theorem 3.3. Let X be a random variable with cumulative distribution


function F (x). Then the cumulative distribution function satisfies the fol-
lowings:
(a) F ( 1) = 0,
(b) F (1) = 1, and
(c) F (x) is an increasing function, that is if x < y, then F (x)  F (y) for
all reals x, y.

The proof of this theorem is trivial and we leave it to the students.

Theorem 3.4. If the space RX of the random variable X is given by RX =


{x1 < x2 < x3 < · · · < xn }, then

f (x1 ) = F (x1 )
f (x2 ) = F (x2 ) F (x1 )
f (x3 ) = F (x3 ) F (x2 )
.. ........
.. ........
f (xn ) = F (xn ) F (xn 1 ).
Random Variables and Distribution Functions 54

F(x4) 1
f(x4)
F(x3)
f(x3)
F(x2)
f(x2)
F(x1)
f(x1)
0
x1 x2 x3 x4 x

Theorem 3.2 tells us how to find cumulative distribution function from the
probability density function, whereas Theorem 3.4 tells us how to find the
probability density function given the cumulative distribution function.
Example 3.9. Find the probability density function of the random variable
X whose cumulative distribution function is
8
> 0.00 if x < 1
>
>
>
>
>
>
>
> 0.25 if 1  x < 1
>
>
<
F (x) = 0.50 if 1  x < 3
>
>
>
>
>
>
>
> 0.75 if 3  x < 5
>
>
>
:
1.00 if x 5 .

Also, find (a) P (X  3), (b) P (X = 3), and (c) P (X < 3).
Answer: The space of this random variable is given by

RX = { 1, 1, 3, 5}.

By the previous theorem, the probability density function of X is given by

f ( 1) = 0.25
f (1) = 0.50 0.25 = 0.25
f (3) = 0.75 0.50 = 0.25
f (5) = 1.00 0.75 = 0.25.

The probability P (X  3) can be computed by using the definition of F .


Hence
P (X  3) = F (3) = 0.75.
Probability and Mathematical Statistics 55

The probability P (X = 3) can be computed from

P (X = 3) = F (3) F (1) = 0.75 0.50 = 0.25.

Finally, we get P (X < 3) from

P (X < 3) = P (X  1) = F (1) = 0.5.

We close this section with an example showing that there is no one-to-


one correspondence between a random variable and its distribution function.
Consider a coin tossing experiment with the sample space consisting of a
head and a tail, that is S = { head, tail }. Define two random variables X1
and X2 from S as follows:

X1 ( head ) = 0 and X1 ( tail ) = 1

and
X2 ( head ) = 1 and X2 ( tail ) = 0.

It is easy to see that both these random variables have the same distribution
function, namely (
0 if x < 0
FXi (x) = 12 if 0  x < 1
1 if 1  x
for i = 1, 2. Hence there is no one-to-one correspondence between a random
variable and its distribution function.

3.3. Distribution Functions of Continuous Random Variables


A random variable X is said to be continuous if its space is either an
interval or a union of intervals. The folllowing definition formally defines a
continuous random variable.
Definition 3.6. A random variable X is said to be a continuous random
variable if there exists a continuous function f : R I ! [0, 1) such that for
every set of real numbers A
Z
P (X 2 A) = f (x) dx. (1)
A

Definition 3.7. The function f in (1) is called the probability density


function of the continuous random variable X.
Random Variables and Distribution Functions 56

It can be easily shown that for every probability density function f ,


Z 1
f (x)dx = 1.
1

Example 3.10. Is the real valued function f : R


I !R
I defined by

2x 2
if 1 < x < 2
f (x) =
0 otherwise,

a probability density function for some random variable X?

Answer: We have to show that f is nonnegative and the area under f (x)
is unity. Since the domain of f is the interval (0, 1), it is clear that f is
nonnegative. Next, we calculate
Z 1 Z 2
f (x) dx = 2x 2
dx
1 1
 2
1
= 2
x 1

1
= 2 1
2
= 1.

Thus f is a probability density function.

Example 3.11. Is the real valued function f : R


I !R
I defined by

1 + |x| if 1 < x < 1
f (x) =
0 otherwise,

a probability density function for some random variable X?


Probability and Mathematical Statistics 57

Answer: It is easy to see that f is nonnegative, that is f (x) 0, since


f (x) = 1 + |x|. Next we show that the area under f is not unity. For this we
compute
Z 1 Z 1
f (x) dx = (1 + |x|) dx
1 1
Z 0 Z 1
= (1 x) dx + (1 + x) dx
1 0
  0 1
1 2
1
= x + x + x2
x
1 22 0
1 1
=1+ +1+
2 2
= 3.

Thus f is not a probability density function for some random variable X.

Example 3.12. For what value of the constant c, the real valued function
f :R
I !R
I given by

c
f (x) = , 1 < x < 1,
1 + (x ✓)2

where ✓ is a real parameter, is a probability density function for random


variable X?

Answer: Since f is nonnegative, we see that c 0. To find the value of c,


Random Variables and Distribution Functions 58

we use the fact that for pdf the area is unity, that is
Z 1
1= f (x) dx
1
Z 1
c
= dx
1 1 + (x ✓)2
Z 1
c
= dz
1 1+z
2
⇥ ⇤1
= c tan 1 z 1
⇥ ⇤
= c tan 1 (1) tan 1 ( 1)

1 1
=c ⇡+ ⇡
2 2
= c ⇡.

Hence c = 1
⇡ and the density function becomes

1
f (x) = , 1 < x < 1.
⇡ [1 + (x ✓)2 ]

This density function is called the Cauchy distribution function with param-
eter ✓. If a random variable X has this pdf then it is called a Cauchy random
variable and is denoted by X ⇠ CAU (✓).
This distribution is symmetrical about ✓. Further, it achieves it maxi-
mum at x = ✓. The following figure illustrates the symmetry of the distribu-
tion for ✓ = 2.

Example 3.13. For what value of the constant c, the real valued function
f :R
I !R
I given by (
c if a  x  b
f (x) =
0 otherwise,
Probability and Mathematical Statistics 59

where a, b are real constants, is a probability density function for random


variable X?
Answer: Since f is a pdf, k is nonnegative. Further, since the area under f
is unity, we get Z 1
1= f (x) dx
1
Z b
= c dx
a
b
= c [x]a
= c [b a].
Hence c = b a,
1
and the pdf becomes
( 1
b a if a  x  b
f (x) =
0 otherwise.

This probability density function is called the uniform distribution on


the interval [a, b]. If a random variable X has this pdf then it is called a
uniform random variable and is denoted by X ⇠ U N IF (a, b). The following
is a graph of the probability density function of a random variable on the
interval [2, 5].

Definition 3.8. Let f (x) be the probability density function of a continu-


ous random variable X. The cumulative distribution function F (x) of X is
defined as Z x
F (x) = P (X  x) = f (t) dt.
1

The cumulative distribution function F (x) represents the area under the
probability density function f (x) on the interval ( 1, x) (see figure below).
Random Variables and Distribution Functions 60

Like the discrete case, the cdf is an increasing function of x, and it takes
value 0 at negative infinity and 1 at positive infinity.
Theorem 3.5. If F (x) is the cumulative distribution function of a contin-
uous random variable X, the probability density function f (x) of X is the
derivative of F (x), that is
d
F (x) = f (x).
dx
Proof: By Fundamental Theorem of Calculus, we get
✓Z x ◆
d d
(F (x)) = f (t) dt
dx dx 1
dx
= f (x) = f (x).
dx
This theorem tells us that if the random variable is continuous, then we can
find the pdf given cdf by taking the derivative of the cdf. Recall that for
discrete random variable, the pdf at a point in space of the random variable
can be obtained from the cdf by taking the di↵erence between the cdf at the
point and the cdf immediately below the point.
Example 3.14. What is the cumulative distribution function of the Cauchy
random variable with parameter ✓?
Answer: The cdf of X is given by
Z x
F (x) = f (t) dt
1
Z x
1
= dt
1 ⇡ [1 + (t ✓)2 ]
Z x ✓
1
= dz
1 ⇡ [1 + z2]
1 1
= tan 1 (x ✓) + .
⇡ 2
Probability and Mathematical Statistics 61

Example 3.15. What is the probability density function of the random


variable whose cdf is
1
F (x) = , 1 < x < 1?
1+e x

Answer: The pdf of the random variable is given by


d
f (x) = F (x)
dx ✓ ◆
d 1
=
dx 1 + e x
d 1
= 1+e x
dx
d
= ( 1) (1 + e x
) 2
1+e x
dx
e x
= .
(1 + e x )2

Next, we briefly discuss the problem of finding probability when the cdf
is given. We summarize our results in the following theorem.
Theorem 3.6. Let X be a continuous random variable whose cdf is F (x).
Then followings are true:
(a) P (X < x) = F (x),
(b) P (X > x) = 1 F (x),
(c) P (X = x) = 0 , and
(d) P (a < X < b) = F (b) F (a).

3.4. Percentiles for Continuous Random Variables

In this section, we discuss various percentiles of a continuous random


variable. If the random variable is discrete, then to discuss percentile, we
have to know the order statistics of samples. We shall treat the percentile of
discrete random variable in Chapter 13.
Definition 3.9. Let p be a real number between 0 and 1. A 100pth percentile
of the distribution of a random variable X is any real number q satisfying

P (X  q)  p and P (X > q)  1 p.

A 100pth percentile is a measure of location for the probability distribu-


tion in the sense that q divides the distribution of the probability mass into
Random Variables and Distribution Functions 62

two parts, one having probability mass p and other having probability mass
1 p (see diagram below).

Example 3.16. If the random variable X has the density function


8
< ex 2
for x < 2
f (x) =
:
0 otherwise,

then what is the 75th percentile of X?

Answer: Since 100pth = 75, we get p = 0.75. By definition of percentile, we


have Z q
0.75 = p = f (x) dx
1
Z q
= ex 2
dx
1
⇥ ⇤
x 2 q
= e 1
=e q 2
.
From this solving for q, we get the 75th percentile to be
✓ ◆
3
q = 2 + ln .
4

Example 3.17. What is the 87.5 percentile for the distribution with density
function
1
f (x) = e |x| 1 < x < 1?
2

Answer: Note that this density function is symmetric about the y-axis, that
is f (x) = f ( x).
Probability and Mathematical Statistics 63

Hence
Z 0
1
f (x) dx = .
1 2

Now we compute the 87.5th percentile q of the above distribution.

Z
87.5 q
= f (x) dx
100 1
Z Z
0
1 q
1
= e |x|
dx + e |x|
dx
1 2 0 2
Z Z q
0
1 x 1
= e dx + e x
dx
1 2 0 2
Z q
1 1 x
= + e dx
2 0 2
1 1 1 q
= + e .
2 2 2

Therefore solving for q, we get

1 q
0.125 = e
2 ✓ ◆
25
q = ln = ln 4.
100

Hence the 87.5th percentile of the distribution is ln 4.

Example 3.18. Let the continuous random variable X have the density
function f (x) as shown in the figure below:
Random Variables and Distribution Functions 64

What is the 25th percentile of the distribution of X?


Answer: Since the line passes through the points (0, 0) and (a, 14 ), the func-
tion f (x) is equal to
1
f (x) = x.
4a
Since f (x) is a density function the area under f (x) should be unity. Hence
Z a
1= f (x) dx
Z0 a
1
= x dx
0 4a
1 2
= a
8a
a
= .
8
Thus a = 8. Hence the probability density function of X is
1
f (x) = x.
32
Now we want to find the 25th percentile.
Z q
25
= f (x) dx
100 0
Z q
1
= x dx
0 32
1 2
= q .
64
p
Hence q = 16, that is the 25th percentile of the above distribution is 4.
Definition 3.10. The 25th and 75th percentiles of any distribution are
called the first and the third quartiles, respectively.
Probability and Mathematical Statistics 65

Definition 3.11. The 50th percentile of any distribution is called the median
of the distribution.

The median divides the distribution of the probability mass into two
equal parts (see the following figure).

If a probability density function f (x) is symmetric about the y-axis, then the
median is always 0.

Example 3.19. A random variable is called standard normal if its proba-


bility density function is of the form

1 1
x2
f (x) = p e 2 , 1 < x < 1.
2⇡

What is the median of X?

Answer: Notice that f (x) = f ( x), hence the probability density function
is symmetric about the y-axis. Thus the median of X is 0.

Definition 3.12. A mode of the distribution of a continuous random variable


X is the value of x where the probability density function f (x) attains a
relative maximum (see diagram).

y
Relative Maximum

f(x)

0 x
mode mode
Random Variables and Distribution Functions 66

A mode of a random variable X is one of its most probable values. A


random variable can have more than one mode.
Example 3.20. Let X be a uniform random variable on the interval [0, 1],
that is X ⇠ U N IF (0, 1). How many modes does X have?
Answer: Since X ⇠ U N IF (0, 1), the probability density function of X is
(
1 if 0  x  1
f (x) =
0 otherwise.
Hence the derivative of f (x) is

f 0 (x) = 0 x 2 (0, 1).

Therefore X has infinitely many modes.


Example 3.21. Let X be a Cauchy random variable with parameter ✓ = 0,
that is X ⇠ CAU (0). What is the mode of X?
Answer: Since X ⇠ CAU (0), the probability density function of f (x) is

1
f (x) = 1 < x < 1.
⇡ (1 + x2 )

Hence
2x
f 0 (x) = .
⇡ (1 + x2 )2
Setting this derivative to 0, we get x = 0. Thus the mode of X is 0.
Example 3.22. Let X be a continuous random variable with density func-
tion 8
< x2 e bx for x 0
f (x) =
:
0 otherwise,
where b > 0. What is the mode of X?
Answer:
df
0=
dx
= 2xe bx
x2 be bx

= (2 bx)x = 0.
Hence
2
x=0 or x= .
b
Probability and Mathematical Statistics 67

Thus the mode of X is 2b . The graph of the f (x) for b = 4 is shown below.

Example 3.23. A continuous random variable has density function


8 2
< 3x
✓3 for 0  x  ✓
f (x) =
:
0 otherwise,

for some ✓ > 0. What is the ratio of the mode to the median for this
distribution?

Answer: For fixed ✓ > 0, the density function f (x) is an increasing function.
Thus, f (x) has maximum at the right end point of the interval [0, ✓]. Hence
the mode of this distribution is ✓.

Next we compute the median of this distribution.


Z
1 q
= f (x) dx
2 0
Z q
3x2
= dx
0 ✓3
 q
x3
=
✓3 0

q3
= 3 .

Hence
1
q=2 3 ✓.

Thus the ratio of the mode of this distribution to the median is


mode ✓ p
3
= = 2.
median 1
2 3✓
Random Variables and Distribution Functions 68

Example 3.24. A continuous random variable has density function


8 2
< 3x
✓3 for 0  x  ✓
f (x) =
:
0 otherwise,

for some ✓ > 0. What is the probability of X less than the ratio of the mode
to the median of this distribution?
Answer: In the previous example, we have shown that the ratio of the mode
to the median of this distribution is given by

mode p
3
a := = 2.
median
Hence the probability of X less than the ratio of the mode to the median of
this distribution is Z a
P (X < a) = f (x) dx
0
Z a 2
3x
= dx
0 ✓3
 3 a
x
= 3
✓ 0
a3
=
✓3
p 3
3
2 2
= = .
✓3 ✓3
3.5. Review Exercises
1. Let the random variable X have the density function
8 q
< k x for 0  x  2
k
f (x) =
:
0 elsewhere.
p
If the mode of this distribution is at x = 4 ,
2
then what is the median of X?
2. The random variable X has density function
8
< c xk+1 (1 x)k for 0 < x < 1
f (x) =
:
0 otherwise,

where c > 0 and 1 < k < 2. What is the mode of X?


Probability and Mathematical Statistics 69

3. The random variable X has density function


8
< (k + 1) x2 for 0 < x < 1
f (x) =
:
0 otherwise,

where k is a constant. What is the median of X?


4. What are the median, and mode, respectively, for the density function
1
f (x) = , 1 < x < 1?
⇡ (1 + x2 )

5. What is the 10th percentile of the random variable X whose probability


density function is
(1 x
✓ e
✓ if x 0, ✓>0
f (x) =
0 elsewhere?

6. What is the median of the random variable X whose probability density


function is (1 x
2 e
2 if x 0
f (x) =
0 elsewhere?
7. A continuous random variable X has the density
8 2
< 3x for 0  x  2
8
f (x) =
:
0 otherwise.

What is the probability that X is greater than its 75th percentile?


8. What is the probability density function of the random variable X if its
cumulative distribution function is given by
8
> 0.0 if x < 2
<
0.5 if 2  x < 3
F (x) =
: 0.7 if 3  x < ⇡
>
1.0 if x ⇡?

9. Let the distribution of X for x > 0 be


3
X xk e x
F (x) = 1 .
k!
k=0
Random Variables and Distribution Functions 70

What is the density function of X for x > 0?


10. Let X be a random variable with cumulative distribution function
8
< 1 e x for x > 0
F (x) =
:
0 for x  0.

What is the P 0  eX  4 ?
11. Let X be a continuous random variable with density function
8
< a x2 e 10 x for x 0
f (x) =
:
0 otherwise,

where a > 0. What is the probability of X greater than or equal to the mode
of X?
12. Let the random variable X have the density function
8 q
< k x for 0  x  2
k
f (x) =
:
0 elsewhere.
p
If the mode of this distribution is at x = 4 ,
2
then what is the probability of
X less than the median of X?
13. The random variable X has density function
8
< (k + 1) x2 for 0 < x < 1
f (x) =
:
0 otherwise,

where k is a constant. What is the probability of X between the first and


third quartiles?
14. Let X be a random variable having continuous cumulative distribu-
tion function F (x). What is the cumulative distribution function Y =
max(0, X)?
15. Let X be a random variable with probability density function

2
f (x) = for x = 1, 2, 3, ....
3x
What is the probability that X is even?
Probability and Mathematical Statistics 71

16. An urn contains 5 balls numbered 1 through 5. Two balls are selected
at random without replacement from the urn. If the random variable X
denotes the sum of the numbers on the 2 balls, then what are the space and
the probability density function of X?

17. A pair of six-sided dice is rolled and the sum is determined. If the
random variable X denotes the sum of the numbers rolled, then what are the
space and the probability density function of X?

18. Five digit codes are selected at random from the set {0, 1, 2, ..., 9} with
replacement. If the random variable X denotes the number of zeros in ran-
domly chosen codes, then what are the space and the probability density
function of X?

19. A urn contains 10 coins of which 4 are counterfeit. Coins are removed
from the urn, one at a time, until all counterfeit coins are found. If the
random variable X denotes the number of coins removed to find the first
counterfeit one, then what are the space and the probability density function
of X?

20. Let X be a random variable with probability density function

2c
f (x) = for x = 1, 2, 3, 4, ..., 1
3x
for some constant c. What is the value of c? What is the probability that X
is even?

21. If the random variable X possesses the density function



cx if 0  x  2
f (x) =
0 otherwise,

then what is the value of c for which f (x) is a probability density function?
What is the cumulative distribution function of X. Graph the functions f (x)
and F (x). Use F (x) to compute P (1  X  2).

22. The length of time required by students to complete a 1-hour exam is a


random variable with a pdf given by

cx2 + x if 0  x  1
f (x) =
0 otherwise,

then what the probability a student finishes in less than a half hour?
Random Variables and Distribution Functions 72

23. What is the probability of, when blindfolded, hitting a circle inscribed
on a square wall?
24. Let f (x) be a continuous probability density function. Show that, for
every 1 < µ < 1 and > 0, the function 1 f x µ is also a probability
density function.
25. Let X be a random variable with probability density function f (x) and
cumulative distribution function F (x). True or False?
(a) f (x) can’t be larger than 1. (b) F (x) can’t be larger than 1. (c) f (x)
can’t decrease. (d) F (x) can’t decrease. (e) f (x) can’t be negative. (f) F (x)
can’t be negative. (g) Area under f must be 1. (h) Area under F must be
1. (i) f can’t jump. (j) F can’t jump.

You might also like