You are on page 1of 17

Mathematic for Computer Science - III

CS203B

Lecture 2:

Fundamentals of Elementary Probability Theory - I

1
ELEMENTARY PROBABILITY THEORY

It is so simple that you underestimate its elegance and power

2
A Random Experiment

1. Experiment results in one of many possible outcomes.


How to capture these
2. Outcome will always be from a specified set. rules/facts in
3. Likelihood of each possible outcome is non-negative. probability theory?
4. We are interested in a collection of outcomes.

Tossing a coin 5   Putting letters randomly


Throwing 3 dices uniformly
times
into envelopes
3
Probability Space


1.
  Experiment results in one of many possible outcomes.
2. Outcome will always be from a specified set.
3. Likelihood of each possible outcome is non-negative.
4. We may be interested in a collection of outcomes.

Definition: Probability space associated with a random experiment is


an ordered pair (Ω,P), where
• Ω is the set of all possible outcomes of the random experiment
• P : Ω R such that
– P(ω) ≥ 0 for each ωϵ Ω

Ω is called sample space. 4


Probability Space |Ω|
Elementary events (outcomes)
Tossing a coin 5  𝟐𝟓
•   times
In this course we shall mainly deal with
𝟑
Ω Discrete 3 dices Theory. This  𝟔
ThrowingProbability theory
studies the random experiments whose
sample spaces are finite or countably
  Putting letters randomly
infinite.
uniformly 𝒏  !
into envelopes

Definition: Probability space associated with a random experiment is


an ordered pair (Ω,P), where
• Ω is the set of all possible outcomes of the random experiment
• P : Ω R such that
– P(ω) ≥ 0 for each ωϵ Ω

5
Event in a Probability Space
•  

Definition: An event A in a probability space (Ω,P) is a subset of Ω.


The probability of event is defined as

  =
Where to use this
formula ?
  = complement of .

  𝑨 𝒄 )=  𝟏−  P( 𝑨 )
P(   When computing 6
Is difficult, try computing .
An Important Advice

For solving a problem involving probability,

• Fully understand the underlying sample space.

• Define and understand the corresponding event properly.

7
UNION OF EVENTS

8
Union of two Events
•  
Given two events and defined over a probability space (,P),
what is P(U) ?

 
P(U) P() + P() P(∩)
 𝑨
𝑩
  Ω

Consider any ω ϵ U
Contribution in the R.H.S.
  ω belongs to exactly one of and P(ω)
  ω belongs to both and P(ω)

9
Union of three Events
•  
Given three events , , , defined over a probability space (,P),
what is P(U U ) ?

 P(U U) = P() + P() + P( )


 𝑨 ₁ P(A₁∩) P(A₂∩) P(A₁∩)
 𝑨 ₂ + ∩∩)
 𝑨 ₃ Ω

Consider any ω ϵ U U

Contribution in the R.H.S.


  ω belongs to exactly one of , , P(ω)
  ω belongs to exactly two of , , P(ω)
  ω belongs to each of , , P(ω)
10
Union of  Events
•  
Theorem: For events ,…, defined over a probability space (,P), then
P() =  ℓ
( ℓ1) P(ω)
  ℓ
𝑖  < 𝑗
− ( 2) P(ω)

 ℓ
𝑖<
  𝑗<𝑘
(3 ) P(ω)

( − 1 ) ℓ +1ℓ P(ω)


ℓ +1
  … (  −1 ) ℓ1 ()
 0

)
 0
--------------------------------------------------------------------  1
Consider any ω ϵ .
Suppose ω belongs to exactly events   , ,…,
We are done. 11
UNION OF EVENTS

Application

12
Letters and envelopes
 𝟏
•     =
𝟐
 𝟏
  =
𝟑

• There are letters  𝟑


  =
𝟖
• There are envelopes with distinct addresses written on them.
• Each letter is meant for a unique envelope.

Letters are assigned randomly uniformly to the envelopes, one by one.


Question:
What is the probability that no letter is delivered to its correct address ?
  Event : No letter is placed in its envelope.

  Event :  At least


= one letter is placed in its envelope.
  Event : 13
  th letter is placed in its envelope.
Letters and envelopes
•  
Theorem: For events ,…, defined over a probability space (,P), then
P() =


)
--------------------------------------------------------------------
=
  P) 𝟏
 

  𝟏

… 𝟐!
 +𝟏   for large
𝟑!

  P()
𝒌 +𝟏 𝟏
( −𝟏 )
𝒌!
14

Homework
•  

What is the probability that exactly letters are placed correctly ?

15
RECRUITMENT PROBLEM

16

• There

are applicants aspirant for the Google USA.
 They are arranged in a uniformly random permutation.
AIM of Google: To hire the best applicant

Constraints:
• Only by taking an interview, the applicant can be evaluated.
• Each applicant must be told the result (job offered/rejected)
immediately after the interview.

Assumption:
There is a total order on the suitability of the applicants for the job.

  1. Interview the first applicants and discard all of them.


2. Keep on interviewing the rest of the candidates, and as
soon as you find someone better than the “best among 17
the first ”, offer him/her the job.

You might also like