0% found this document useful (0 votes)
20 views35 pages

Chapter 3

This document discusses random variables and their probability distributions. It defines discrete and continuous random variables and explains how to find their probability distributions using either a probability mass function or probability density function. Examples are provided to demonstrate calculating probabilities for discrete and continuous random variables.

Uploaded by

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

Chapter 3

This document discusses random variables and their probability distributions. It defines discrete and continuous random variables and explains how to find their probability distributions using either a probability mass function or probability density function. Examples are provided to demonstrate calculating probabilities for discrete and continuous random variables.

Uploaded by

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

CHAPTER THREE

ONE DIMENSIONAL RANDOM


VARIABLES
3.1 Random Variable
• Definition: Let E be an experiment and S be a sample space
associated with the experiment. A function X that assigns to every
element s ∈ S , a real number, X(s), is called a random variable.
• The set of all possible values of the random variable X is called
the range space.
• Moreover, the domain of the random variable X is S.
• A random variable, X, is a function that assigns a single, but
variable, value to each element of a sample space.
• A random variable, X, provides a means of assigning numerical
values to experimental outcomes.
• A random variable, X, is a numerical description of the
outcomes of the experiment or a numerical valued function
defined on sample space, usually denoted by capital letters.
Random variable

Example: Flip a coin three times, let X be the number of heads in three
tosses.
S Rx
X(S)
HHH 3
HHT 2
HTH 2
HTT 1
THH 2
THT 1
TTH 1
TTT 0

X = {0, 1, 2, 3}
3
Random variable

Notice that:
each possible outcome is assigned a single numeric value,
all outcomes are assigned numeric values, and
the value assigned varies across the outcomes.
The count of the number of heads is a random variable
Probability Distribution
The probability distribution for a random variable describes how the
probabilities are distributed over the values of the random variable.

4
Types of Random Variables
• Depending upon the numerical values it can assume, a random variable can
be classified into two major divisions.
 Discrete Random Variable and

 Continuous Random Variable

5.2. Discrete Random Variable


• Definition: Let X be a random variable. If the number of possible values of
X (i.e. Rx) is finite or countably infinite, then we call X as a discrete random
variable. That is, the possible values of X may be listed as x1, x2,…, xn,… In
the finite case, the list terminates and in the countably infinite case the list
continues indefinitely.
Examples:
– Toss a coin n times and count the number of heads.
– Number of children in a family.
– Number of car accidents per week.
– Number of defective items in a given company.
– Number of bacteria per two cubic centimeter of water.
Probability Distribution of Discrete
Random Variable
• Definition: Let X be a discrete random variable. Hence, R x consists
of at most a countably infinite number of values, x1, x2,…, with each
possible outcome xi we associate a number P(xi)=P(X= xi) called the
probability of xi. The probabilities P(xi) for i = 1, 2, 3, . . . , n, ... must
satisfy the following two conditions:
I .P ( xi )  0 foralli
n
II . P ( xi )  1
i 1

• The function p defined above is called the probability function (or


point probability function) of the r.v X.
• Furthermore, the tabular arrangement of all possible values of X with
their corresponding probability is called probability distribution of
X.
Probability Distribution of Discrete Random variable

• Example: Roll two six sided dice. Let X be a random variable defined as
sum of the numbers shown up. Construct a probability Distribution of X?

Die 2
1 2 3 4 5 6
1 (1,1) 2 (1,2) (1,3) 4 (1,4) 5 (1,5) 6 (1,6) 7
3
Die 1 2 (2 ,1) 3 (2,2) 4 (2, 3) 5 (2, 4) 6 (2,5 ) 7 (2, 6) 8
3 (3, 1) 4 (3, 2) 5 (3, 3) 6 (3, 4) 7 (3, 5) 8 (3, 6) 9
4 (4, 1) 5 (4, 2) 6 (4, 3) 7 (4, 4) 8 (4, 5) 9 (4, 6) 10
5 (5, 1) 6 (5, 2) 7 (5, 3) 8 (5, 4) 9 (5, 5) 10 (5, 6) 11
6 (6, 1) 7 (6, 2) 8 (6, 3) 9 (6, 4) 10 (6, 5) 11 (6, 6) 12

X 2 3 4 5 6 7 8 9 10 11 12
P(X=x) 361 2
36
3
36
4
36
5
36
6
36
5
36
4
36
3
36
2
36
1
36

8
3.3. Continuous Random Variable

• Definition: A random variable X is said to be a


continuous random variable if it assumes all
values in some interval (c,d), where c and d are
real numbers.
• Examples:
– Height of students at a certain college .
– Mark of a student.
– Life time of light bulbs.
– Length of time required to complete a given training.
Probability Density Function (pdf) of Continuous Random Variables

 A random variable X is said to be a continuous random variable if there


exists a function f, called the probability density function (pdf) of X,
satisfying the following conditions:

a ) f x   0 for all x

b)  f x dx  1


c) for any a and b with   a  b  

b
pa  x  b    f x dx
a

10
Probability Density Function (pdf) of Continuous Random Variables

Remark
Probability at a point is zero

a
px  a    f x dx  0
a

Consider following equality holds for a continuous random variable

b
pa  x  b   pa  x  b   pa  x  b   pa  x  b    f x dx
a

11
Probability Density Function (pdf) of Continuous Random Variables

Example 1: Let X be a continuous random variable with probability


density function (pdf):
2 x, if 0  x  1
f x   
0, otherwise

a. verify that f is a pdf


 Solution
 f is legitimate if it is positive valued and area under curve (green shaded) is one

 f x dx  1
RX

1
1
 2x 
11

0 2 xdx   1  1 


0

1 12
Probability Density Function (pdf) of Continuous Random Variables

Example 1: Let X be a continuous random variable with probability


density function (pdf):

b. find P(0.5<x<0.75)

0.75
p0.5  x  0.75   2 xdx  x 
2 0.75
0.5
0.5

 0.752  0.52

 0.3125

13
Probability Density Function (pdf) of Continuous Random Variables

Example 2: For some constant c, the random variable X has probability


density function: cx 2 , if 0  x  1
f x   
0, otherwise

a. What should be the value of c, so that f is a pdf

 f x dx  1
RX
1
  cx 2 dx  1
0
1
 cx  2 1
    1
 2 1  0
1
c  b. Find P(X≥1/2)
  x3   1
3 0
c3 14
Conditional Probability in the Case of Continuous Random Variables

Recall that for the case of discrete random variables the conditional
probability is given by:

The same formulation holds true for the case of continuous random variables
except that A and B take range of values (intervals) rather than discrete values.

15
Conditional Probability in the Case of Continuous Random Variables

 Example: The diameter of an electric cable is assumed to be a continuous


random variable, say X, with pdf

6 x1  x , if 0  x  1
f x   
0, otherwise
 Compute

 1 1 2
P x  |  x  
 2 3 3

16
Conditional Probability in the Case of Continuous Random Variables
Solution

Let A and B 6 x1  x , if 0  x  1


f x   
0, otherwise
A∩B:

Required: P(A/B)

1
1 1 2
 
1
pA  B   p  x     6 x1  x dx  3x  2 x 1
2 3 2

3 2 1 3
3
 1 2
 1 
3
   1 
2
 1 
3

  3    2       3    2    
 2  2    3  3  
   
 0.2407
17
Conditional Probability in the Case of Continuous Random Variables
Solution

   6 x1  x dx  3x  2 x  1


1 2 2 2
pB   p  x  2 3 3

3 3 1 3
3
  2 2  2 
3
   1 
2
 1 
3

  3    2       3    2    
 3  3     3   3  

Then  0.4815

pA  B 
pA / B  
p B 
0.2407
  0.4999
0.4815

18
Cumulative distribution function and its properties
The cumulative probability function, denoted F(x), shows the probability that X
is less than or equal to x
F x   P  X  x 
Notation: Cumulative distribution function is usually denoted by upper case
alphabets.
Theorems
If X is a discrete random variable, then
F x   P X  x    P x j  x j  x
j
If X is a continuous random variable, then
x
F x   P  X  x    f (u )du

19
Cumulative distribution function and its properties
Example 1: Let S={HH, HT, TH, TT} and X: the number of heads. Clearly, X is a
discrete random variable. Find the CDF of X.
X 0 1 2
P(X=x) 1 2 1
4 4 4

Solution
The possible values for X are 0, 1, and 2.

0, if x  0

1 / 4, if 0  x  1
F x   
3 / 4, if 1  x  2

1, if x  2
20
Cumulative distribution function and its properties
Example 2: Find the cdf of the random variable X whose pdf is given by
 x, if 0  x  1

f x    2  x , 1  x  2

0, otherwise

Solution
By definition CDF, F(X), is P(X≤x)

x
F x    f t dt


21
Cumulative distribution function and its properties
Example 2: Find the cdf of the random variable X whose pdf is given by
Solution
For x≤0
x x
F x    f t dt   0dt  0
 

For 0≤x<1

x x x
1 2 1 2
F x    f t dt  0 tdt   t   x
2 0 2

22
Cumulative distribution function and its properties
Example 2: Find the cdf of the random variable X whose pdf is given by
Solution
For 1≤x<2
x 0 1 x
F x    f t dt   0dt   t dt   2  t dt
  0 1

1 x
0 1  1 
 0   t 2   2t  t 2 
2 0  2 1

1  1   1 
 0   2 x  x 2    2  
2  2   2 
1 2
 2x  x 1
2

23
Cumulative distribution function and its properties
Example 2: Find the CDF of the random variable X whose pdf is given by
Solution x 0 1 2 x
F x    f t dt   0dt   t dt   2  t dt   0dt 
For x≥2
  0 1 2

1 2
0 1  1 
 0   t 2   2t  t 2   0
2 0  2 1
Hence the CDF of X is
0, if x0

1 x2 , if 0  x  1
 2
F x   
2 x  1 x 2  1, if 1  x  2
 2

1, if  2
24
Cumulative distribution function and its properties
Theorem:
If X is a continuous random variable, then we have

d
f x   F x 
dx

If X is a discrete random variable, then we have

p x j   F x j  F x j 1 

Remark: P(a ≤ X ≤ b)=F(b)-F(a)

25
Cumulative distribution function and its properties
Example: Suppose X is a continuous random variable with cdf
0, if x  0
F x   
1  e  x , if x  0

Find the pdf of X


Solution
d
f x   F x 
dx

f x   1  e  x 
d
dx

e  x , if x  0
f x   
0, otherwise
26
Cont…
• Suppose X is a continuous random variable
with pdf.
• f(x)= if 0≤x<1
0 otherwise
Find CDF of the random variable X
Cont…
• Suppose X is a discrete random variable with
pdf
X -2 -1 0 1 2
P(x) 1/5 1/6 1/5 1/15 11/30

• Find CDF of the random variable X


Cont.
• Example: If the probability density function of the random variable X is
given by

1
f x   ( 2 x  1)
144
for x = 1, 2, 3, ..., 12 then find the cumulative distribution function of X.
Cont.
• The space of the random variable X is given by
RX = {1, 2, 3, ..., 12}
• F(1) = 1/144
• F(2) =4/144
………………

………………

• F(12)=1
Cont.
• If the space 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).
Cont.
• Example: Find the probability density function of the random variable X
whose cumulative distribution function is

0.00, if x  1
0.25, if  1  x  1


F x   0.5, if 1  x  3
0.75, if 3  x  5


1 if  5
Cont.
• 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.
Cont.
• Example: What is the probability density function of the random variable
whose cdf is

F(x) =-∞<x <∞


• f(x) = F(x)

=
Cont…
• f(x)= if 0≤x<1
0 , Otherwise
a. Find the values of c if f(x) is pdf.
b. Find CDF of X

You might also like