Chapter 2 (Sec3)
Chapter 2 (Sec3)
Examples:
- Tossing a coin, S={H,T}: we define X =¿
X ( H )=1, X ( T )=0.
- Tossing a die, S={1,2,3,4,5,6}: we define
X =¿
2 if 1∨2 appers
{
Y = 0 if 3∨5 appears
−4 if not
- A student entering a final exam in Sta215, is selected at random. Let X , be
the score of this selected student. X ∈[0,40].
Examples.
2 if 1∨2 appears
1) A fair die is tossed. Let Y = 0
−4 { if 5 appears
if not
Find the probability mass function of Y .
2
f Y ( 2 )=P ( Y =2 )=P (1∨2 appears ) = =1/3.
6
1
f Y ( 0 ) =P ( Y =0 )=P ( 5 appears )= .
6
f Y (−4 )=P ( Y =−4 )=1− ( 13 + 16 )= 12 .
x -4 0 2
fY (x) ½ 1/6 1/3
2) One ball is selected at random from a box containing 4 red, 7 blue and
3 yellow balls. Let X ={−1 ¿ ¿0¿if the ball is¿¿ 1¿if not ¿
Find the probability mass function of X .
f X (−1 )=P ( X =−1 )=P ( theball is¿ )=4 /14
f X ( 2 )=1−0.01=0.99 .
x -2 2
f X(x) 0.01 0.99
F X ( x ) =P ( X ≤ x )=0
0 x←1
FX ( x) =
{
0.4−1 ≤ x< 0
0.650 ≤ x< 1
1 x≥1
0 x ←3
{
0.2−3 ≤ x ←1
F X ( x ) = 0.5−1 ≤ x <1
0.6 1 ≤ x <2
0.8 2≤ x< 4
1 x≥4
E ( 2 X )=2 E ( X ) =¿−0.1
E ( 1−5 X )=1−5 E ( X ) =1+ 0.25=1.25
2 2 2
E ( X 2)=(−1 ) 0.4+ ( 0 ) 0.25+ ( 1 ) 0.35=0.75
E ( 5 X 2 ) =5 E ( X 2 )=5∗0.75=3.75
4) Variance:
- σ ( X ) =Var ( X )=E( X−E ( X ))2=E (X ¿¿ 2)−¿ ¿.
2
2
Var ( X )=0.75−(−0.05 ) =0.7475 .
Var ( 2 X−1 )=4 Var ( X )=2.99 .
σ ( X )=√ 0.7475=0.8645 .
Examples:
1- A fair die is tossed five times. Let X be the number of times, the number
“2” appears. Compute P ( X=3 ) .
1 3 5 2
X ∈{0,1,2,3,4,5 }. P ( X=3 )=C (5,3) ()
6 6
( )
2- The probability that Ali hits the target is 0.6. Find the probability that Ali
hits the targets:
a) Only twice in 6 trials.
b) At least once in 10 trials.
a) Let X be the number of times, Ali hits the target. X has a Binomial
distribution with parameters n=6 and p=0.6.
P ( X=2 )=C ( 6,2 ) ( 0.6 )2 ( 0. 4 )4 =0.183.
b) Let X be the number of times, Ali hits the target. X has a Binomial
distribution with parameters n=10 and p=0.6.
P ( X ≥1 ) =1−P ( X=0 )=1−C ( 10 ,0 )( 0.6 ) ( 0.4 ) =0. 999.
0 10
2. Negative-Binomial distribution.
Each trial has only two outcomes called Success and failure and the
probability of success is p. We define the discrete random variable
X as the number of trials needed to get r successes. We say that X
has a Negative-Binomial distribution with parameters r and p.
- X ∈{r , r+ 1, r +2 , … }.
- P ( X=x )=C(x−1 , r−1) p r (1− p) x−r .
r r ( 1− p )
- E ( X ) = , Var ( X )= .
p p2
Ex: Find the probability to get the number “2” for the third time in the fifth toss
of a fair die.
1 3 2
C (4 ,2)( ) (5 /6)
6
Ex: Find the probability to get the red ball for the third time in the seventh
selection from a box containing 4 red and 5 blue balls.
4 3 5 4
C (6 , 2)( ) ( ) .
9 9
3. Hypergeometric distribution.
Suppose a set A of N elements, classified in K elements of type 1 and N-K
elements of type 2. n elements are selected at random (without replacement)
from this set. Let X be the number of selected elements of type 1. We say that X
has a hypergeometric distribution with parameters N, K and n.
- X ∈{0 , 1, 2 , … , min (n , K )}.
- P ( X=x )=C(K , x)C( N −K , n−x )/C( N , n).
nK nK K N −n
- E ( X ) = , Var ( X )=( )(1− ) .
N N N N−1
Ex: 4 people are selected at random and without replacement from a group of 6
men and 3 women. Find the probability that only 2 men are selected.
C ( 6 , 2 ) C (3 , 2 )
C (9 , 4 )