0% found this document useful (0 votes)
35 views

Chapter 3: Random Variables and Probability Distributions

This document is chapter 3 of a textbook on random variables and probability distributions. It introduces the concept of a random variable and defines discrete and continuous random variables. Discrete random variables can take on countable values and are described by a probability mass function, while continuous random variables can take any value in an interval. The chapter provides examples of discrete and continuous random variables and their probability distributions. It also defines the cumulative distribution function for discrete random variables.

Uploaded by

Mert SEPETOĞLU
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Chapter 3: Random Variables and Probability Distributions

This document is chapter 3 of a textbook on random variables and probability distributions. It introduces the concept of a random variable and defines discrete and continuous random variables. Discrete random variables can take on countable values and are described by a probability mass function, while continuous random variables can take any value in an interval. The chapter provides examples of discrete and continuous random variables and their probability distributions. It also defines the cumulative distribution function for discrete random variables.

Uploaded by

Mert SEPETOĞLU
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Concept of a Random Variable

Discrete Probability Distributions


Continuous Probability Distributions
Joint Probability Distributions

Chapter 3: Random Variables and Probability


Distributions

Department of Engineering Sciences


Izmir Katip Celebi University

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Concept of a Random Variable

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Statistics is concerned with making inferences about populations and population charac-
teristics. Experiments are conducted with results that are subject to chance. The testing
of a number of electronic components is an example of a statistical experiment, a
term that is used to describe any process by which several chance observations are
generated. It is often important to allocate a numerical description to the outcome. For
example, the sample space giving a detailed description of each possible outcome when
three electronic components are tested may be written

S = {NNN, NND, NDN, DNN, NDD, DND, DDN, DDD} ,

where N denotes nondefective and D denotes defective.


One is naturally concerned with the number of defectives that occur. Thus, each point
in the sample space will be assigned a numerical value of 0, 1, 2, or 3. These values
are, of course, random quantities determined by the outcome of the experiment. They
may be viewed as values assumed by the random variable X , the number of defective
items when three electronic components are tested.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Definition
A random variable is a function that associates a real number with each element in
the sample space.

In this course, we’ll deal with two types of random variables, namely, discrete and con-
tinuous.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Discrete and Continuous Random Variables

Definition
A random variable is a discrete random variable if it can take on no more than
countable (finitely many or countably infinite) number of values.

Definition
A random variable is a continuous random variable if it can take any value in an
interval.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. Consider the experiment of flipping a coin three times and let X be the
number of heads. Find the values of the random variable X and state whether it is
discrete or continuous.
Solution.
The sample space is S = {HHH, THH, HTH, HHT , TTH, THT , HTT , TTT }.

X (HHH) = 3, X (THH) = X (HTH) = X (HHT ) = 2,

X (TTH) = X (THT ) = X (HTT ) = 1, X (TTT ) = 0.


X can take values 0, 1, 2, and 3. Hence, X is a discrete random variable.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. Consider the experiment of flipping a coin repeatedly until the first occurrence
of a head and let Y be the number of flips. Find the values of the random variable Y
and state whether it is discrete or continuous.
Solution.  
 
The sample space is S = H, TH, TTH, TTTH, . . . , TT . . . T H, . . . .
 | {z } 
 k 

Y (H) = 1, Y (TH) = 2, Y (TTH) = 3, . . . , Y TT . . . T H  = k + 1, . . .


| {z }
k

Y can take values 1, 2, 3 . . . . Hence, Y is a discrete random variable.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. Consider the experiment of filling 12 ounce cans with coffee and let Z be the
amount of coffee in a randomly chosen can. Find the values of the random variable Z
and state whether it is discrete or continuous.
Solution.
Z can take any value between 0 and 12, that is, 0 ≤ x ≤ 12. Hence, Z is a continuous
random variable.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Discrete Probability Distributions

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

A discrete random variable assumes each of its values with a certain probability.

Definition
The probability mass function (pmf) or probability distribution (function), f (x), of
a discrete random variable X represents the probability that X takes the value x. That
is,
f (x) = P {X = x} for all values of x.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. Consider the experiment of flipping a coin three times and let X be the
number of heads. Find f (x) for all values of x and show the result in a table, a graph,
and a function representation.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. A shipment of 20 similar laptop computers to a retail outlet contains 3 that


are defective. If a school makes a random purchase of 2 of these computers, find the
probability distribution for the number of defectives.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Properties of Discrete Probability Distributions

Let X be a discrete random variable with probability distribution f (x). Then


1 f (x) ≥ 0 for any value x and
P
x f (x) = 1, where summation is over all possible values of x.
2

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. Check whether the following functions can serve as probability distribution
functions of appropriate random variables:
 
3
x
a) f (x) = 8
, x = 0, 1, 2, 3,
x+2
b) f (x) = 12
, x = 1, 2, 3,
2
x −1
c) f (x) = 25
, x = 0, 1, 2, 3, 4.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Definition
The cumulative (probability) distribution function (cdf), F (x), of a discrete random
variable X represents the probability that X does not exceed the value x. That is,
X
F (x) = P {X ≤ x} = f (t) for − ∞ < x < ∞.
t≤x

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. A car agency sells 60% of its inventory of a certain foreign car equipped with
side airbags
a) Find a formula for the probability distribution of the number of cars with side airbags
among the next 4 cars sold by the agency.
b) Find the cumulative distribution function of the random variable defined in part a)
and show the result in a table and a graph representation.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Continuous Probability Distributions

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

A continuous random variable has a probability of 0 of assuming exactly any of its values.
Consequently, its probability distribution cannot be given in a table form.
Although the probability distribution of a continuous random variable cannot be pre-
sented in a table form, it can be stated as a formula. Such a formula would necessarily
be a function of the numerical values of the continuous random variable X and as such
will be represented by the functional notation f (x).

Definition
The probability density function (pdf) for the continuous random variable X is
constructed so that the area under its curve bounded by the x axis is equal to 1 when
computed over the range of X for which f (x) is defined.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

The probability that X assumes a value between a and b is equal to the shaded area
under the probability density function between the ordinates at x = a and x = b is given
by
Z b
P (a < X < b) = f (x)dx.
a

Note: When X is continuous, it does not matter whether we include an endpoint of the
interval or not, that is,

P (a ≤ X ≤ b) = P (a < X ≤ b) = P (a ≤ X < b) = P (a < X < b) .

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Properties of Continuous Probability Distributions

Let X be a continuous random variable with probability density function f (x). Then
1 f (x) ≥ 0 for all x ∈ R and
R
x f (x) dx = 1.
2

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Definition
The cumulative distribution function (cdf), F (x), of a continuous random variable X
with density function is
Z x
F (x) = P {X ≤ x} = P {X < x} = f (t) dt for − ∞ < x < ∞.
−∞

Note: As an immediate consequence, we can write the following two results:

P (a < X < b) = P (X < b) − P (X < a) = F (b) − F (a)

and
dF (x)
f (x) = , if the derivative exists.
dx

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. Suppose that the error in the reaction temperature, in ◦ C, for a controlled
laboratory experiment is a continuous random variable X having the probability density
function (
x2
f (x) = 3
, −1 < x < 2,
0, elsewhere.

a) Verify that f (x) is a density function.


b) Find P {0 < X ≤ 1}.
c) Find F (x) and use it to evaluate P (0 < X ≤ 1).

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. The proportion of people who respond to a certain mail-order solicitation is a


continuous random variable X that has the following density function

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

a) Evaluate c.
1 1
b) Find F (x) and use it to calculate the probability that more than 4
but fewer than 2
of the people contacted with respond to this type of solicitation.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. The Department of Energy (DOE) puts projects out on bid and generally esti-
mates what a reasonable bid should be. Call the estimate b. The DOE has determined
that the density function of the winning (low) bid is

5 2

8b
, 5
b≤ y ≤ 2b,
f (y ) =
0, otherwise.

Find F (y ) and use it to determine the probability that the winning bid is less than the
DOE’s preliminary estimate b.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Joint Probability Distributions

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Our study of random variables and their probability distributions in the preceding sec-
tions is restricted to one-dimensional sample spaces, in that we recorded outcomes of
an experiment as values assumed by a single random variable. There will be situations,
however, where we may find it desirable to record the simultaneous outcomes of several
random variables.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

If X and Y are two discrete random variables, the probability distribution for their si-
multaneous occurrence can be represented by a function with values fX ,Y (x, y ) for any
pair of values (x, y ) within the range of the random variables X and Y . We refer to this
function as the joint probability distribution of X and Y . Hence, in the discrete case,

fX ,Y (x, y ) = P {X = x, Y = y } ,

that is, the values fX ,Y (x, y ) give the probability that outcomes x and y occur at the
same time.

Definition
For the discrete case, the marginal distributions of X alone and of Y alone are
X X
fX (x) = fX ,Y (x, y ) and fY (y ) = fX ,Y (x, y ) .
y x

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Properties of Discrete Joint Probability Distributions

Let X and Y be discrete random variables with joint probability density function fX ,Y (x, y ).
Then
1 fX ,Y (x, y ) ≥ 0 for all (x, y ) and
P P
y fX ,Y (x, y ) = 1.
2
x

For any region A in the xy plane,


XX
P {(X , Y ) ∈ A} = fX ,Y (x, y ),

where summations are over the region A.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example(*). Two ballpoint pens are selected at random from a box that contains 3 blue
pens, 2 red pens, and 3 green pens. If X is the number of blue pens selected and Y is
the number of red pens selected, find
a) the joint probability function fX ,Y (x, y ) and show it in a table representation,
b) the marginal densities of X and Y ,
c) P {(X , Y ) ∈ A}, where A is the region {(x, y ) |x + y ≤ 1}.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

When X and Y are two continuous random variables, the joint density function (fX ,Y (x, y ))
is a surface lying above the xy plane and P {(X , Y ) ∈ A}, where A is any region in the
xy plane, is equal to the volume of the right cylinder bounded by the base A and the
surface.

Definition
For the continuous case, the marginal distributions of X alone and of Y alone are
Z Z
fX (x) = fX ,Y (x, y ) dy and fY (y ) = fX ,Y (x, y ) dx.
y x

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Properties of Continuous Joint Probability Distributions

Let X and Y be continuous random variables with joint probability density function
fX ,Y (x, y ). Then
1 fX ,Y (x, y ) ≥ 0 for all (x, y ) and
R R
x y fX ,Y (x, y ) dxdy = 1.
2

For any region A in the xy plane,


Z Z
P {(X , Y ) ∈ A} = fX ,Y (x, y )dxdy ,

where integrals are over the region A.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. A privately owned business operates both a drive-in facility and a walk-in
facility. On a randomly selected day, let X and Y , respectively, be the proportions of
the time that the drive-in and the walk-in facilities are in use, and suppose that the joint
density function of these random variables is

2

5
(2x + 3y ) , 0 ≤ x ≤ 1, 0 ≤ y ≤ 1
fX ,Y (x, y ) =
0, elsewhere.

R∞ R∞
a) Verify −∞ −∞ fX ,Y (x, y ) dxdy = 1.
b) Find the marginal densities of X and Y ,
n o
1 1 1
c) Find P {(X , Y ) ∈ A}, where A = (x, y ) |0 < x < ,
2 4
<y < 2
.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Statistical Independence

Definition
Let X and Y be two random variables, discrete or continuous, with joint probability
distribution fX ,Y (x, y ) and marginal distributions fX (x) and fY (y ), respectively. The
random variables X and Y are said to be statistically independent if and only if

fX ,Y (x, y ) = fX (x) fY (y )

for all (x, y ) within their range.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. Show that the random variables X and Y in Example(*) are not statistically
independent.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Definition
Let X1 , X2 , . . . , Xn be n random variables, discrete or continuous, with joint probability
distribution fX1 ,X2 ,...,Xn (x1 , x2 , . . . , xn ) and marginal distributions fX1 (x1 ), fX2 (x2 ), . . . ,
fXn (xn ), respectively. The random variables X1 , X2 , . . . , Xn are said to be mutually
statistically independent if and only if

fX1 ,X2 ,...,Xn (x1 , x2 , . . . , xn ) = fX1 (x1 ) , fX2 (x2 ) , . . . , fXn (xn )

for all (x1 , x2 , . . . , xn ) within their range.

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Example. Suppose that the shelf life, in years, of a certain perishable food product pack-
aged in cardboard containers is a random variable whose probability density function is
given by  −x
e , x > 0,
f (x) =
0, elsewhere.

Let X1 , X2 , and X3 represent the shelf lives for three of these containers selected inde-
pendently and find P (X1 < 2, 1 < X2 < 3, X3 > 2).

Chapter 3: Random Variables and Probability Distributions


Concept of a Random Variable
Discrete Probability Distributions
Continuous Probability Distributions
Joint Probability Distributions

Thank you for your attention!

Chapter 3: Random Variables and Probability Distributions

You might also like