0% found this document useful (0 votes)
9 views32 pages

Chapter 3 2022

probability and Statistics Chapter 3 Probability distribution function

Uploaded by

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

Chapter 3 2022

probability and Statistics Chapter 3 Probability distribution function

Uploaded by

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

Probability and Statistics

Chapter 3
Random Variables and
Probability Distributions

Dr. Yehya Mesalam 1


Concept of a Random Variable
• Random Variable (RV):
A random variable is a function that assigns a real number
to each outcome in the sample space of a random
experiment

:‫• المتغير العشوائي‬


(S ) ‫هو دالة ذات قيمة حقيقية معرفه على فضاء العينة‬

Random Variables are denoted by upper case letters (X)


Individual outcomes for an RV are denoted by lower
case letters (x)
Dr. Yehya Mesalam 2
Types of Random Variables
Random Variables RV

Quantitative RV Qualitative RV

Continuous RV Discrete RV Non Ordinal Ordinal

• Length  Number of sales Can't be Can be arranged


• Depth  Number of calls arranged •Excellent
• Volume  Shares of stock Green •Very Good
• Time  People in line Blue
 Mistakes per page Red •Good
• Weight Black •

Dr. Yehya Mesalam 3


Discrete Probability Distribution
The probability distribution of a discrete
random variable is called a probability
function if
Probability (Mass) Function :
f ( x)  0 x
 f ( x)  1
all x

Dr. Yehya Mesalam 4


Continuous Probability Distribution
The probability distribution of a continuous
random variable is called a probability
function if
Probability (Density) Function :
f ( x)  0 x

 f ( x)  1
all x

Dr. Yehya Mesalam 5


Cumulative Probability Function
• The cumulative probability function, denoted
F(xn), shows the probability that X is less than or
equal to xn
F(x n )  f(X  xn )
• In other words, F(x n ) 
x x

f(x)
n

x
F(x n )   f(x) dx


Dr. Yehya Mesalam 6


Example
• Determine the value of K so that each of the
following functions can serve as a probability
distribution of the discrete random variable X:
K ( X 2  4) for X  0, 1, 2, 3;
f ( x)  
0 Otherwise
Solution:
X 0 1 2 3 Sum
f(x) 4k 5K 8K 13K 30K
30K=1 , then K=1/30
( X 2  4)
f ( x)  for X  0, 1, 2, 3.;
30
Dr. Yehya Mesalam 7
Example

 aX 0  X 1
a 1 X  2

f ( x)  
 - aX  3a 2X3
0 elsewhere
• 1. Find the constant a
• 2. Find the probability
Solution:
1 2 3

 f ( x)dx   f ( x)dx   f ( x)dx  1


0 1 2
1 2 3

 ax dx   a dx   (ax  3a)dx  1
0 1 2
Dr. Yehya Mesalam 8
Solution:
1 3
x 2
 
2
 ax1   a
x
 3aX   1
2
a 
 2 0  2 2
2a=1, then a=0.5
 X
 2 0  X 1
1
 1 X  2
f ( x)   2
-X 3

 2 2 2X3
0
 elsewhere

1 1.5
1 1 1 1
P( x  1.5)   xdx   dx   (1.5  1)  0.5
20 2 1 4 2
Dr. Yehya Mesalam 9
Example
 2x 1
 x  0, 1, 2, 3, 4
f ( x)   25

 0 otherwise
• Required:
(a) P(x=4) (b) P(2  x  4)
(c) P( x  1) (d) P(x>-6)
Solution:
x 0 1 2 3 4 sum
f(x) 0.04 0.12 0.2 0.28 0.36 1
Cumulative F(x) 0.04 0.16 0.36 0.64 1

(a) P(x=4)=0.36
or P(x=4) = F(4) – F(3) = 1- 0.64 = 0.36
Dr. Yehya Mesalam 10
Solution:
(b) P(2  x  4)  p(2)  p(3)  p(4) 

0.2+0.28+0.36=0.84
or = F(4) – F( 1) = 1 – 0.16 = 0.84

(c) P( x  1)  0.16

(d) P(x>- 6) =1

Dr. Yehya Mesalam 11


Example
The probability mass function of the random variable X is given
as
x 1 2 3
f(x) 1/2 1/3 1/6

Find the distribution function F(x) and graph this distribution


function.
Solution:

0 x 1
1
 2 1  x  2
F x    5
 2 x3
6 x3
 1 Graph of F(x) (step function)

Dr. Yehya Mesalam 12


Discrete Probability Distribution
Experiment: for toss 4 coins, Calculate the mean
and variance

Let X = # heads.

Dr. Yehya Mesalam 13


Solution:
H
T
H
H
T
T H
H H
T
H
H T T T
H
H T
H
H T T
T H
H T
T H
Dr. Yehya Mesalam
T T 14
Solution:
H 4
T 3
H 3
H
T 2
T H 3
H T 2

No. of Heads
H
H 2
T T T 1
H 3
H
H T 2
H 2
H T T 1
T H 2
H T 1
T H 1
Dr. Yehya Mesalam
T T 0 15
Solution:

Let X is a R.V represent the number heads

X 0 1 2 3 4

f 1 4 6 4 1

f(x) 1/16 4/16 6/16 4/16 1/16

F(x) 1/16 5/16 11/16 15/16 16/16

x.f(x) 0 4/16 12/16 12/16 4/16

Mean =µ = x.f(x) = 32/16 =2

Dr. Yehya Mesalam 16


Probability mass function plot

Dr. Yehya Mesalam 17


Probability histogram

Dr. Yehya Mesalam 18


Discrete cumulative distribution function

15/16 16/16

11/16

5/16

1/16

Dr. Yehya Mesalam 19


Joint Probability Distributions

Dr. Yehya Mesalam 20


Joint Probability Distributions

Dr. Yehya Mesalam 21


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 f(x, y),
(b) P[(X, Y ) ∈ A], where A is the region {(x, y)|x + y ≤ 1}.

Dr. Yehya Mesalam 22


solution

The possible pairs of values


X (blue) Y (red)
0 0
0 1
1 0
1 1
2 0
0 2

Dr. Yehya Mesalam 23


solution
• f(0,0) = this represent the probability of getting
0 blue and 0 red means the two ballpoint pens
are green can be selected by 3 ways
• f(0,0 ) = 3/28
• The denominator (28) represents the number
of ways of selecting two ballpoint pens from
eight ballpoint pens
• f(0,1) = 0 blue, 1 red and 1 green (2*3 = 6)
• f(0,1 ) = 6/28
Dr. Yehya Mesalam 24
Solution

Dr. Yehya Mesalam 25


Solution
(b) The probability that (X, Y ) fall in the region A
is

Dr. Yehya Mesalam 26


Solution
(b) The probability that (X, Y ) fall in the region A
is

P[(X, Y ) ∈ A] = P(X + Y ≤ 1) =
f(0, 0) + f(0, 1) + f(1, 0)

Dr. Yehya Mesalam 27


Example
Verify the following function is probability function, then
find
P[(X, Y ) ∈ A],
where A = {(x, y) | 0 < x < 0.25, 0.25< y < 0.5}.

Dr. Yehya Mesalam 28


Solution
(a) The integration of f(x, y) over the whole region
is

Dr. Yehya Mesalam 29


Solution
(b) To calculate the probability, we use

Dr. Yehya Mesalam 30


Solution

Dr. Yehya Mesalam 31


3232

You might also like