You are on page 1of 5

College of information Engineering

Computer Networks Department


2nd Year /1st Semester
Lecture 5

Probability

1 Intro
The probability is a measure of chance.

If we have an event that can happen in n different ways, and we have a subset of these events
happens in h ways, then the probability of the subset is h/n.

Ex: through a fair coin, {H, T}

The probability of head =1/2

Ex: through a dice, {1, 2, 3, 4, 5, 6}

The probability of (getting 2) = 1/6

The probability of (getting number =>5) =1/6+1/6=2/6

• Sample space: The set of all possible outcomes under specific conditions if an experiment
was performed once is called the sample space of the experiment and is denoted by S.
• Outcomes {2 ,4, 6,6, 5 ,5 ,3 ,2, 2, 3 }
• Event: Any set of outcomes in which there might be some particular interest is called an
event.
• Trial

2 Axioms
Axiom 1. For any event A, P(A) ≥ 0

Axiom 2. Probability of the sample space S, P(S) = 1

Axiom 3. For any number of mutually exclusive events A1, A2, …, in the class,

P(A1 ∪ A2 ∪… ) = P(A1) + P(A2) + …


Prob. & Stats./ 2nd Year/ 1st Sem. Lec 5
2.1 Important Theorems
• If A1 ⊂ A2, then P(A1) ≤ P(A2) and P(A2 − A1) = P(A2) − P(A1)
Ex
{1,2,3,4,5,6}
A1= getting (number =5) ={5}
A2= getting (number =>4) = {4,5,6}
A2-A1={4,6}
(A2 − A1) = P(A2) − P(A1)= 3/6-1/6=1/3=2/6
h/n
• For every event A, 0 ≤ P(A) ≤ 1,i.e., a probability between 0 and 1.
• For ∅, the empty set, P(∅) = 0 , the impossible event has probability zero.
• If 𝐴′ (Ac) is the complement of A, then P(𝐴′ ) = 1 – P(A)

EX

{1,2,3,4,5,6}
A3={3,4}
A3C={1,2,5,6}
P(A3C)=4/6=2/3
P(𝐴3′ ) = 1 – P(A3)=1-(2/6)= (6/6)-(2/6)=4/6

Mutually exclusive events: events cannot occur at same time.


EX
A={1} B={2}
A={odd number} B={2}
A={a, a<4} B={4}
Independent event: events are unaffected each other.

• If A = A1 ∪ A2 ∪…∪ An, where A1, A2, …, An are mutually exclusive events, then
P(A) = P(A1) + P(A2) + … + P(An)
EX
A1={1} P(A1)=1/6
A2={2} P(A2)=1/6
P(A1 U A2)=1/6+1/6=2/6
• If A and B are any two events, then P(A∪B) = P(A)+P(B)–P(A∩B)

EX
A={4,5} P(A)=2/6
B={5,6} P(B)=2/6
A U B={4,5,6}
P(A U B)=3/6

A∩B={5} P(A∩B)=1/6
P(A U B) = 2/6+2/6-1/6=(2+2-1)/6=3/6
Prob. & Stats./ 2nd Year/ 1st Sem. Lec 5
• P(A∩B)=0 if A and B are mutually exclusive events
• HW: For 3 events A1, A2, A3,then

P(A1∪A2∪A3) =?.

• For any events A and B, P(A) = P(A ∩ B) + P(A ∩ 𝐵 ′ )

3 Random Experiment:
In probability theory, performing a repetitive operation that results in one of the possible outcomes is
said to be performing a random experiment.

4 Conditional Probability

Let A and B be two events such that P(A) > 0. Denote P(B | A) the probability of B given that A has
occurred. Since A is known to have occurred, it becomes the new sample space replacing the original
S. From this we are led to the definition

𝑃(𝐴 ∩ B)
𝑃(𝐵|𝐴) =
𝑃(𝐴)

Then 𝑃(𝐴 ∩ B) = 𝑃(𝐵|𝐴). 𝑃(𝐴)

In words, this is saying that the probability that both A and B occur is equal to the probability that A
occurs times the probability that B occurs given that A has occurred. We call P(B | A) the
conditional probability of B given A, i.e., the probability that B will occur given that A has
occurred. It is easy to show that conditional probability satisfies the axioms of probability previously
discussed.
Prob. & Stats./ 2nd Year/ 1st Sem. Lec 5
Similarly,
𝑃(𝐴 ∩ B)
𝑃(𝐴|𝐵) =
𝑃(𝐵)

Then 𝑃(𝐴 ∩ B) = 𝑃(𝐴|𝐵). 𝑃(𝐵)

• If A and B are mutually exclusive events then 𝑃(𝐴 ∩ B) = 0 , hence both 𝑃(𝐴|𝐵) and
𝑃(𝐵|𝐴) are zero.

• If A and B are independent event, 𝑃(𝐴 ∩ B) = 𝑃(𝐴)𝑃(B) , then 𝑃(𝐴|𝐵) = 𝑃(𝐴) and
𝑃(𝐵|𝐴) = 𝑃(𝐵).

EX:

In two fair dice experiment let A be the number occurred on the first die, and B is the number of
second die.

Now we have two objects with elements:

A={1,2,3,4,5,6} and B={1,2,3,4,5,6}

The following are the possible outcomes (ai ,bj) of the experiments. Here ai and bj are independent
(WHY ?)

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


(2,1) (2,2) (2,3) (2,4) (2,5) (2,6)
(3,1) (3,2) (3,3) (3,4) (3,5) (3,6)
(4,1) (4,2) (4,3) (4,4) (4,5) (4,6)
(5,1) (5,2) (5,3) (5,4) (5,5) (5,6)
(6,1) (6,2) (6,3) (6,4) (6,5) (6,6)
Each element in above matrix has probability of (1/6).(1/6) =1/36

Find the probability that:

P(ai + bj =11 ) = 2/36 =1/18

P(ai + bj =8 ) = 5/36

P(ai = bj ) = 6/36 =1/6

P(ai = 3 | bj = even ) = P(ai = 3 ) = 1/6 (independent events)

P(ai = 3 ∩ bj = even ) = 3/36 = 1/12

P(ai = 3 U bj = even ) = P(ai = 3) + P(bj = even ) - P(ai = 3 ∩ bj = even )

= (1/6) + (1/2) – (1/12) = 3/4

P(ai=7 ∩ bj =2 ) = 0
Prob. & Stats./ 2nd Year/ 1st Sem. Lec 5
HW

Try to find the following probabilities:


1) P(ai = 1 | bj = 1 )
2) P(ai = odd ∩ bj = 4 )
3) P(ai = 5 U bj< 3 )
4) P(ai =even ∩ bj = odd )
5) P(ai + bj = even)
6) P(2 < (ai + bj ) < 8)
7) P((ai>4) ∩ (bj< 4))

You might also like