Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
6 views52 pages

Probability

probability pdf

Uploaded by

marwanesmaael67
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)
6 views52 pages

Probability

probability pdf

Uploaded by

marwanesmaael67
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/ 52

Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof.

Reda S Tantawi

Probability

Probability considers an experiment before it is performed. Probability is a measure of the


chance that an event may occur in the experiment.

Random experiment (or statistical experiment):


Random experiment is the experiment for which all the possible outcomes are well
known but we do not know which outcome is going to happen.
Sample space:
The set of all possible outcomes of a statistical experiment is called the sample space and is
represented by the symbol S.
Notice: If the possible outcomes of a statistical experiment are n elements and the

experiment is established k times, the number of outcomes should be n k elements. which


is the result of establishing k distinguishable experiment simultaneously.
For examples:

(i) In tossing of a fair coin twice, we obtain 22 = 4 outcomes as  HH , HT , TH , TT  which is

the result of tossing a pair of fair distinguishable coins once. In tossing of a fair coin five

times, we obtain 25 = 32 outcomes.

(ii) In tossing a fair die twice, we obtain 62 = 36 outcomes which is the result of tossing a

pair of fair distinguishable dice. In tossing of a fair die three times, we obtain 63 = 216
outcomes, and so on.
Events: Any subset of the sample space is called an event.
Simple event: is an event that contains an element (one element only) of the sample space.

Rule:
If an experiment can result in any one of N different equally likely outcomes ( N is the
number of elements of the sample space), and if exactly n of these outcomes corresponds to
an event A , then the probability of the event A is

1
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

n
P( A) = .
N
The probability of occurring an event A is dented by P ( A) and satisfies the condition
0  P( A) 1.
If S is the sample space and  is the empty set, then
P(S) =1, P( ) = 0
The sample space S is called the certain event and  is called the impossible event.
If A and B are two events:
- The probability of occurring A and B is P( A  B) .
- The probability of occurring A or B is P( A  B) .
If A and B are two sets in the sample space S , then:
S  B = S, S B=B
A  B = A + B − A  B, A− B = A− A  B

If A and B are two events, then:


P( A  B) = P( A ) + P( B) − P( A  B)
P( A − B) = P( A ) − P( A  B)
where A − B reads A but not B .

The complement of a set B is denoted by the set B or B c , and


2
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

B c = B = S − B
A B = A − B = A − A  B
A B = S − ( B − A) = S − (B − A  B)
The complement of an event A is denoted by the event A , then
P( A) = P(S − A) = P(S ) − P(S  A) = 1− P( A)
P( A  B) = P( B − A  B ) = P( B) − P( A  B )
P( A  B) = P( S − ( A − A  B)) = P( S ) − P( A − A  B )
= P( S ) − P( A) + P( A  B) =1− P( A) + P( A  B)
Note that:
If A and B are two events and A  B  A  B = A, A  B = B , then
P( A )  P( B), P( A  B) = P( A), P( A  B) = P( B), P( B − A) = P( B ) − P( A)
If A and B are mutually exclusive events, then
A  B =  P( A  B) = 0 ,
and P( A  B) = P( A ) + P( B)

However, if A1, A2 , A3, , An are mutually exclusive events and S =  A1, A2 , A3 , , An  , i.e.,

S = A1  A2  A3   An . Then we have
P ( A1  A2  A3   An ) = P ( A1) + P ( A2 ) + P( A3 ) + P( An ) =1
If A and B are independent events, then
P( A  B) = P( A) P( B)
In other words, the occurrence of A B has no effect on the occurrence of B , and vice versa.
Also, if A1, A2 , A3, , An are independent events, then we have
P ( A1  A2  A3   An ) = P ( A1) P ( A2 ) P( A3 )  P( An )
If A,B, and C are three sets, then
A  ( B  C ) = ( A  B)  ( A  C ),
A  ( B  C ) = ( A  B)  ( A  C ),
( A  B) = A  B,
( A  B) = A  B.

3
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

If A and B are two events, then


P( A  B) = P(( A  B)) =1− P( A  B),
P( A  B) = P(( A  B)) =1− P(( A  B))
Example 1:
If a fair coin is tossed once, the sample space is  H , T  . The probability of getting a head

is P( H ) =1 / 2 and the probability of getting a tail is P (T ) =1 / 2 .

Example 2:
If a fair die is tossed once, the sample space is 1,2,3,4,5,6 . We have

P(1) = P(2) = P(3) = P(4) = P(5) = P(6) =1 / 6

Example 3:
A fair coin is tossed three times A = {first toss is head} B = {second toss is head} C =
{exactly two heads are tossed in consecutive tosses} which pair(s) of events are
independent?
Solution

The sample space contains 23 = 8 outcomes. We have

A =  HHH , HHT , HTH , HTT , B = HHH , HHT ,THH ,THT , and C = HHT ,THH 

Since the sample space is equiprobable for a fair coin;


1 1 1
P( A) = , P( B) = , P(C ) =
2 2 4
Since A  B = HHH , HHT  , A  C = HHT , B  C = HHT ,THH 

Then
1
P( A  B) = = P( A) P( B) . Hence, A and B are independent.
4
1
P( A  C ) = = P( A) P(C) . Hence, A and C are independent.
8
1
P( B  C ) =  P( B) P(C) . Hence, B and C are dependent.
4

4
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 4:
What is the probability of getting a total of 7 or 11 when a pair of fair distinguishable dice is
tossed?
Solution

The sample space of the experiment is 62 = 36 outcomes.

The event of obtaining a total of 7 is A= (1,6),(2,5),(3,4),(4,3),(5,2),(6,1) which contains 6


outcomes.
The event of obtaining a total of 11 is B = (5,6),(6,5) which contains 2 outcomes.

The event of obtaining a total of 7 and 11 is  .


The probability of getting a total of 7 or 11 is
6 2 8
P( A  B) = P( A) + P( B) − P( A  B) = + −0=
36 36 36
Another solution:

The sample space of the experiment is 62 = 36 outcomes.

The event of obtaining a total of 7 is A= (1,6),(2,5),(3,4),(4,3),(5,2),(6,1) which contains

6 outcomes.
The event of obtaining a total of 11 is B = (5,6),(6,5) which contains 2 outcomes.

The event of obtaining a total of 7 or 11 is


A  B = (1,6),(2,5),(3,4),(4,3),(5,2),(6,1),(5,6),(6,5)

which contains 8 outcomes.


The probability of getting a total of 7 or 11 is
8
P( A  B) =
36

5
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Problems
1. If A and B are independent events and P( A) = 0.5, P( B) = 0.3 . Find P( A  B) .

2. If , P( A) = 0.5, , and P( B) = 0.75 . Find P( A  B) .


A B

3. What is the probability of getting a total of 5 or 9 when a pair of fair distinguishable dice
is tossed?

4. If the probabilities are, respectively, 0.09, 0.15, 0.21, and 0.23 that a person purchasing a
new automobile will choose the color green, white, red, or blue, what is the probability that a
given buyer will purchase a new automobile that comes in one of those colors?

5.A pair of distinguishable fair dice is tossed. Find the probability of getting:
(a) a total of 8; (b) at most a total of 5.
6. In a high school graduating class of 100 students,54 studied mathematics, 69 studied
history, and 35 studied both mathematics and history. If one of these students is selected at
random, find the probability that
(a) the student took mathematics or history;
(b) the student did not take either of these subjects;
(c) the student took history but not mathematics.
7. If A and B are two events such that: P( A) = 0.2, P( B) = 0.4, and P( A  B)=0.5 , find
(i) P( A  B) (ii) P( A  B) (iii) P( A  B) (iv) P( A  B).
8.A small town has one fire engine and one ambulance available for emergencies. The
probability that the fire engine is available when needed is 0.98, and the probability that the
ambulance is available when called is 0.92. In the event of an injury resulting from a burning
building, find the probability that both the ambulance and the fire engine will be available,
assuming they operate independently.
9. Let A and B are two events of a sample space S and let P( A) = 0.5, P( B) = 0.7, and
P( A  B)=0.2 . Find the probabilities of each of the following events:
(a) A or B (b) A but not B
(c) B but not A (d ) Neither A nor B
6
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

10. Three horses A, B, and C in a race. A is twice as likely to win as B and B is twice as
likely to win as C. Find P( A), P( B), and P(C ) .

11. Let A and B be two events with P( A) =1/ 4, P( B) = p and P( A  B) =1/ 3. Find p if:
(i) A and B are mutually exclusive (ii) A and B are independent (iii) A  B .

12. A coin and a pair of dice are tossed. Find the probability of getting a head or a sum of
seven.

13. If P( A) = P( B) = 0.7 and P( A  B) = 0.79 then A and B are:

(i) A  B (ii) independent (iii) dependent (iv)mutually exclusive

====================================

7
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Conditional Probability

The probability of an event A occurring when it is known that some event B has
already occurred is called a conditional probability and is denoted by P( A \ B) . The symbol
P( A \ B) is usually read “the probability that B occurs given that A occurs or simply “the

probability of B, given A”.


Note that occurring the event B has an effect on occurring the event A .
The conditional probability of A , given B , is defined by
P( A  B)
P( A \ B) = , provided P( B)  0 .
P( B)
Similarly
P( A  B)
P( B \ A) = , provided P( A)  0 .
P( A)
Therefore, we obtain for the conditional probabilities:
P( A  B) = P( A \ B) P( B) = P( B \ A) P( A)
Two events A and B are independent if and only if
P( B | A) = P( B) or P( A | B) = P( A) ,
and we have
P( A  B) = P( A) P( B)

If A and B are mutually exclusive events, then the probability of occurring A or B when it is
known that some event E has already occurred is
P(( A  B) \ E ) = P( A \ E ) + P( B \ E )

Example 1:
If A and B are independent events and P( A) = 0.5, P( B) = 0.3 . Find P( A \ B) and P( A  B) .
Solution
Since A and B are independent events, then
P( A \ B) = P( A) = 0.5 ,
P( A  B) = P( A) P( B) = 0.5 0.3 = 0.15

 P( A  B) = P( A) + P( B) − P( A  B) = 0.5 + 0.3 − 0.15 = 0.65 .

8
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 2:
In the experiment of tossing a pair of distinguishable dice, let A be the event that at least one
of the two faces is equal to 5 and B be the event that the sum of the two faces is even. Find
P( A \ B) and P( B \ A) .
Solution

The sample space of the experiment is 62 = 36 outcomes.


The event that at least one of the two faces is equal to 5 is
A= (1,5),(2,5),(3,5),(4,5),(5,5),(6,5),(5,1),(5,2),(5,3),(5,4),(5,6)

which contains 11 outcomes.


The event that the sum of the two faces is even is
B = (1,1),(1,3),(1,5),(2,2),(2,4),(2,6),(3,1),(3,3),(3,5),(4,2),(4,4),(4,6),

(5,1),(5,3),(5,5),(6,2),(6,4),(6,6)

1
which contains  36 =18 outcomes.
2
A  B = (1,5),(3,5),(5,5),(5,1),(5,3)

which contains 5 outcomes


11 18 5
 P( A) = , P( B) = , P( A  B) =
36 36 36
P( A  B) 5 P( A  B) 5
Then P( A \ B) = = , P( B \ A) = =
P( B) 18 P( A) 11
Example 3:
One bag contains 4 white balls and 3 black balls, and a second bag contains 3 white balls
and 5 black balls. One ball is selected from the first bag at random and placed unseen in the
second bag. What is the probability that a ball now selected from the second bag is black?
Solution:
Let B1, B2 , and W1 represent, respectively, the events of selecting of a black ball from bag
1, a black ball from bag 2, and a white ball from bag 1. We are interested in the union of the
mutually exclusive events B1  B2 and W1  B2 .

9
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

P( B2  ( B1 W1)) P(( B2  B1 )  ( B2 W1))


 P( B2 \ ( B1 W1)) = =
P( B1 W1) P( B1 W1)
P( B1 W1) =1 and ( B2  B1 ),( B2 W1) are mutually exclusive events
3 6 4 5 38
 P( B2 \ ( B1 W1)) = P( B2  B1 ) + P( B2 W1)=  +  =
7 9 7 9 63

Example 5:
An urn contains 7 white balls and 3 black balls. Two balls are selected one after the other
randomly without replacement. What is the probability that:
(i) The two balls are white (ii) The two balls are black
(iii) One ball is white and the other is black
Solution:
Let
B1 : represents the event of selecting the first ball is black.
B2 : represents the event of selecting the second ball is black.
W1 : represents the event of selecting the first ball is white.
W2 : represents the event of selecting the second ball is white.
(i) The probability that the two balls are white, W1 and W2 , is
7 6 7
P(W1  W2 ) = P(W1) P(W2 \W1) =  = .
10 9 15
(ii) The probability that the two balls are black, B1 and B2 , is
3 2 1
P( B1  B2 ) = P( B1) P( B2 \ B1) =  = .
10 9 15
(iii) The probability that one ball is white and the other is black, W1 and B2 or, B1 and W2 , is
P((W1  B2 ) ( B1  W2 )) = P(W1  B2 ) + P ( B1 W2 )
7 3 3 7 14
= P(W1) P ( B2 \ W1) + P ( B1) P(W2 \ B1) =  +  =
10 9 10 9 30

10
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 6:
A box contains 5 radio tubes of which 2 are defective. The tubes are tested one after the
other until the two defective tubes are discovered. What is the probability that the process
stopped on (i) second test. (ii) third test. (iii) if the process stopped on the third test,
what is the probability that the first tube is non-defective.
Solution:
Let Di be the event of selecting a defective tube ball on the i -th test.
(i) The process will be stopped on the second test if the first and the second tests yield
defective tubes. Then the probability that the process stopped on the second test is
2 1
P( D1  D2 ) = P( D1 ) P( D2 \ D1 ) =  = 0.1
5 4
(ii) The process will be stopped on the third test if the first or the second tests yield defective
tubes. Then the probability that the process stopped on the third test is
P(( D1  D2  D3 ) ( D1  D2  D3 )) = P( D1  D2  D3 ) + P ( D1  D2  D3 )
= P( D1) P( D2 \ D1) P ( D3 \ ( D1  D2 )) + P( D1) P( D2 \ D1) P ( D3 \ ( D1  D2 ))
3 2 1 2 3 1 1
=   +   =
5 4 3 5 4 3 5
(iii) The probability that the first tube is non-defective is
3 2 1 1
P( D1  D2  D3 ) = P( D1 ) P( D2 \ D1 ) P ( D3 \ ( D1  ( D2 ) =   =
5 4 3 10

11
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Problems
1. If A and B are two events such that P( A) = 0.3, P( B) = 0.4, P( A  B) = 0.2 .Find P( A  B)
and P( A \ B)
2. If P( A \ B) = 0.5, P( A  B) = 0.4 , and P( A) = 0.8, find P ( B ) .
3. If P( A) = 0.7, P( B) = 0.4, and P( A \ B) = 0.28 find P( B \ A) .
4. If P( A) = 0.4, P( A \ B) = 0.5 and the probability that A occurs given that B does not occur
Is 0.3. Find P( B \ A) .
5. If P( A \ B) = 0.5, P( A) = 0.5 and P( B) = 0.2 then A and B are:
(i) A  B (ii) independent (iii) B  A (iv) mutually exclusive
6. Given that P( A  B) = 0.8 and P( A) = 0.5 , find P ( B ) if:
(i) A and B are mutually exclusive (ii) A and B are independent
(iii) P( B \ A) = 0.4 (iv) A  B .
7. The probability that a married man watches a certain television show is 0.4, and the
probability that a married woman watches the show is 0.5. The probability that a man
watches the show, given that his wife does, is 0.7. Find the probability that
(a) a married couple watches the show;
(b) a wife watches the show, given that her husband does;
(c) at least one member of a married couple will watch the show.
8. Suppose the probability of snow is 20%, and the probability of a traffic accident is 10%.
Suppose further that the conditional probability of an accident, given that it snows, is 40%.
What is the conditional probability that it snows, given that there is an accident?
1 1
9. If P( B) = and P( A \ B) = , what is P( A  B) ?
4 2
10. A lot contains 20 items of which 6 are effective. Three items are drawn at random from
the lot one after the other. Find the probability that all the three items are effective.
11. Suppose that a laboratory test to detect a certain disease has the following statistics. Let
A be the event that the tested person has the disease and B be the event that the test result is
positive. In addition, it is known that P( B \ A) = 0.99 and P( B \ A) = 0.005 , and 0.1 percent
of the population actually have the disease. What is the probability that a person has the
12
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

disease given that the test result is positive?


12. Given that 10% of light bulbs are blue and 2% of all bulbs are blue and defective. What
is the probability that a bulb selected at random is defective if it is known that it is blue?

13
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Random Variables and Probability Distributions

Random Variable
Random variable is a variable whose value is determined by an outcome of a random
experiment.
Discrete random variable of probability distribution:
A discrete variable is one which no value may be assumed between two given values,
for example, number of children in a family. If the random variable can assume a countable
number of values, then it is called discrete random variable. It is usually represent the
number of occurrence of an outcome in a random experiment, and it is usually denoted by a
capital letter such as X =  x1, x2 , x3 ,  where x1, x2 , x3 , are the possible values of the

random variable X .
Example 1:
In the experiment of tossing a fair coin three times, the sample space is
S = HHH , HHT , HTH , HTT ,THH ,THT ,TTH ,TTT 

Let us are interested in the number of heads, then the random variable X takes the values
X = 0,1,2,3 .

Example 2:
In the experiment of tossing a fair die twice, the sample space consists of 36 elements. If
we are interested in the sum of the numbers on the two faces, then the random variable X
takes the values X = 2,3,4,5,6,7,8,9,10,11,12 .

Probability distribution function:


Probability distribution function of a random variable X is the probability of occurrence
the random variable and is denoted by a function f :
f ( xk ) = P( X = xk ), k =1,2,3,
Then the probability distribution function gives a probability, and satisfies the following:
1. f ( xk )  0, k =1,2,3

2.  f ( xi ) =1
i

14
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 3:
In the experiment of tossing a fair coin three times, let us are interested in the number of
heads, then the random variable X takes the values X = 0,1,2,3 and the probability

distribution function can be given as the probabilities of obtaining no heads ( X = 0 ), one


head ( X =1 ), two heads( X = 2 ), and three heads ( X = 3 ). Then we have

X 0 1 2 3
f (X ) 1/ 8 3/8 3/8 1/ 8

Note that  f ( xi ) =1 .
i

Example 4:
In the experiment of tossing a fair die twice, the sample space consists of 36 elements. If
we are interested in the sum of the numbers on the two faces, then the random variable takes
the values X = 2,3,4,5,6,7,8,9,10,11,12 and the probability distribution function can be

given as the probabilities of obtaining the sum equals the random value X .

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

Note that  f ( xi ) =1 .
i

Example 5:
An urn contains 4 red balls and 3 blue balls. If 3 balls are selected at random with
replacement and the random variable is the number of red balls in the selected balls. Then
the random variable takes the values X = 0,1,2,3 and the probability distribution function

can be given as the probabilities of obtaining 0,1,2,3 red balls. Note that X = 0 corresponds
to all the 3 balls are blue. The probability of selecting X = 0 red balls is the probability of
3 3 3 27
selecting 4 blue balls, f (0) = P( X = 0) =   = . The probability of selecting X =1
7 7 7 343
15
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

red balls is the probability of selecting 1 red ball and 2 blue balls,
4 3 3 3 4 3 3 3 4 108
f (1) = P( X =1) =   +   +   = .
7 7 7 7 7 7 7 7 7 343
The probability of selecting X = 2 red balls is the probability of selecting 2red ball and 1blue
balls,
4 4 3 4 3 4 3 4 4 144
f (2) = P( X = 2) =   +   +   = .
7 7 7 7 7 7 7 7 7 343
The probability of selecting X = 3 red balls is
4 4 4 64
f (3) = P( X = 3) =   = .
7 7 7 343
X 0 1 2 3
f ( X ) 27 / 343 108 / 343 144 / 343 64 / 343

Example 6:

Find the value of k which makes the function f ( x) = k x 2 to be a probability distribution

function, where the random variable takes the values X = −1,0,2,3 .

Solution:

The probability distribution function of a random variable function f ( x) = k 2 x is a


probability distribution function if it is positive for all values of the random variable and
satisfies  f ( xi ) =1 . Then
i

 k (1 + 0 + 4 + 9) =1  14k =1  k =1 / 14

Cumulative Probability Distribution Function


Let X be a random variable whose probability distribution function is f ( x) . We define
cumulative probability distribution function, or simply cumulative distribution function,
F ( x) as follows:
k
F ( xk ) = P( X  xk ) =  f ( xi )
i =1

16
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

which gives the probability that X  xk . Therefore, the probability that X  xk is given by
N
P( X  xk ) =  f ( xi ) =1− F ( xk −1)
i=k

Note that F ( x1) = f ( x1), F ( xN ) =1; X x1, x2 , x3, , xN .


We can deduce the probability distribution function f ( xi ) from cumulative distribution
function F ( xi ) as:
f ( xn ) = F ( xn ) − F ( xn −1),
n
P( xm  X  xn ) =  f ( xi ) = F ( xn ) − F ( xm −1)
i=m

Example 7:
Find the cumulative distribution function for the experiment in example 3. Find the
probability of obtaining:
(i) at most two heads, (ii) at least two heads.
Solution:
We have F (0) = f (0), F (1) = f (0) + f (1), F (2) = f (0) + f (1) + f (2), and so on.

X 0 1 2 3
f (X ) 1/ 8 3/8 3/8 1/ 8

F(X ) 1/ 8 4/8 7/8 1

Note that the last value F (3) =1 .


(i) The probability of obtaining at most two heads is P( X  2) = F (2) = 7 / 8
(i) The probability of obtaining at least two heads is P( X  2) =1− F (1) =1− 4 / 8 =1 / 2

Example 8:
Find the cumulative distribution function for the experiment in example 4. Find the
probability of obtaining:
(i) the sum of the two faces at most is 8, (ii) the sum of the two faces at least is 7,
(iii) the sum of the two faces is greater than 3 and less than 10.
17
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Solution: We have

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

F ( X ) 1 / 36 3 / 36 6 / 36 10 / 36 15 / 36 21 / 36 26 / 36 30 / 36 33 / 36 35 / 36 1

Note that the last value F (12) =1 .


(i) The probability of obtaining the sum of the two faces at most equals 8 is
P( X  8) = F (8) = 26 / 36
(ii) The probability of obtaining the sum of the two faces at least equals 7 is
P( X  7) =1− F (6) =1−15 / 36 = 21 / 36
(iii) The probability of obtaining the sum of the two faces is greater than 3 and less than 10.
P(3  X  10) = f (4) + f (5) + f (6) + f (7) + f (8) + f (9)
3 4 5 6 5 4 27 3
= + + + + + = = .
36 36 36 36 36 36 36 4

Definition of Expected Value


A very important concept in probability and statistics is that of the mathematical
expectation, expected value, or briefly the expectation, of a random variable. The expected
value is the value that the random variable takes “on average.”. In mathematical terms, if the
random variable is X takes the possible discrete values are x1, x2 , x3, , xN and the
corresponding probability distribution functions are f ( x1), f ( x2 ), f ( x3 ), , f ( xN ) then the
expected value is:
N N
E ( X ) =  xi P( X = xi ) =  xi f ( xi ) ,
i =1 i =1

E ( X ) is often called the average and is denoted by  .


Remark
The expected value of a random is not necessarily a possible outcome for the experiment.

18
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Some Theorems on Expectation values


1. If c is any constant, then
E (c X ) = cE ( X ), E (c) = c
2. If X and Y are any random variables, then
E ( X + Y ) = E ( X ) + E (Y )
If X and Y are independent random variables, then
E ( X Y ) = E ( X ) E (Y )

The Variance and Standard Deviation


The spread of the distribution of a random variable X is its variance. The variance of a
random variable X , which takes discrete values x1, x2 , x3, , xN and has mean  , is given
by
N
Var( X ) = 2 = E ([ X −  ]2 ) =  ( xi −  )2 f ( xi )
i =1

It is easy to show that


N
Var( X ) =  xi2 f ( xi ) −  2 = E ( X 2 ) −  2
i =1

The variance is a nonnegative number.


The standard deviation σ of a discrete random variable is equal to the positive square root of
the variance, i.e.
 = Var( X )
Like variance, the standard deviation also measures the spread.

Example 9:
In the experiment of tossing a fair coin three times, find the expectation number and the
standard deviation of heads can be appeared.
Solution:
Following example 3, we have

19
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

X 0 1 2 3
f (X ) 1/ 8 3/8 3/8 1/ 8

The expectation number of heads is


4
1 3 3 1 12
E ( X ) =  xi f ( xi ) = 0  +1 + 2  + 3  = =1.5
i =1 8 8 8 8 8

This result means that a person who tosses 2 coins 3 times will, on the average, get 1.5 head
per toss, which is not a possible outcome for the experiment.

The variance is
N
1 3 3 1 27
Var( X ) =  ( xi −  )2 f ( xi ) = (0 −1.5) 2  + (1−1.5) 2  + (2 −1.5) 2  + (3 −1.5) 2  =
i =1 8 8 8 8 32

The standard deviation is


27
 = Var( X ) =
32
Example 10:
If the random variable X describes the sum of the obtained numbers when a pair of fair
dice are rolled once. Find its expectation value E ( X )
Solution:
Following example 5, we have

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

11
1 2 3 4 5 6 5
 E ( X ) =  xi f ( xi ) = 2  +3 + 4  +5 + 6  + 7  +8 
i =1 36 36 36 36 36 36 36

4 3 2 1 251
+9 +10  +11 +12  =
36 36 36 36 36

20
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 11:
If the random variable is X = − 2,0,2 ,the probability distribution function f (0) =1 / 3 , and
E ( X ) =1. Find P( X = 2) .
Solution:
Since  f ( xi ) =1 , then f (−2) + f (0) + f (2) =1
i

 f (−2) + f (2) = 2 / 3 (1)


E ( X ) =1  − 2  f (−2) + 0  f (0) + 2  f (2) =1
 − 2 f (−2) + 2 f (2) =1 (2)
From (1) and (2) we have f (2) = 7 / 12 . Then P( X = 2) = f (2) = 7 / 12

Example 12:
A box contains 8 items in which 2 are defective. A man selected 3 items from the box at
random. Find the expectation number of defective items he has drawn if the selection is
made with replacement
Solution:
Since the selection is made with replacement, the random variable X is the number of
defective items may be X = 0,1,2,3 .
(i) The probability of selecting X = 0 defective items is the probability of selecting 3 non-
6 6 6 27
defective items, f (0) = P( X = 0) =   = . The probability of selecting X =1 defective
8 8 8 64
items is the probability of selecting 1 defective and 2 non-defective items,
2 6 6 6 2 6 6 6 2 27
f (1) = P( X =1) =   +   +   = .
8 8 8 8 8 8 8 8 8 64
The probability of selecting X = 2 defective items is the probability of selecting 2 defective
2 2 6 2 6 2 6 2 2 9
and 1 non-defective items, f (2) = P( X = 2) =   +   +   = .
8 8 8 8 8 8 8 8 8 64
The probability of selecting X = 3 defective items is the probability of selecting 3 defective
2 2 2 1
items, f (3) = P( X = 3) =   = .
8 8 8 64

21
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

X 0 1 2 3
f (X ) 27 / 64 27 / 64 9 / 64 1 / 64

It is noticed that  f ( x) =1 .
27 27 9 1 48 3
 E ( X ) =  x f ( x) = 0  +1 + 2 + 3 = =
64 64 64 64 64 4

Example 13:
A certain type of missiles hits its target with probability 0.3. How many minimum
number of missiles should be fired so that there is at least as 80% probability of hitting a
target at least once.
Solution
We have the probability of hitting a target p = 0.3 and if the number of the fired missiles

is n , the random variable (the number of hitting the target) should be X = 0,1,2, , n .

The probability of hitting a target at least once is:


P( X =1) + P( X = 2) + P( X = 3) + P( X = n) =1− P( X = 0)
 1− P( X = 0)  0.8
Since P( X = 0) means that all the fired missiles failed to hit the target, then

P( X = 0) = 0.7  0.7   0.7 = (0.7)n


n times

 1− (0.7)n  0.8

1− (0.7)n  0.8  0.2  (0.7) n


The minimum number of missiles is n = 5

22
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Problems
1. Let X be a random variable with distribution f ( x) = k , X =1,2,3,4,5,6 . Find:
(i) the constant k (ii) P(0  x  5) (iii) the variance Var( X ) .
k
2. Let X be a random variable with distribution f ( x) = , X = 0,1,2,3 . Find:
x +1
(i) the constant k (ii) the cumulative distribution function F ( X ) (iii) P( x1)
(iv) the expectation values E ( X ), E (2 X − 3) , and the variance Var( X ) .

3. Let X be a random variable with distribution f ( x) = k x, X =1,2,3,4,5,6 . Find:


(i) the constant k (ii) P(0  x  5) (iii) the variance Var( X ) .

4. The probability distribution of a random variable X is given as:

X 0 1 2 3 4
f ( X ) 0.41 0.37 0.16 0.05 0.01

Construct the cumulative distribution function of X . Find the variance Var ( X ) .

5. If the random variable is X = 0,1, 2 and the probability distribution function f (0) =1 / 4 ,

and E ( X ) =1. Find P( X =1), P( X = 2) .

6. A box contains 6 items in which 3 are defective. A man selected 3 items from the box at
random. Find the expectation number of defective items he has drawn if the selection is
made without replacement.
7. A certain type of missiles hits its target with probability 0.2. How many minimum number
of missiles should be fired so that there is at least as 60% probability of hitting a target at
least once.
8. A certain type of missiles hits its target with probability 0.25. If 10 missiles are fired, find
the probability of hitting a target:
(i) three times, (ii) at most 3 times, (ii) at least twice.

23
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Binomial Distribution
The Bernoulli Process
Strictly speaking, the Bernoulli process must possess the following properties:
1. The experiment consists of n repeated trials.
2. Each trial results in an outcome that may be classified as a success or a failure.
3. The probability of success, denoted by p, remains constant from trial to trial.
4. The repeated trials are independent, the result of one trial does not affect the result of
another trial.

If we have n independent trials of an event where the probability of a success is p then the
probability of obtaining x successes, the number of successes the trials, will be given by

P( X = x) = b(x; n, p) = nC x p x (1− p) n − x , x = 0,1,2, . . . , n.


b(x; n, p) is the Binomial probability distribution of the binomial random variable x , where

n!
n
Cx =
x!(n − x)!
The cumulative Binomial probability distribution is given by
k
B(x; n, p) = P( X  x) =  b(x; n, p)
x=0

As we know, the sum of all the probabilities equals one. So that, for any value of n and p we
have
n
 b(x; n, p) =1
x=0

The mean and variance of the binomial distribution b(x; n, p) are


n
 =  x b(x; n, p)= np
x=0

n
Var( X ) =  ( x −  )2 b(x; n, p) = np(1− p)
x=0

24
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 1:
Find the probability of obtaining exactly 6 successes in 10 trials when the probability of
success is 0.3.
Solution:
Using the Binomial probability distribution, where n =10, p = 0.3 , and x = 6 . The
probability of obtaining exactly 6 successes is
10!
b(6; 10, 0.3)= 10C6 (0.3)6 (1− 0.3)10 − 6 = (0.3)6 (0.7) 4 = 0.0368
6!4!
Example 2:
Six machines are installed in a factory. If the probability that any machine needs a repair
is equal to 0.1, find the probability that:
(i) exactly 4 machines need repair. (ii) at least 4machines need repair.
(iii) at most 2 machines need repair.
Solution:
Using the Binomial probability distribution, where n = 6, p = 0.1 .
(i) The probability of obtaining exactly 4 machines need repair is
6!
b(4; 6, 0.1)= 6C4 (0.1)4 (1− 0.1)6 − 4 = (0.1)4 (0.9)2 = 0.001215
4!2!
(ii) The probability of obtaining at least 4 machines need repair is
b(4; 6, 0.1) + b(5; 6, 0.1) + b(6; 6, 0.1)
= 6C4 (0.1)4 (1− 0.1)6 − 4 + 6C5 (0.1)5 (1− 0.1)6 − 5 + 6C6 (0.1)6 (1− 0.1)6 − 6
= 0.001365 + 0.000054 + 0.000001= 0.00142

(iii) The probability of obtaining at most 2 machines need repair is


b(0; 6, 0.1) + b(1; 6, 0.1) + b(2; 6, 0.1)

= 6C0 (0.9)6 + 6C1 (0.1)(0.9)5 + 6C2 (0.1) 2 (0.9) 4


= 0.531441+ 0.354294 + 0.098415 = 0.98415

25
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 3:
The probability that a gunman man hits a target is 0.9 . If the gunman shoots at a target 4
times, find the probability of hitting the target:
(i) exactly twice, (ii) at least twice, (ii) at most three times.
Solution:
Using the Binomial probability distribution, where n = 4, p = 0.9 .
(i) The probability of hitting the target exactly twice is
4!
b(2; 4, 0.9)= 4C2 (0.9)2 (1− 0.9)2 = (0.9)2 (0.1)2 = 0.0243
2!2!
(ii) The probability of hitting the target at least twice is
b(2; 4, 0.9) + b(3; 4, 0.9) + b(4; 4, 0.9)

= 4C2 (0.9)2 (0.1) 2 + 4C3 (0.9)3 (0.1) + 4C4 (0.9) 4


= 0.0243 + 0.2916 + 0.6561= 0.972

(iii) The probability of hitting the target at most three times is


b(0; 4, 0.9) + b(1; 4, 0.9) + b(2; 4, 0.9) + b(3; 4, 0.9)

= 4C0 (0.1)4 + 4C1 (0.9)(0.1)3 + 4C2 (0.9) 2 (0.1) 2 + 4C3 (0.9)3 (0.1)
= 0.0001+ .0036 + 0.0243 + 0.2916 = 0.03196

Example 4:
The probability that a driver must stop at any one traffic light coming to Sanai University
is 0.2. There are 10 sets of traffic lights on the journey.
a) What is the probability that a driver must stop at exactly 2 of the 10 sets of traffic lights?
b) What is the probability that a driver will be stopped at 6 or more of the 10 sets of traffic
lights?
Solution:
Using the Binomial probability distribution, where n =10, p = 0.2 .
(a) The probability that a driver must stop at exactly 2 of the 10 sets of traffic lightsis
10!
b(2; 10, 0.2)= 10C2 (0.2)2 (1− 0.2)8 = (0.2) 2 (0.8)8 = 0.0301989888
2!8!
(b) The probability that a driver must stop at 6 or more of the 10 sets of traffic lights is

26
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

b(6; 10, 0.2) + b(7; 10, 0.2) + b(8; 10, 0.2) + + b(9; 10, 0.2) + b(10; 10, 0.2)

= 10C6 (0.2)6 (0.8)4 + 10C7 (0.2)7 (0.8)3 + 10C8 (0.2)8 (0.8) 2 + 10C9 (0.2)9 (0.8) + 10C10 (0.2)10

Example 5:
A box contains 8 items in which 2 are defective. A man selected 3 items from the box at
random. Find the expectation number of defective items he has drawn if the selection is
made with replacement
Solution
Using Binomial distribution, where n = 3, p =1 / 4 . The expectation number of defective
items probability of selecting defective item is E ( X ) = np = 3 / 4 .

Example 6:
A certain type of missiles hits its target with probability 0.3. How many minimum
number of missiles should be fired so that there is at least as 80% probability of hitting a
target at least once.
Solution
We have the probability of hitting a target p = 0.3 and if the number of the fired missiles

is n , the random variable (the number of hitting the target) should be X = 0,1,2, , n .

The probability of hitting a target at least once is:


P( X =1) + P( X = 2) + P( X = 3) + P( X = n) =1− P( X = 0)
 1− P( X = 0)  0.8

 1− nC0 (0.3)0 (1− 0.3) n  0.8

1− (0.7)n  0.8  0.2  (0.7) n


The minimum number of missiles is n = 5 .

27
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Problems
1. Find the probability of obtaining at most 4 successes in 12 trials when the probability of
success is 0.4.

2.In the experiment of tossing a fair coin 10 times, what is the probability that:
(i) exactly 6 heads are obtained.
(ii) at least 6 heads are obtained.
(iii) at most 6 heads are obtained.

3. In the experiment of tossing a coin 5 times, if the probability of obtaining a head is 0.6
find the probability that:
(i) exactly 3 heads are obtained.
(ii) exactly 4 tails are obtained.

4. In five rolls of two fair dice, what is the probability of obtaining the sum of the faces
equals seven twice.

5. The probability of a man hitting a target is 1 / 4 .


(i) If he fires seven times, what is the probability that the target is hit at least twice?
(ii) How many times must he fire so that the probability of hitting the target at least once is
greater than 2 / 3 ?

6. In a multiple-choice examination with 3 choices for each question, what is the probability
of guessing exactly 6 of 10 answers?
7. A certain type of missiles hits its target with probability 0.2. If 8 missiles are fired, find
the probability of hitting a target:
(i) three times, (ii) at most 3 times, (ii) at least once.

28
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Poisson Distribution

The Poisson distribution is another family of distributions that arises in a great number of
business situations. It usually is applicable in situations where random “events” occur at a
certain rate over a period of time. Poisson distribution is a discrete probability distribution
and it possess the same properties as Bernoulli process.
It is more convenient to use Poisson distribution when the number of trials is very large or
unlimited, or the probability of success p is very small, say p  0.05 .
Let X be a random variable that obeys Poisson probability distribution. The probability
that exactly x successes occur in a given interval is given by:
 x e−
P( X = x) = f (x) = , x = 0,1,2, . . .
x!
Here  is the parameter of the distribution. It is worth to mention that the mean  and the
variance Var ( X ) of the random variable X are the same, and  =  =Var ( X ) = np .
Example 1:
The number of industrial injuries per working in a particular factory is known to follow a
Poisson distribution with mean  = 0.5 . Find the probability that in a particular week there
will be:
(i) exactly 3 accidents (ii) less than 2 accidents, (iii) more than 2 accidents.
Solution:
We have  =  = 0.5 , then
(i) the probability that in a particular week there will be exactly 3 accidents is
0.53 e−0.5
P( X = 3) = f (3) = = 0.01264
3!
(ii) The probability that in a particular week there will be less than 2 accidents is
0.50 e−0.5 0.51 e−0.5
P( X  2) = f (0) + f (1) = + = 0.9098
0! 1!
(iii) The probability that in a particular week there will be more than 2 accidents is
P( X  2) =1− P( X  2) =1−[ f (0) + f (1) + f (2)]=

29
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

0.50 e−0.5 0.51 e−0.5 0.52 e−0.5


=1− − − = 0.0144
0! 1! 2!
Example 2:
The number of misprints on a page of daily newspaper has a Poisson distribution with
mean  =1.2 . Find the probability that the number of errors on a page is: (i) exactly 2 errors,
(ii) less than or equals 2 errors, (iii) more than 2 errors.
Solution:
We have  =  =1.2 , then
(i) the probability that the number of errors on a page is exactly 2 is
1.22 e−1.2
P( X = 2) = f (2) = = 0.2169
2!
(ii) The probability that the number of errors on a page is less than or equals 2 errors is
1.20 e−1.2 1.21 e−1.2 1.22 e−1.2
P( X  2) = f (0) + f (1) + f (2) = + + = 0.0301
0! 1! 2!
(iii) The probability that the number of errors on a page is more than 2 errors is
P( X  2) =1− P( X  2) =1− 0.0301= 0.9699
Example 3:
In a certain school, it is observed that 4% of children write with their left hands. In a
class 0f 25 children, what is the probability that:
(a) exactly one left-handed child exists?
(b) no more than two left-handed children exist?
Solution:
We have n = 25 and the probability that a child is left-handed is p = 0.04 which is very
small, then we must use the Poisson distribution with  = np = 25  0.04 =1.
(a) The probability that exactly one left-handed child exists is
P( X =1) = f (1) = e−1 = 0.3679
(b) The probability that no more than two left-handed children exist is
P( X  2)= f (0) + f (1) + f (2) = e−1 1+1+ 0.5 = 0.9197

30
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Problems
1. A garage uses a particular spare at an average rate of 5 per week. Assuming that usage of
this spare part follows a Poisson distribution. Find the probability that
(a) exactly 5 are used in a particular week,
(b) at least 5 are used in a particular week.
(c) at most 5 are used in a particular week.

2. Incoming telephone calls to a school arrive at random times. The average rate will vary
according to the day of the week. On Monday mornings, in term time there is a constant
average rate of 4 per hour. What is the probability of receiving:
(a) 6 or more calls in a particular hour.
(b) 3 or fewer calls in a particular hour.

3. Suppose that the expected defective items produced by a machine is 2 items, find the
probability that 3 or more items are defective.

4. The probability that a person dies from a certain respiratory infection is 0.002. Find the
probability that fewer than five of the next 2000 infected people will die.

5. If the probability of hitting the bull in a game of darts is 0.5 , find the probability of hitting
at least 3 bulls in 50 throws.

31
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Continuous probability density function

A continuous random variable is a random variable which can take any value in some
interval. A continuous random variable is characterized by its probability density function,
f (x ) . The function f (x ) is called probability density function, or density function, if it

satisfies:

(1) f (x)  0, xR (2)  f ( x) dx =1
−

We shall concern ourselves with computing probabilities for various intervals of continuous
random variables such as P( X  a), P(a  X  b) , and so forth.
Note that when x is continuous,
a
(1) P( X  a) = P( X  a) =  f ( x) dx,
−
 a
(2) P( X  a) = P( X  a) =  f ( x) dx =1−  f ( x) dx
a −
b
(3) P(a  X  b) = P(a  X  b) = P(a  X  b) = P(a  X  b) =  f ( x) dx ,
a
where P( X = a) = P( X = b) = 0
Example 1:

Given the function f ( x) = k x 2 , 0  x 1 , find:


(i) k such that f ( x) is a probability density function
(ii ) P( X  0.5) (iii ) P(0.3  X 1.8)

Solution:
 1
(i)  f ( x) dx =1  k  x 2 dx =1
− 0

k  3 1
 x =1 k =3
3  0
0.5 0.5
0.5
(ii) P( X  0.5) =  f ( x) dx = 3  x 2dx =  x3  = 0.125 ,
 0
− 0

32
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

1.8 1
1
(iii ) P(0.3  X 1.8) =  f ( x) dx = 3  x 2dx =  x3  =1− 0.027 = 0.973
  0.3
0.3 0.3

Example 2:
Show that the function
 2(1+ x)
 , 2 x 3
f ( x) =  7
0,
 otherwise

is a probability density function on R , Find


(i ) P( X  3) (ii) P(2  X  3) (iii ) P( X  2.5)

Solution:
(1) It is seen that f ( x)  0, xR ,
 3 3
2 2 1 3 1
(2)  f ( x) dx =  (1+ x)dx =  (1+ x)dx = (1+ x) 2  = 16 − 9 =1 ,
− 2
7 72 7 2 7

then the given function is a probability density function on R .

3 3
2 1 3 1
(i) P( X  3) =  f ( x) dx =  (1+ x)dx = (1+ x) 2  = 16 − 9 =1
− 2
7 7 2 7
3
(ii) P(2  X  3) =  f ( x) dx =1
2

 3
2 1 3 1
(iii ) P( X  2.5) =  f ( x) dx =  (1+ x)dx = (1+ x) 2  = 16 −12.25 = 0.5357
2.5
7 2.5 7  2.5 7

Example 3:

If the function f ( x) = 3(5 x − x 2 ) / 56 is a probability density function on the interval [0, 4] ,


find (i) P( X  3) (ii) P(2  X  3) (iii) P( X  2)

Solution:
Since the given function is a probability density function, then
3 3 3
3 3 5 1  3  27 
(i) P( X  3) =  f ( x) dx =  (5 x − x 2 )d x =  x 2 − x3  =  − 0
56 0 56  2 3  0 56  2 
−

33
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

3 3 3
3 3 5 1  3  27 22 
(ii) P(2  X  3) =  f ( x) dx =  (5 x − x 2 )d x =  x 2 − x3  =  − 
2
56 2 56  2 3  2 56  2 3 
 4 4
3 3 5 1  3  56 22  17
(iii ) P( X  2) =  f ( x) dx =  (5 x − x 2 )d x =  x 2 − x3  =  −  =
2
56 2 56  2 3  2 56  3 3  28

Cumulative Probability Distribution Function


The cumulative distribution function F( x) of a continuous random variable X with density
function f ( x) is defined by:
x
F ( x) = P( X  x) =  f (t ) dt
−

We can say that


(1) P( X  a) = F (a ) (2) = P(a  X  b) = F (b) − F (a) (3) P( X  a) =1− F (a )
d
(4) f ( x) = F ( x)
dx

Example 4:
Find the cumulative distribution function for the probability density function
 2(1+ x)
 , 2 x 3
f ( x) =  7
0,
 otherwise

Solution:
The cumulative distribution function is
x x
2 1 x 1
F ( x) = P( X  x) =  f (t ) dt =  (1+ t ) dt = (1+ t ) 2  = (1+ x) 2 − 9 
−
72 7 2 7  

Example 5:
The cumulative distribution function for the life (in years) of hard disks that are produced

by a factory is given by F (t ) =1− e−3t , t  0 .


Find the corresponding probability density function. If a customer bought a hard disk from
the factory, what is the probability that:
(a) T  2 years (b) 2  T  4 years (c) T  4 years
34
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Solution:
d
The corresponding probability density function f (t ) is f (t ) = F (t ) = 3 e−3t
dt
(a) P(T  2) = F (2) =1− e−6

(b) P(2  T  4) = F (4) − F (2) = − e−12 + e−6

(c) P( T  4) =1− F (4) = e −12

The expected value (the average or mean) of a continuum random variable


Let X be a continuum random variable with the probability density function
f ( x), a  x  b. The expectation value of X is defined as
b
 = E ( X ) =  x f ( x) dx ,
a

The Variance and Standard Deviation


Another quantity of great importance in probability and statistics is called the variance and
is defined, for a  x  b , by
b
Var( X ) =  = E ([ X −  ] ) =  ( x −  ) 2 f ( x) dx
2 2

b b b
=  x f ( x) dx − 2  x f ( x) dx + 
2 2
 f ( x) dx
a a a

 Var ( X ) = E ( X 2 ) −  2
As we know, the positive square root of the variance is called the standard deviation, which
is given by
 = Var( X )

Example 6:

Verify that the function f ( x) = x 2 / 3, − 1 x  2 is a probability density function, then find:


(i ) P(0  X 1) (ii) E ( X ) (iii ) Var ( X ) .

35
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Solution:
It is easy to see that f ( x)  0, − 1 x  2 , and
 2
1 1 2 1
 f ( x) dx =  x 2 dx =  x3  = 8 +1 =1
−
3 −1 9   −1 9

Then the given function is a probability density function.


1
1 1 1 1 1
(i ) P(0  X 1) =  x 2 dx =  x3  = 3 − 0 =
30 9  0 9 3
 2
1 1 2 1 5
(ii) E ( X ) =  xf ( x) dx =  x3 dx =  x 4  = 16 −1 =
−
3 −1 12   −1 12 4
 2
1
(iii ) Var ( X ) = E ( X ) −  =  x f ( x) dx −  =  x 4 dx −  2
2 2 2 2

−
3 −1

1  5  2 25 11 25
= x − = −
15   −1 16 5 16

Example 7:

Given the probability density function f ( x) = 3(10 x − x 2 ) / 250, 0  x  5 .


Find: (i ) E ( X ) (ii ) Var ( X ) .

Solution:
 5 5
3 3 10 3 1 4  25
(i ) E ( X ) =  xf ( x) dx =  (10 x 2 − x3 ) dx =  3 x − 4 x  = 8
−
250 0
250 0
 5
3
(iii ) Var ( X ) = E ( X ) −  =  x f ( x) dx −  =
2 2 2

2
(10 x3 − x 4 ) dx −  2
−
250 0
5 2 2
3  5 4 1 5   25  45  25 
=  x − x  −   = −   =1.484375
250  2 5 0  8  4  8 

36
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Problems
1. Show that the function
 2(1+ x)
 , 2 x 5
f ( x) =  27
0,
 otherwise

is a probability density function on R , Find


(i ) P(0  x  3) (ii) P(2  x  3) (iii) P( x  2)

2. Verify that the function f ( x) = 3 / x 4 , x 1 is a probability density function, then find:


(i ) F ( x) (ii) P( X  4) (iii) P(2  X  6) .

3. Given the function f ( x) = k x 2 , 0  x 1 , find:


(i) k such that f ( x) is a probability density function
(ii) E ( X ) (iii ) E (3 X + 2) (iv)Var ( X )

4. Given the function f ( x) = k x , 0  x 1 , find:


(i) k such that f ( x) is a probability density function
(ii) P( X  0.5), P( X  0.6) (iii) E ( X ), Var ( X )

37
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

The standard normal probability distribution

If Z is continuous random variable and follows a normal distribution with parameters


 = 0,  =1 , i.e. Z N (0,1) then we say Z is a standard normal random variable. The
density of standard normal therefore is,
z2
1 −
f ( z) = e 2, −  z 
2
which called standard normal distribution density function and it takes the bell shape, as in
the following figure


As we know,  f ( z ) dz =1 . Then the area under the curve is equal to 1.
−

If X is a normal random variable follows a normal distribution with mean   0 and

standard deviation  1, i.e. X N (  , 2 ) . We can convert the problem into an equivalent
one dealing with a standard normal variable Z which follows the above standard normal
distribution, by using the transformation
X −
Z=

Cumulative Probability Distribution Function
The cumulative distribution function of a continuous standard random variable Z with
the density function f ( z ) is defined by:
z
1
 e− x
2
F ( z ) = P( Z  z ) = /2
dx
2 −

The cumulative normal probabilities P( Z  a ) for standard normal random variables are

38
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

given in an attached table where only positive values of Z are reported; as we will see, this is
not a problem, since the normal distribution is symmetric.
That is, this table reports P( Z  a ) = F (a) which is the area under the curve of f ( z ) in the
region − a . So that we can say
P( Z  0) = F (0) = 0.5, P( Z  0) =1− F (0) = 0.5

Rules for using the standardized normal distribution


It is very important to understand how the standard normal distribution works, so we
will spend some time here going over it.
1. P( z  a) = F (a), P( z  − a) =1− F (a) ; a is positive.

Example 1:
Find P( Z 1.65), P( Z 1.0), P( Z − 1.65), P( Z − 1.0)
Solution:
From the table we find that
P( Z 1.65) = F (1.65) = 0.9505, P( Z 1.0) = F (1.0) = 0.8413
 P( Z − 1.65) =1− F (1.65) =1− 0.9505, P( Z − 1.0) =1− F (1.0) =1− 0.8413

39
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 2:
Find k for (i) P( Z  k ) = 0.8729, (ii) P( Z  k ) = 0.3707
Solution:
(i) Since P( Z  k ) = 0.8729>0.5 , then k is positive number and can be obtained from the table
directly. Then k =1.14
(ii) Since P( Z  k ) = 0.3707  0.5 , then k is negative number and cannot be obtained from the

table directly. Then we look for P ( Z  k ) =1− P( Z  k )

 P ( Z  k ) =1− 0.3707 = 0.6293

from the table we find


k = 0.3707  k = − 0.3707

2. P( z  a) =1− F (a), P( z  − a) = F (a) ; a is positive.

Example 3:
Find (i) P( Z  2.2), (ii) P( Z − 1.81)
Solution:
(i) P( Z  2.2) =1− F (2.2) =1− 0.9861= 0.0139, (ii) P( Z − 1.81) = F (1.81) = 0.9649
Example 4:
Find k for (i) P( Z  k ) = 0.9909, (ii) P( Z  k ) = 0.2177
Solution:
(i) Since P( Z  k ) = 0.9909  0.5 , then k is negative number.

 P( Z  k ) = P( Z  − k ) = F ( k )  F ( k ) = 0.9909

From the table we obtain


k = 2.46  k = − 2.46
40
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

(ii) Since P( Z  k ) = 0.2177  0.5 , then k is positive number.


 P( Z  k ) =1− F (k )  1− F (k ) = 0.2177   F (k ) = 0.7823
From the table we obtain k = 0.78

3. P(a  Z  b) = F (b) − F (a)  P(−a  Z  a) = 2 F (a) −1

Example 5:
Find (i) P(0.4  Z 1.55), (ii) P(− 0.39  Z  0.7),
(iii) P(− 2.1 Z − 1.0), (iv) P(− 2.55  Z  2.55).
Solution:
(i) P(0.4  Z 1.55) = F (1.55) − F (0.4) = 0.9394 − 0.6554,
(ii) P(− 0.39  Z  0.7) = F ( 0.7) − F (−0.39) = F ( 0.7) −[1− F (0.39)] = 0.7580 −1+ 0.6517,
(iii) P(− 2.1 Z − 1.0) = F (−1.0) − F (−2.1) = F (2.1) − F (1.0) = 0.9778 − 0.8413,
(iv) P(− 2.55  Z  2.55) = 2 F (2.55) −1= 2  0.9946 −1

Example 6:
Find k for
(i) P(2  Z  k ) = 0.0085, (ii) P( k  Z  3.44) = 0.9303, (iii) P( −k  Z  k ) = 0.9918
Solution:
(i) P(2  Z  k ) = F (k ) − F (2) = 0.0085
 F (k ) = F (2) + 0.0085 = 0.9772 + 0.0085 = 0.9857
 k = 2.19
(ii) Since P(k  Z  3.44) = 0.9303  0.5 , then k is negative and

41
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

P(k  Z  3.44) = F (3.44) − F (− k ) = F (3.44) −1+ F ( k )

 F (3.44) −1+ F ( k ) = 0.9303  F ( k ) = 0.9303 +1− F (3.44)

 F ( k ) = 0.9303 +1− 0.9997 = 0.9306  k =1.48  k =1.48


 k =1.48
(iii) P(−k  Z  k ) = 2 F (k ) −1  2 F (k ) −1= 0.9918
 F (k ) =1.9918 / 2 = 0.9959  k = 2.64

Example 7:
If the time a student stays in a classroom follows the normal distribution with µ = 6 h and σ
= 0.4 h, what is the probability that he stays in a classroom for less than 5 hours?
Solution:
Let X be the normal random variable represents the time. We want to find the probability
P( X  5) . It is more convenient to use the standard normal distribution for a standard random
variable Z such that Z = ( X −  ) /  .
5−6
 P( X  5) = P(Z  ) = P(Z − 2.5) =1− F (2.5) =1− 0.9938
0.4

Example 8:
The time of burning of an experimental rocket is a random variable X following a
normal distribution with a mean of 4.3 seconds and standard deviation 0.04 second. If a
random rocket is taken, find the probability that:
(a) The rocket will burn in less than 4.25 seconds.
(b) The rocket will burn in more than 4.4 seconds.
(c) The rocket will burn in time between 4.32 and 4.4 seconds.
Solution:
(a) The probability that the rocket will burn in less than 4.25 seconds is
4.25 − 4.3
P( X  4.25) = P(Z  ) = P(Z −1.25) =1− F (1.25) =1− 0.8944
0.04
(b) The probability that the rocket will burn in more than 4.25 seconds is

42
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

4.4 − 4.3
P( X  4.4) = P(Z  ) = P(Z  2.5) =1− F (2.5) =1− 0.9938
0.04
(c) The probability that the rocket will burn in time between 4.32 and 4.4 seconds is
4.32 − 4.3 4.4 − 4.3
P(4.32  X  4.4) = P( Z  ) = P(0.5  Z  2.5)
0.04 0.04
= F (2.5) − F (0.5) = 0.9938 − 0.6915

43
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Problems
1. Use the table to find the following probabilities for a continuous standard random variable
Z.
a) P( Z 1.2) b) P( Z  − 1.6) c) P( Z  3.24) d ) P(−1.9  Z  2.26)
e) P(−1.9  Z  − 0.26)
2. According to the particular design of IQ tests )‫ (تصميم اختبارات الذكاء‬which results in scores
that are normally distributed with mean 100 and standard deviation 15, what proportion of
the population )‫ (نسبة السكان‬tested will record scores of 120 or more?
3. Suppose the heights (in cm) of elderly females follows a normal distribution with mean
160 and standard deviation 6.
(i) What proportion of such females are taller than 166 cm?
(ii) What is the probability that a randomly chosen female has height between 145 and 157
cm?
4. Nicotine levels in smokers are modelled by a random variable T with a normal distribution
N ( 315,17 161) .

(i) What is the probability that T is more than 450?


(ii) What is the probability P(150  T  400) ?
(iv) What nicotine level is such that 20% of smokers have a higher level?
(v) What range of levels is covered by the central 92% of the smoking population?
(vii) What is the probability that a smoker's nicotine level is between 215 and 300 or
between 350 and 400?
5. The distance, in kilometers, travelled to work by the employees of a city council may be
modelled by a normal distribution with mean 7.5 and standard deviation 2.5.
a) Find the probability that the distance travelled to work by a randomly selected employee
of the council is:
i) less than 11.0 km; ii) between 5.5 km and 10.5 km.
b) Find d such that 10% of the council’s employees travel less than d km to work.
c) Find the probability that the mean distance travelled to work by a random sample of 6 of
the council’s employees is less than 5.0 km.

44
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Joint Probability Distributions ‫توزيعات االحتمال المرتبطة‬

Our study of random variables and their probability distributions in the preceding
sections is restricted to one-dimensional sample spaces, in that we recorded outcomes of an
experiment as values assumed by a single random variable. There will be situations,
however, where we may find it desirable to record the simultaneous outcomes of several
random variables.
If X and Y are two discrete random variables, the probability distribution for their
simultaneous occurrence can be represented by a function with values f ( x, y ) for any pair of
values ( x, y ) within the range of the random variables X and Y . It is customary to refer to
this function as the joint probability distribution of X and Y .
Hence, in the discrete case,
f ( x, y ) = P ( X = x, Y = y ) ,

that is, the values of f ( x, y ) give the probability that outcomes x and y occur at the same
time. Note that P( X = x,Y = y ) means P( X = x and Y = y ) and Y = y

Definition
The function f ( x, y ) is a joint probability distribution or probability mass function of the
discrete random variables X and Y , if it satisfies the following conditions:
(i) f ( x, y )  0 , for all ( x, y )

(ii)  f ( x, y ) =1
x y

(iii) P( X = x, Y = y ) = f ( x, y )

For any set A of the discrete random variables ( X , Y ) , we have the probability

P(( X ,Y )A) =  f ( x, y)
x, y  A

Where the sum is taken over the values of the discrete random variables that satisfy the
conditions on both of X and Y .

45
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

If we are given a joint probability distribution for X and Y , we can obtain the individual
probability distribution for X or for Y .
The probability distribution f X ( x) of X alone is obtained by summing f ( x, y ) over the
values of Y , that is,
f X ( x ) =  f ( x, y )
y .
Similarly, the probability distribution fY ( y) of Y alone is obtained by summing f ( x, y ) over
the values of X , that is,
fY ( y ) =  f ( x, y )
x .
Where the sum for f X ( x) is over all points in the range of ( X , Y ) for which X = x and the
sum for fY ( y) is over all points in the range of ( X , Y ) for which Y = y .
Because the probability distribution for X and Y appear in the margins of the table (i.e.
column and row totals), as we will see, they are often referred to as the Marginal Probability
Distributions for X and Y .
The marginal distributions f X ( x) and fY ( y) give the probabilities P( X = x) and P(Y = y )
respectively.
We say that X and Y are statistically independent random variables if and only if
f ( x, y) = f X ( x)  fY ( y)
for all ( x, y ) within their range.

The expectation value


The concept of mathematical expectation can be extended to the case of two random
variables X and Y with joint probability distribution f ( x, y ) .
Let X and Y be discrete random variables with joint probability distribution f ( x, y ) . The
mean, or expected value, of the random variable g ( X , Y ) is

E (g( X , Y )) =  g ( x, y ) f ( x, y )
x y

So that, we have

46
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

E ( X Y ) =  x  y  f ( x, y ),
x y

E ( X ) =  x  f ( x, y ) =  x f ( x, y ) =  x  f X ( x),
x y x y x

E (Y ) =  y  f ( x, y ) =  y  f ( x, y ) =  y  fY ( y ).
x y y x y

Covariance between two discrete random variables ‫التباين المشترك‬

Let X and Y be random variables with joint probability distribution f ( x, y ) . The


covariance of X and Y is
 XY =  ( x − E ( x))( y − E ( y )) f ( x, y )
x y

The covariance between two random variables is a measure of the relationship between
them. It is easy to show that
 XY = E( x, y) − E( x) E( y)
Covariance is a measure of the joint variability of two random variables. If the greater
values of one variable mainly correspond with the greater values of the other variable, and
the same holds for the lesser values, (i.e., the variables tend to show similar behavior), the
covariance is positive. In the opposite case, when the greater values of one variable mainly
correspond to the lesser values of the other, (i.e., the variables tend to show opposite
behavior), the covariance is negative. The sign of the covariance therefore shows the
tendency in the linear relationship between the variables. The magnitude of the covariance is
not easy to interpret because it is not normalized and hence depends on the magnitudes of the
variables. When X and Y are statistically independent, it can be shown that the covariance
is zero.
Note that the covariance only describes the linear relationship between two random
variables. Therefore, if a covariance between X and Y is zero, X and Y may have a
nonlinear relationship, which means that they are not necessarily independent.

47
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 1:
f ( x, y ) X:
Let X and Y be two discrete random 0 1 2
variables and have the joint probability
1 1 / 36 3 / 36 5 / 36
distribution f ( x, y ) shown in the table.
Y: 2 2 / 36 4 / 36 6 / 36
Find:
3 3 / 36 5 / 36 7 / 36
a) the probability p( X + Y  3)
b) the covariance  XY

Solution: We construct the table of the marginal distributions f X ( x) and fY ( y) as:

X:
f ( x, y ) fY ( y)
0 1 2
1 1 / 36 3 / 36 5 / 36 9 / 36
Y: 2 2 / 36 4 / 36 6 / 36 12 / 36
3 3 / 36 5 / 36 7 / 36 15 / 36
f X ( x) 6 / 36 12 / 36 18 / 36  fY ( y) =  f X ( x) =1
y x

a) the probability p( X + Y  3) = f (0,1) + f (0,2) + f (0,3) + f (1,1) + f (1,2) + f (2,1)


=1/ 36 + 2 / 36 + 3 / 36 + 3 / 36 + 4 / 36 + 5 / 36 =18 / 36
b) the covariance  XY = E( XY ) − E( X ) E(Y )
12 36 48
E ( X ) =  x f X ( x) = 0 + + = ,
x 36 36 36

9 24 45 78
E (Y ) =  y fY ( y ) = + + = ,
y 36 36 36 36

3 8 15 10 24 42 102
E ( XY ) =  xy f ( x, y ) = + + + + + =
x y 36 36 36 36 36 36 36

102 48 78 102 −104 −2


  XY = − = =
36 36 36 36 36

48
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 2:
f ( x, y ) X:
Let X and Y be two discrete random 0 1 2
variables and have the joint probability
0 3 / 28 9 / 28 3 / 28
distribution f ( x, y ) shown in the table.
Y: 1 6 / 28 6 / 28 0
Find:
2 1 / 28 0 0
a) The marginal distribution of X

b) The marginal distribution of Y


c) The probability p( X + Y 1)
d) The expectations E ( X ), E (Y ), E ( XY ), and the covariance  XY
e) Determine whether the two discrete random variables X and Y are independent or not?

Solution: We construct the table of the marginal distributions f X ( x) and fY ( y) as:

X:
f ( x, y ) fY ( y)
0 1 2
0 3 / 28 9 / 28 3 / 28 15 / 28
Y: 1 6 / 28 6 / 28 0 12 / 28
2 1 / 28 0 0 1 / 28
f X ( x) 10 / 28 15 / 28 3 / 28  fY ( y) =  f X ( x) =1
y x

a) The marginal distribution of X , f X ( x) is given in the table.


b) The marginal distribution of Y , fY ( y) is given in the table.
c) the probability p( X + Y 1) = f (0,0) + f (0,1) + f (1,0) = 3 / 28 + 6 / 28 + 9 / 28 =18 / 28
15 6 21
d) E ( X ) =  x f X ( x) = 0 + + = ,
x 28 28 28

12 2 14
E (Y ) =  y fY ( y ) = 0 + + = ,
y 28 28 28

49
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

6
E ( XY ) =  xy f ( x, y ) = ,
x y 28

6 14 21 −9
  XY = E ( XY ) − E ( X ) E (Y ) = − =
28 28 28 56
e) The random variables X and Y are independent if f ( x, y) = f X ( x)  fY ( y) for all ( x, y ) .
3 10 15
From the table we have f (0,0) = , f X (0) = , fY (0) = .
28 28 28
Then f (0,0)  f X (0)  fY (0)
Therefore, t The random variables X and Y are not independent.

Example 3:
Determine the values of the constant c so that the following function represent joint
probability distributions of the random variables X and Y :
f ( x, y ) = c x − y , for x = − 2,0, 2 ; y = − 2,3 .

Solution: We construct the table of the joint distributions f ( x, y ) as:

f ( x, y ) X:
−2 0 2
−2 0 2c 4c
Y:
3 5c 3c c

The condition  f ( x, y) =1 is necessary for the function f ( x, y ) to be a joint probability


x y

distribution. Then we have


1
0 + 2c + 4c + 5c + 3c + c =1  15 c =1  c=
15

50
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Example 4:
A fair coin is tossed twice. Let X denote the number of heads on the first toss and Y the
total number of heads on the two tosses. Find:
(a) the joint probability distribution of X and Y ;
(b) the marginal distribution of X ;
(c) the marginal distribution of Y ;
(d) the probability that at least 1 head occurs.

Solution:
We have the sample space of tossing the coin once is S X =  H , T  and the sample space

of tossing the coin twice is SY = HH , TH , HT , TT  . Then X = 0,1, Y = 0,1,2 .

Now we can construct the table of the joint distributions f ( x, y ) and the marginal
distributions of X and Y , where
f ( x, y ) = P ( X = x , Y = y ) = P ( X = x ) P ( Y = y )

X:
f ( x, y ) 0 1 fY ( y)
0 1/ 8 1/ 8 1/ 4
Y: 1 1/ 4 1/ 4 1/ 2
2 1/ 8 1/ 8 1/ 4
f X ( x) 1/ 2 1/ 2  fY ( y) =  f X ( x) =1
y x

(d) the probability that at least 1 head occurs, is given by p( X + Y 1) .


 p( X + Y 1) = f (0,1) + f (0,2) + f (1,0) + f (1,0) + f (1,1) + f (1,2)
1 1 1 1 1 7
= + + + + =
4 8 8 4 8 8

51
Sinai University - Faculty of IT & CS == Probability (ST 120) == Prof. Reda S Tantawi

Problems
1. Determine the values of the constant c so that the following function represent joint
probability distributions of the random variables X and Y :
f ( x, y ) = c x y , for x =1, 2,3 ; y =1, 2,3 .
2. Determine the values of the constant c so that the function f ( x, y ) = c ( x + y ) is a joint
probability distribution of X and Y , for x = 0,1,2,3 and y = 0,1, 2 .
Then find:
(a) P( X  2, Y =1) ; (b) P( X  2, Y 1) ;
(c) P( X  Y ) ; (d) P( X + Y = 4) .
(e) Determine whether the two discrete random variables X and Y are independent or not?

3. From a sack of fruit containing 3 oranges, 2 apples, and 3 bananas, a random sample of 4
pieces of fruit is selected. If X is the number of oranges and Y is the number of apples in
the sample, find:
(a) the joint probability distribution of X and Y ; (b) P( X + Y  2) .
(c) Determine whether the two discrete random variables X and Y are independent or not?
(d) The expectations E ( X ), E (Y ), E ( XY ), and the covariance  XY .

4. Let X denote the number of times a certain numerical control machine will malfunction:
1, 2, or 3 times on any given day. Let Y denote the number of times a technician is called on
an emergency call. Their joint probability distribution is given as

(a) Evaluate the marginal distributions of X and Y .


(b) Find P( X + Y  2) .
(c) The expectations E ( X ), E (Y ), E ( XY ), and the covariance  XY .
(d) Determine whether the two discrete random variables X and Y are independent or not?

52

You might also like