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

Lecture 5 - Random Variables-Introduction, Distribution and Density Functions

Uploaded by

maryumabbas757
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Lecture 5 - Random Variables-Introduction, Distribution and Density Functions

Uploaded by

maryumabbas757
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Philadelphia University

Lecture Notes for 650364

Probability & Random Variables


Chapter 2:
Lecture 5: Random Variables-Introduction, Distributions, Density
and Mass Functions
Department of Communication & Electronics Engineering

Instructor
Dr. Qadri Hamarsheh
Email: [email protected]
Website: http://www.philadelphia.edu.jo/academics/qhamarsheh

Dr. Qadri Hamarsheh Probability & Random Variables 1


Outlines
1) The Random Variable Concept, Introduction
2) Cumulative Distribution Function (CDF)
3) Probability Density and Mass Functions

The Random Variable Concept, Introduction


 Variables whose values are due to chance are called random
variables.
 A random variable (r.v) is a real function that maps the set of all
experimental outcomes of a sample space S into a set of real
numbers.

Dr. Qadri Hamarsheh Probability & Random Variables 2


 We shall represent a random variable by a capital letter (such as X,
Y, or W) and any particular value of the random variable by a lower
case letter (such as x, y, or w)
 Given an experiment defined by a sample space S with elements s, we
assign to every s a real number X(s) according to some rule and call
X(s) a random variable
 There are three types of random variables:
1) Discrete Random Variable (random variables have
discrete values; the sample space can be discrete,
continuous or even mixture of discrete and continuous)
2) Continuous Random Variable (continuous range of
values, it cannot be produced from a discrete sample space
or a mixed sample space).
3) Mixed Random Variables (less important type of
random variables)
o Example: (Discrete Random Variable):
 An experiment consists of rolling a die and flipping a coin.
The sample space is shown in Fig. below and the random

Dr. Qadri Hamarsheh Probability & Random Variables 3


variable X maps the sample space of 12 elements into 12
values of X.
 Function X chosen such that
 A coin Head (H) outcome corresponds to positive values
of X that are equal to the numbers that show up on the
die.
 A coin is Tail (T) outcome corresponds to the negative
values of X that are equal in magnitude to twice the
number that shows up on the die

Dr. Qadri Hamarsheh Probability & Random Variables 4


o Example: (Continuous Random Variable)
 Figure below illustrates an experiment where the pointer on
a wheel of chance is spun. The sample consists of the
numbers in the set {𝟎 < 𝒔 ≤ 𝟏𝟐} and the random variable is
defined by the function 𝑿 = 𝑿 ( 𝒔 ) = 𝒔 𝟐

 Conditions for a Function to be a Random Variable:


o It not be multivalued
o The set {𝑿 ≤ 𝒙} shall be an event for any real number x
o 𝑷{𝑿 ≤ 𝒙} is equal to the sum of the probabilities of all the
elementary events corresponding to {𝑿 ≤ 𝒙}.
o The probabilities of events {𝑿 = ∞} and {𝑿 = −∞} be 0:
𝑷{𝑿 = ∞} = 𝟎 𝑷 {𝑿 = −∞} = 𝟎

Dr. Qadri Hamarsheh Probability & Random Variables 5


Probability Distributions
 A probability distribution consists of the values of a random variable
and their corresponding probabilities.
 There are two kinds of probability distributions: discrete and
continuous.
 If X is discrete, then the values 𝑷(𝑿 = 𝒂𝟏), 𝑷(𝑿 = 𝒂𝟐), … tell us
everything we need to know about X.
 Let X be a discrete random variable, and suppose that the possible
values that it can assume are given by 𝒙𝟏, 𝒙𝟐, 𝒙𝟑, . .. , arranged in some
order. Suppose also that these values are assumed with probabilities
given by

Probability function, also referred to as probability mass function


(PMF), given by

Dr. Qadri Hamarsheh Probability & Random Variables 6


 In general, 𝒇 (𝒙) is a probability function if

1) The 𝒇(𝒙) is a function with nonnegative values


2) The sum of the probabilities of a probability distribution
must be 1.
o Example: When a die is rolled

o Example: Construct a discrete probability distribution for the


number of heads when three coins are tossed.
o Solution:
 Recall that the sample space for tossing three coins is
TTT, TTH, THT, HTT, HHT, HTH, THH, and HHH.
 The outcomes can be arranged according to the number of
heads, as shown.

Dr. Qadri Hamarsheh Probability & Random Variables 7


0 heads TTT
1 head TTH, THT, HTT
2 heads THH, HTH, HHT
3 heads HHH
 Finally, the outcomes and corresponding probabilities can
be written in a table, as shown.

o Roll two dice, let Y be the maximum of their outcomes.

Dr. Qadri Hamarsheh Probability & Random Variables 8


o Roll two dice, let X be the sum of their outcomes.

o A discrete probability distribution can also be shown


graphically by labeling the x axis with the values of the
outcomes and letting the values on the y axis represent the
probabilities for the outcomes.

Dr. Qadri Hamarsheh Probability & Random Variables 9


Cumulative probability Distribution Function (CDF)
 The probability of the event {𝑿 ≤ 𝒙} must depend on x. Denote

Where x is any real number


We call this function, denoted 𝑭𝑿 (𝒙) the cumulative probability
distribution function (CDF) of the random variable X (or just the
distribution function of X)
 Properties Distribution Functions:

Dr. Qadri Hamarsheh Probability & Random Variables 10


 Distribution Function for Discrete Random Variable:
o The distribution function of a discrete random variable X can
be obtained from its probability function by noting that, for all
x in (−∞ , ∞)

o If X takes on only a finite number of values x1, x2, . . . , xn, then


the distribution function is given by

Dr. Qadri Hamarsheh Probability & Random Variables 11


o The distribution function of a discrete random variable X is
given by:

o Example:

Where u(.) is the unit step defined by:

Dr. Qadri Hamarsheh Probability & Random Variables 12


o Example: Suppose that a coin is tossed twice so that the sample
space is 𝐒 = {𝐇𝐇, 𝐇𝐓, 𝐓𝐇, 𝐓𝐓}. Let X represent the number of
heads that can come up.
 It follows that X is a random variable as in the table

 the probability function corresponding to the random


variable X

Then

Dr. Qadri Hamarsheh Probability & Random Variables 13


The probability function is thus given by

 the distribution function for the random variable X

Dr. Qadri Hamarsheh Probability & Random Variables 14


Probability Density Function (PDF)
 Continuous Random Variables: A non-discrete random variable X is
said to be absolutely continuous, or simply continuous, if its
distribution function may be represented as

where the function f (x) has the properties

 A function f (x) is more often called a probability density function


or simply density function
 Interval probability that X lies between two different values, say, a
and b, is given by

Dr. Qadri Hamarsheh Probability & Random Variables 15


 The probability density function (or density function) (PDF) is
defined as the derivative of the distribution function:

 Properties of Density Functions:

 Density Function for Discrete Random Variable (mass function):


 The density function of a discrete random variable X is given by:

Dr. Qadri Hamarsheh Probability & Random Variables 16


o Example:

Where 𝜹(. ) is the unit impulse defined by:

o Example: Let X have the discrete values in the set


{−𝟏, −𝟎. 𝟓, 𝟎. 𝟕, 𝟏. 𝟓, 𝟑}.
The corresponding probabilities are
{𝟎. 𝟏, 𝟎. 𝟐, 𝟎. 𝟏, 𝟎. 𝟒, 𝟎. 𝟐}:
The distribution function:

Dr. Qadri Hamarsheh Probability & Random Variables 17


The density function:

Dr. Qadri Hamarsheh Probability & Random Variables 18


o Example: The corresponding distribution and the density
functions for the wheel of chance experiment are shown in Fig.

Dr. Qadri Hamarsheh Probability & Random Variables 19


o Example :
a) Find the constant c such that the function

Is a density function,
b) Compute 𝑷(𝟏 < 𝑿 < 𝟐).
c) Find the distribution function for the random variable
d) Use the result of (c) to find 𝑃(𝟏 < 𝒙 ≤ 𝟐).
Solution:
a) using the 2 property

and since this must equal 1, we have c = 1/9

Dr. Qadri Hamarsheh Probability & Random Variables 20


b)

c)

If 𝒙 < 𝟎, then 𝑭(𝒙) = 𝟎.


If 𝟎 ≤ 𝒙 < 𝟑, then

If 𝒙 ≥ 𝟑, then

Dr. Qadri Hamarsheh Probability & Random Variables 21


Thus the required distribution function is

d)

Dr. Qadri Hamarsheh Probability & Random Variables 22

You might also like