Вы находитесь на странице: 1из 23

Lecture 2

Concept of a Random Variable

• A function whose value determined by each


element in the sample space is called a random
variable.
• We use a capital letter X to denote a random
variable and its corresponding small letter x for
one of its value.
• e.g. S = {HHH, HHT, HTH, HTT, THT, TTH, TTT} is a
result of tossing a coin three times so if we
assume the random variable X to assume a value
2 heads for all elements then E = {HHT, HTH,
THH}.
Example

• Two balls are drawn in succession without


replacement from an urn containing four red
balls and three black balls. What are the
possible outcomes and the value of y of the
random variable Y, where Y is the number of
red balls.
Sample event y

RR 2

RB 1

BR 1

BB 0
• If a sample space contains a finite number of
possibilities or unending sequences with as many
elements as there as whole numbers it is called a
discrete sample space and a random variable define
over this space is called a discrete random variable.
• If a sample space contains an infinite number of
possibilities equal to the number of points on a line
segment , it is called continuous sample space and a
random variable defined over this space is called a
continuous random variable.
• Count data discrete
• Measured data continuous
• The function f(x) is a probability distribution
function or a probability distribution of the
discrete random variable X if, for each possible
outcome x,
• f(x) ≥ 0
• ∑ f(x) =1
• P(X = x) = f(x)
Example

• Find the probability distribution function of


the sum of number when a pair of dice is
tossed.
• Solution
Solution
X 2 3 4 5 6 7 8 9 10 11 12

f(x) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
The cumulative distribution F(x) of a discrete random variable X
with a probability distribution f(x) is given by
Example

• Find the cumulative distribution of the


random variable X for the probability
distribution of the number of heads when a
coin is tossed four times.
Solution

• There are 24 = 16 points in the sample space.


To obtain the number of ways of getting say 3
heads, we need to consider the number of
ways of partions four outcomes with three
heads assigned to one cell and a tail assigned
to the other.
• This can be done (43) ways = 4, in general x
heads and 4 – x tails can occur in (4x) ways
where x can be 0, 1, 2, 3, 4.
• The probability distribution f(x) = P(X = x) is f(x) = (4x )/16 ,
x = 0, 1, 2, 3, 4.
• Direct calculation gives f(0) = 1/16, f(1) = 1/4, f(2) = 3/8, f(3)
= 1/4, f(4) = 1/16.
• F(x) = 0 for x < 0
• = 1/16 for 0 ≤ x < 1
• = 5/16 for 1 ≤ x < 2
• = 11/16 for 2 ≤ x < 3
• = 15/16 for 3 ≤ x < 4
• = 1 for x ≥ 4
• f(2) = F(2) – F(1) = 11/16 – 5/16 = 6/16 = 3/8
• It is often helpful to look at F(x) in a graphic form.
Continuous Probability Distribution
The function f(x) is a probability density function for continuous
random variable X, defined for the set of real number R, if

• f(x) ≥ 0
Example

Let the random variable X have the probability density function


f(x) = x2/3 -1 < x <2
= 0 elsewhere
•Verify that

•Find P(0 < x <1)


Solution

= 8/9 + 1/9 = 1

P(0 < x < ) 1=

= 1/9
The cumulative distribution F(x) of a continuous random
variable X with density function f(x) is given by

P( a < x < b ) = F(b) – F(a)

f(x) = d F(x)/d x if the derivative exists.


Example

For the density function in the above continuous distribution

example find F(x) and use to evaluate P( 0 < x < 1)

Solution

P( 0 < x < 1) = F(1) – F(0) = 2/9 – 1/9 = 1/9


Joint Probability Distribution

The function f(x,y) is a joint probability function


of the discrete random variable X and Y if
(1)f(x,y) ≥ 0 for all (x,y)

2
( )

(3)

for any region A in x-y plane


Example

• Two refills for a ballpoint pen are selected at


random from a box that contains three blue
refills, two red refills, and three green refills. If
X is the number of blue refills, and Y is the
number of red refills, find
• (1) The joint probability function f(x,y)
• (2) P{(X,Y)ϵA}, where A is the region {(x,y)І x+y
≤ 1}
Solution
• The possible pairs of values (x,y) are (0,0), (0,1),
(1,0), (1,1), (0,2), (2,0). f(0,1) represent the
probability that a red and green refills are
selected. The total number of equally likely ways
of selecting any refills from the eight is (82)=28.
The number of ways of selecting one red from
two red refills and one green from three green
refills is (21)(31)=6, hence f(0, 1) =6/28=3/14.
• Similar calculation yield the possibility for other
cases as shown below
x=0 x=1 x=2
y =0 3/28 9/28 3/28
y=1 3/14 3/14
y=2 1/28
f(x,y) = (3x)(2y)(32 –x-y)/(82)
x = 0, 1, 2 y= 0, 1, 2 0 ≤ x + y ≤ 2

P{(X,Y)ϵ A} = P(X+Y ≤ 1) = f(0,0) + f(0,1) + f(1,0) = 3/28 + 3/14 +9/28 = 9/14


The function f(x,y) is joint density function of
the continuous random variables X and Y if
(1) f(x,y) ≥ 0 for all (x,y)

(2)

(3)

for any region A in x-y plane.


Example
Consider the joint density function
f(x,y) = x(1+ 3y2)/4 0 ˂x ˂2 , 0 ˂y ˂ 1
= 0 elsewhere

(1) Verify

(2) Find P{(X,Y)ϵA} where A is the region {(x,y)І 0 ˂x˂1,1/4 ˂y˂1/2}

Вам также может понравиться