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

Random Variables, Cumulative Distribution Functions, Probability Mass Function

The document discusses random variables, cumulative distribution functions (CDFs), and probability mass functions (PMFs). It defines random variables as associating numbers with outcomes from a sample space. CDFs give the probability that a random variable is less than or equal to a value, with discrete variables having piecewise constant CDFs and continuous variables having continuously varying CDFs. PMFs give the probability of a discrete random variable equaling a specific value. Examples are provided of finding CDFs and PMFs for random variables like coin tosses.

Uploaded by

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

Random Variables, Cumulative Distribution Functions, Probability Mass Function

The document discusses random variables, cumulative distribution functions (CDFs), and probability mass functions (PMFs). It defines random variables as associating numbers with outcomes from a sample space. CDFs give the probability that a random variable is less than or equal to a value, with discrete variables having piecewise constant CDFs and continuous variables having continuously varying CDFs. PMFs give the probability of a discrete random variable equaling a specific value. Examples are provided of finding CDFs and PMFs for random variables like coin tosses.

Uploaded by

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

Probability and Random

Variables
LECTURE 4
Random Variables, Cumulative Distribution Functions, Probability Mass Function
Content

Random Variable Types


Cumulative Distribution Functions
Probability Mass Function
Random Variables
Given an experiment and the corresponding set of possible outcomes (the sample
space), a random variable associates one (and only one) particular number with each
outcome.
Two Types of Random Variables

 A discrete random variable can assume a countable number of values; i.e. the
range is either finite or countably infinite.
 Number of sales
 Number of calls
 Shares of stock
 People in line
 Mistakes per page
 A continuous random variable can assume any value along a given interval of a
number line; i.e. the range is uncountably infinite number of values.
 Length
 Depth
 Volume
 Time
 Weight
Cumulative Distribution Functions

 The distribution function [or cumulative distribution function


(CDF)] of X is the function defined by

 Any random variable associated with a given probability model has


a CDF
Properties of a CDF
Properties of a CDF

 If X is discrete, then FX has a


piecewise constant and
staircase-like
form.

 If X is continuous, then FX
has a continuously varying
form.
Example: Tossing a fair coin 3 times
 If X is the r.v. giving the number of heads obtained, find and sketch the CDF
FX(x) of X
 Solution: S = {HHH,HHT,HTH,THH,HTT,THT,TTH,TTT} Range of X={0,1,2,3}
 P(X=0) = 1/8, P(X=1) = 3/8, P(X=2) = 3/8, P(X=3) = 1/8
FX(─1) = P(X ≤ ─1) = P(X< 0) = P(Ø) = 0 Ø
FX(0) = P(X ≤ 0) = 1/8 {TTT}
FX(1) = P(X ≤ 1) = 4/8=1/2 {HTT,THT,TTH,TTT}
FX(2) = P(X ≤ 2) = 7/8 {HHT,HTH,THH,HTT,THT,TTH,TTT}
FX(3) = P(X ≤ 3) = 8/8=1 S
FX(4) = P(X ≤ 4)= P(X ≤ 3) = 1
Example: Tossing a fair coin 3 times
FX(-1) = P(X ≤ -1) = P(X< 0) = P(Ø) = 0
FX(0) = P(X ≤ 0) = 1/8
FX(1) = P(X ≤ 1) = 4/8=1/2
FX(2) = P(X ≤ 2) = 7/8
FX(3) = P(X ≤ 3) = 8/8=1
FX(4) = P(X ≤ 4)= P(X ≤ 3) = 1
Determination of Probabilities from
the Distribution Function
Example: Four-letter alphabet
An information source generates symbols at random from a four-letter alphabet {a, b, c, d}
with probabilities P(a) =1/2, P(b) =1/4, and P(c) = P(d) =1/8. A coding scheme encodes
these symbols into binary codes as follows:
a 0
b 10
c 110
d 111
Let X be the r.v. denoting the length of the code-that is, the number of binary symbols (bits)
(a) What is the range of X?
(b) Assuming that the generations of symbols are independent, sketch the CDF FX(x) of X
and specify the type of X.
(c) Find P(X ≤1), P(1 <X ≤ 2), P(X > 1), and P(l ≤ X ≤ 2).
Solution: Four-letter alphabet

P(a) =1/2, P(b) =1/4, and P(c) = P(d) =1/8.


a 0  X=1  P(X=1)=P(a)=1/2
b 10  X=2  P(X=2)=P(b)=1/4
c 110  X=3
P(X=3)=P(c)+P(d)=1/4
d 111  X=3

(a) Range of X = RX= {1,2,3}


Solution: Four-letter alphabet

b) P(X=1)=1/2, P(X=2)=1/4, P(X=3)=1/4


FX(0) = P(X ≤ 0) = P(X < 1) = 0,
FX(1) = P(X ≤ 1) = 1/2,
FX(2) = P(X ≤ 2) = 1/2+1/4 = 3/4,
FX(3) = P(X ≤ 3) = 1/2+1/4+1/4 = 1,

X is a discrete random variable


Solution: Four-letter alphabet

c) FX(1) = P(X ≤ 1) = 1/2, FX(2) = P(X ≤ 2) = 3/4, FX(3) = P(X ≤ 3) = 1.

P(X ≤1) = FX(1) = 1/2 ,

P(1 <X ≤ 2) = FX(2)- FX(1)=3/4-1/2=1/4


P(X > 1) = 1- FX(1) = 1-1/2 = 1/2

P(1 ≤ X ≤ 2) = P(X=1)+ P(1 <X ≤ 2) = P(X=1)+ FX(2)- FX(1)

= 1/2+3/4-1/2 = 3/4.
Discrete Random Variables and
Probability Mass Functions (PMFs)
Let X be a discrete random variable. If x is any
possible value of X, then the probability mass of x,
denoted pX(x), is the probability of the event (X = x):
pX(x)= P(X = x)

The function pX(x) is called the probability mass


function (PMF) of the discrete r.v. X.
Properties of pX(x)
Example: Two Independent Tosses of a
Fair Coin
Let X be the number of heads obtained in the experiment of two independent
tosses of a fair coin. Find PMF of X.
Solution: S = {HH,HT,TH,TT}  Range of X={0,1,2}
pX(x)= P(X = x)

pX(0)= P(X = 0)=1/4


pX(1)= P(X = 1)=1/2
pX(2)= P(X = 2)=1/4
pX(x)= P(X = x)= 0 otherwise
Example:

 Solution
Solution:

a) FX(0) = P(X ≤ 0) = P(X < 1) = 0,


FX(1) = P(X ≤ 1) = pX(1) = 1/2
FX(2) = P(X ≤ 2) = =1/2+1/4 = 3/4,
FX(3) = P(X ≤ 3) = =1/2+1/4+1/8 = 7/8,
FX(4) = P(X ≤ 4) = =1/2+1/4+1/8+1/8 = 1,
Solution:

(b) P(X ≤ 1) = pX(1) = 1/2


P(1 <X ≤ 3) = FX(3)- FX(1)=7/8-1/2=3/8
P(1 ≤ X ≤ 3) = P(X=1)+ P(1 <X ≤ 3) = pX(1) +FX(3)- FX(1)
=1/2+7/8-1/2=7/8
Example: Tossing an honest coin
repeatedly
Consider the experiment of tossing an honest coin
repeatedly. Let the r. v. X denote the number of tosses
required until the first head appears.
a) Find and sketch the PMF of X
b) Find and sketch the CDF of X
Solution

a) k: number of tosses until the first head appears, P({H})= P({T})=1/2


k outcome probability
1 H 1/2
2 TH (1/2)2
3 TTH (1/2)3
… … …
k TTT…TH (1/2)k
Solution
b)

You might also like