محاضرة 6و 7
محاضرة 6و 7
محاضرة 6و 7
Theorem 5.1:
If the discrete random variable X has a discrete uniform
distribution with parameter k, then the mean and the variance of
k
X are:
x i
E(X) = = i =1
k k
i
( x
i =1
− ) 2
Var(X) = 2 =
k
Example 5.3:
Find E(X) and Var(X) in Example 5.2.
Solution: k
xi
i =1 1+ 2 + 3 + 4 + 5 + 6
E(X) = = = = 3 .5
k 6
k k
( xi − ) ( xi − 3.5)
2 2
i =1
Var(X) = 2 = = i =1
k 6
(1 − 3.5) 2 + (2 − 3.5) 2 + + (6 − 3.5) 2 35
= =
6 12
5.3 Binomial Distribution:
Bernoulli Trial:
· Bernoulli trial is an experiment with only two possible
outcomes.
· The two possible outcomes are labeled:
success (s) and failure (f)
· The probability of success is P(s)=p and the probability
of failure is P(f)= q = 1−p.
· Examples:
1. Tossing a coin (success=H, failure=T, and p=P(H))
2. Inspecting an item (success=defective, failure=non-
defective, and p=P(defective))
Bernoulli Process:
Bernoulli process is an experiment that must satisfy the
following properties:
1. The experiment consists of n repeated Bernoulli trials.
2. The probability of success, P(s)=p, remains constant from
trial to trial.
3. The repeated trials are independent; that is the outcome
of one trial has no effect on the outcome of any other trial
2
n−1 n n −1
p (1 − p )1
n − 1
n n
p (1 − p )0 = p n
n
n
Total 1.00
Example:
Suppose that 25% of the products of a manufacturing process
are defective. Three items are selected at random, inspected,
and classified as defective (D) or non-defective (N). Find the
probability distribution of the number of defective items.
Solution:
· Experiment: selecting 3 items at random, inspected, and
classified as (D) or (N).
· The sample space is
S={DDD,DDN,DND,DNN,NDD,NDN,NND,NNN}
· Let X = the number of defective items in the sample
· We need to find the probability distribution of X.
(1) First Solution: Outcome Probability X
NNN 3 3 3 27 0
=
4 4 4 64
NND 3 3 1 9 1
=
4 4 4 64
NDN 3 1 3 9 1
=
4 4 4 64
NDD 3 1 1 3 2
=
4 4 4 64
DNN 1 3 3 9 1
=
4 4 4 64
DND 1 3 1 3 2
=
4 4 4 64
DDN 1 1 3 3 2
=
4 4 4 64
DDD 1 1 1 1 3
=
4 4 4 64
The probability distribution
.of X is
x f(x)=P(X=x)
0 27
64
1 9 9 9 27
+ + =
64 64 64 64
2 3 3 3 9
+ + =
64 64 64 64
3 1
64
(2) Second Solution:
Bernoulli trial is the process of inspecting the item. The results
are success=D or failure=N, with probability of success
P(s)=25/100=1/4=0.25.
The experiments is a Bernoulli process with:
· number of trials: n=3
· Probability of success: p=1/4=0.25
· X ~ Binomial(n,p)=Binomial(3,1/4)
· The probability distribution of X is given by:
3 1 x 3 3 − x
1 ( ) ( ) ; x = 0, 1, 2, 3
f ( x) = P( X = x) = b( x;3, ) = x 4 4
4
0 ; otherwise
1 3 1 0 3 3 27 The probability
f (0) = P( X = 0) = b(0;3, ) = ( ) ( ) = distribution of X is
4 0 4 4 64
x f(x)=P(X=x)
1 3 1 2 3 1 9
f (2) = P( X = 2) = b(2;3, ) = ( ) ( ) = =b(x;3,1/4)
4 2 4 4 64 0 27/64
1 3 1 3 3 0 1 1 27/64
f (3) = P( X = 3) = b(3;3, ) = ( ) ( ) =
4 3 4 4 64 2 9/64
3 1/64
Theorem 5.2:
The mean and the variance of the binomial distribution b(x;n,p)
are:
=np
2 = n p (1 −p)
Example:
In the previous example, find the expected value (mean) and
the variance of the number of defective items.
Solution:
· X = number of defective items
· We need to find E(X)= and Var(X)=2
· We found that X ~ Binomial(n,p)=Binomial(3,1/4)
· .n=3 and p=1/4
The expected number of defective items is
E(X)= = n p = (3) (1/4) = 3/4 = 0.75
The variance of the number of defective items is
Var(X)=2 = n p (1 −p) = (3) (1/4) (3/4) = 9/16 = 0.5625
Example:
In the previous example, find the following probabilities:
(1) The probability of getting at least two defective items.
(2) The probability of getting at most two defective items.
Solution:
X ~ Binomial(3,1/4)
3 1 x 3 3− x
1 ( ) ( ) for x = 0, 1, 2, 3
f ( x) = P( X = x) = b( x;3, ) = x 4 4
4
0 otherwise
x .f(x)=P(X=x)=b(x;3,1/4)
0 27/64
1 27/64
2 9/64
3 1/64
(1) The probability of getting at least two defective items:
9 1 10
P(X2)=P(X=2)+P(X=3)= f(2)+f(3)= + =
64 64 64
(2) The probability of getting at most two defective item:
P(X2) = P(X=0)+P(X=1)+P(X=2)
27 27 9 63
= f(0)+f(1)+f(2) = + + =
64 64 64 64
or 1 63
P(X2)= 1−P(X>2) = 1−P(X=3) = 1− f(3) = 1 − =
64 64
Example:
•No. of patients in a waiting room in an hours.
•No. of serious injuries in a particular factory in a
month.
•No. of calls received by a telephone operator in a day.
•No. of rates in each house in a particular city.
Note:
is the average (mean) of the distribution.
e −6 6 7
(i) P ( X = 7) ) = = 0.13768
7!
(ii) P( X 2 ) = P( X = 0 ) + P( X = 1)
e −6 6 0 e −6 61
= + = 0.01735
0! 1!
Y = no of snake bite cases in 2 years
Y ~ Poisson(12) (* = 2 = (2)(6) = 12)
e1212 y
P(Y = y ) = : y = 0 , 1 , 2
y!
e −121210
P(Y = 10) = = 0.1048
10
3- W = no. of snake bite cases in a month.
6
W ~ Poisson (0.5) = = = 0. 5
**
12 12
e −.5 .5w
P (W = w ) = : w = 0 , 1 , 2
w!
e −0.5 (0.5)
0
P(W = 0 ) = = 0.6065
0!