RSA Module 1
RSA Module 1
ECC504
Dr. Ranjan bala jain
Professor
Department of EXTC
VESIT
W hen you
E nter this class
L earning is Fun And
C ooperation is Expected
O ur Positive Attitude and
M utual respect are part of
E verything We do and Say....
Deterministic &
probabilistic models
Mathematical Models
● To study some observational phenomena, a
mathematical model is required.
● Mathematical models can be divided into two
types:
(i) Deterministic model, and
(ii) Probabilistic model.
Introduction : Deterministic model
● A deterministic model can be used for a physical quantity and
the process generating it provided sufficient information is
available about the initial state and the dynamics of the process
generating the physical quantity.
For example,
● We can determine the position of a particle moving under a
constant force if we know the initial position of the particle and
the magnitude and the direction of the force.
● We can determine the current in a circuit consisting of
resistance, inductance and capacitance for a known voltage
source applying Kirchoff's laws.
Introduction :
Noise Variables
affect
Transformation
Of inputs to
Outputs.
Introduction :
Finite
S={HH, HT,TH,TT}
Discrete
Countable Infinite
Sample S={0.0,0.1, 0.2,0.3,0.4}
Space
Uncountable
Continuous
HW
● Determine, which type of sample spaces they are
?Discrete / continuous ?
● Experiments E1-E5 have finite discrete sample spaces.
● Experiment E6 has a countably infinite discrete sample
space.
● Experiments E7-E13 have continuous sample spaces.
Events
● We are usually not interested in the occurrence of specific outcomes, but
rather in the occurrence of some event (i.e., whether the outcome
satisfies certain conditions).
● This requires that we consider subsets of S. We say that A is a subset of B if
every element of A also belongs to B.
● For example, in Experiment which involves the measurement of a voltage,
we might be interested in the event “signal voltage is negative.”
● The conditions of interest define a subset of the sample space, namely,
the set of points ξ from S that satisfy the given conditions.
● For example, “voltage is negative” corresponds to the set {ξ: -∞<ξ<0}.
● The event occurs if and only if the outcome of the experiment is in this
subset. For this reason events correspond to subsets of S.
Events
● An event is simply a set of possible outcomes. To be more specific, an
event is a subset A of the sample space S.
● Two events of special interest are the certain event, S, which consists of
all outcomes and hence always occurs,
Experiment E2: Select a ball from an urn containing balls numbered 1 to 4. Suppose that balls 1 and 2 are
black and that balls 3 and 4 are white. Note the number and color of the ball you select.
E2: “The ball is white and even-numbered: A2 = {(2,w)}
Experiment E3: Toss a coin three times and note the sequence of heads and tails.
E3: “The three tosses give the same outcome: A3={(HHH), (TTT)}
Experiment E4: Toss a coin three times and note the number of heads.
E4: “The number of heads equals the number of tails: A4= {Ø}
Experiment E5: Count the number of voice packets containing only silence produced from a group of N
speakers in a 10-ms period.
E5: “No active packets are produced,” A5 = (0)
Events : HW
● E6: “Fewer than 10 transmissions are required:
● E7: “The number selected is nonnegative:
● E8: “Less than seconds elapse between page requests:
● E9: “The chip lasts more than 1000 hours but fewer than 1500 hours:
● E10:“The absolute value of the voltage is less than 1 volt:
● E11:“The two voltages have opposite polarities:
● E12:“The two numbers differ by less than 1/10:
● E13:“The two numbers differ by less than 1/10:
● E14: “The system is functioning at time t1:
Events
• An event may consist of a single outcome, as in A2 and A5 event from a
discrete sample space that consists of a single outcome is called an elementary
event.
• The null event Ø, arises when none of the outcomes satisfy the
conditions that specify a given event, as in A4
Identities
Probability Measure
● An assignment of real numbers to the events defined in a sample
space S is known as the probability measure.
● Consider a random experiment with a sample space S, and let A be a
particular event defined in S.
● Probability can be defi ned in several ways. There are three types of
definitions.
Classical definition
Relative-frequency definition
Axiomatic definition
Probability: Classical Definition
The probability P(A) of an event A is the ratio of the
number of outcomes n(A) of an experiment that are
favourable to A to the total number of possible outcomes
of the experiment.
Note that the total number of possible outcomes is equal
to the sample space n(S).
Therefore, the probability, P(A) = n(A) / n(S)
Example: Classical Definition
● The probability of getting an even no in die tossing experiment ?
● Exp: Die tossing
● Event : to get even no in a particular toss.
● S= (1,2,3,4,5,6)
● A= (2,4,6)
● P(A) = n(A)/ n(S) = 3/6 = ½ =0.5
● This definition of probability is also known as apriori or
mathematical.
Examples
● A fair die is rolled once. What is the probability of getting a 6‘ ?:
P=1/6
● A fair coin is tossed twice. What is the probability of getting two heads'?:
p=1/4
Example
● A standard deck of playing cards has 52 cards that can be divided in several manners.
There are four suits (spades, hearts, diamonds, and clubs), each of which has 13 cards
(ace, 2, 3, 4, . . . , 10, jack, queen, king). There are two red suits (hearts and diamonds)
and two black suits (spades and clubs). Also, the jacks, queens, and kings are referred
to as face cards, while the others are number cards. Suppose the cards are sufficiently
shuffled (randomized) and one card is drawn from the deck. each atomic outcome has
a probability of 1/52.
● Define the events: A = {red card selected}, B = {number card selected}, and C = {heart
selected}.
● Pr(A) = 26/52 = 1/2. Likewise, Pr(B) = 40/52 = 10/13 and Pr(C) = 13/52 = 1/4.
● Events A and B have 20 outcomes in common,
● hence Pr(A, B) = 20/52 = 5/13. Likewise, Pr(A,C) = 13/52 = 1/4 and Pr(B,C) = 10/52 = 5/26.
● It is interesting to note that Pr(A,C) = Pr(C). This is because C ⊂ A and as a result A ∩ C = C.
Probability : Relative Frequency Definition
Consider a random experiment that is performed n times.
That is, both the events cannot occur simultaneously, i.e if A occurs, B can
not occur and vice versa.
If the sample space S is not finite, then axiom 3 must be modified as follows:
Axiom 3: If A1, A2, . . . is an infinite sequence of mutually exclusive events in S (A i
& Aj = 0 for i ≠ j), then,
Ex 1
Ex 2
Ex 3
Ex 4
Ex 5
EX6
Ex 7
Quick Revision : Q.1
Which of the following statement is false ?
• We say that A is a subset of B if every element of A also belongs to B.
• The event occurs if and only if the outcome of the experiment is in this
subset
• events correspond to subsets of S.
• All the above
• None of these
Quick Revision : Q.2
Identify the type of event, if
● P(A) = 1
● n(B) = 0
● n(A) = S
● n(C)= 1
Quick Revision : Q.3
Classical definition of probability is related to
● No. of outcomes of a random experiment
● No. of outcomes of an event related to that experiment
● Both
● Can not say.
Both, P(A) = n(A)/ n(S)
Quick Revision : Q.4
Classical definition of probability is also known as
● Mathematical definition
● Apriori Probability
● Both
● Can not say.
Both, P(A) = n(A)/ n(S)
Quick Revision : Q.4
Relative definition of probability is related to
● No. of times a random experiment is experiment is performed
● No. of times that an event occurs
● Both
● Can not say.
Both,
Quick Revision : Q.5
Relative definition of probability is used
● When No. of outcomes of a random experiment are known in advance
● When No. of outcomes of a random experiment are not known in
advance
● Both
● Can not say.
When No. of outcomes of a random experiment are not known in advance
Quick Revision : Q.6
Classical definition of probability is used
● When No. of outcomes of a random experiment are known in advance
● When No. of outcomes of a random experiment are not known in
advance
● Both
● Can not say.
When No. of outcomes of a random experiment are known in advance
P(A) = n(A)/ n(S)
Quick Revision : Q.7
Classical definition of probability is also known as,
● Mathematical/ Priori definition
● Aposteriori
● Both
● Axiomatic
Mathematical/ Priori definition
P(A) = n(A)/ n(S)
Quick Revision : Q.8
Relative definition of probability is also known as,
● Mathematical/ Priori definition
● Statistical/Aposteriori
● Both
● Axiomatic
Statistical/Aposteriori
Quick Revision : Q.9
Which of the following is not true ?
1.0 ≤ P (A) ≤ 1, which means that the probability of A is a non-negative number
between 0 and 1 including 0 and 1.
2.P (S) = 1. The probability of sample space is one.
3.For any sequence of mutually exclusive events,
P(A1 U A2 U A3 U An) = P(A1) + P(A2) + P(A3) +……+ P(An)
4. For any sequence of mutually exclusive events,
P(A1 U A2 U A3 U An) ǂ P(A1) + P(A2) + P(A3) +……+ P(An)
P(A1 U A2 U A3 U An) ǂ P(A1) + P(A2) + P(A3) +……+ P(An)
Elementary properties of probability
Revision Quiz
● Suppose, we toss a coin 150 times and we get head for 102 times. The
probability of getting a tail is, which definition of probability you will
apply ?
● A coin is tossed 100 times out of which head comes 12 times. Find the
experimental probability of getting a head ?
● On February 1, 2003, the Space Shuttle Columbia exploded. This was the
second disaster in 113 shuttle missions for NASA. Now, the probability
that a future mission is successfully completed will be ?
● The probability of getting an even integer from the list 1, 2, 3, 4, .... will be
?
Knowledge is Power
But
Practice is the Key !!!
Theorem 3
Ex 8
B
● From this we can find that A and are two mutually exclusive events.
Also,
A'B
Prove that
Elementary properties of probability
Equally Likely Events
Equally likely events :
Ex 9
Ex 10
Ex 11
Ex 12
Ex
13
Quick Revision
Which of the following is not equally likely event ?
● Tossing a dice
● Tossing a coin
● Picking a ball containing many balls of different colors
● All of the above
Picking a ball containing many balls of different colors
Which of the following is not correct ?
None of these
Quick Revision
If A is subset of B, then which of the following is true ?
● Probability of A is equal to probability of B
● Probability of A is greater than probability of B
● Probability of A is less than probability of B
● None of the above
Probability of A is less than probability of B
Quick Revision
● which of the following is true ?
Basic Principle of Counting
● Consider two experiments are to be performed. If one experiment can
result in any of m outcomes and if another experiment results in any of n
possible outcomes then there are mn possible outcomes of the two
experiments.
● This can be extended to k experiments in which the first one may result
in any of n1 possible outcomes. For each of the possible outcomes, there
are n2 possible outcomes of the second experiment; and for each of the
possible outcomes, of the first two experiments, there are n 3 possible
outcomes of the third experiment, and so on. Then for k experiments,
there are a total of n1n2 … nk outcomes.
Permutations
● Consider the letters a, b and c. These letters can be arranged in 6
different ways as shown below: abc, acb, bac, bca, cab, cba
● Each arrangement is known as permutation. The first letter can be
chosen from any three letters. Once we choose the first letter, the
second letter can be chosen from any two letters, and the third letter can
be chosen from the remaining 1.
● Therefore, the number of permutations is 3 *2 *1 = 6.
● This can be expanded to n objects. The different permutations of the n
objects is n(n – 1) (n – 2) … 3.2.1 = n!
Permutations
● For example, in a cricket team with 11 players, the different batting
orders are 11! = 39916800
● In n objects of which n1 are alike, n2 are alike … nr are alike, the number
of permutations is
E1 or E2 or …or EN then
E4
the probability of E2 E3
occurrence of A is given EN
by,
P(A) = P(E1) P(A| E 1) + P(E2) P(A |E 2) +……. + P(EN) P(A | EN)
Total Probability Theorem
● Proof: Let S be the sample space, E1, E2, …, EN are N mutually exclusive and
exhaustive events.
● These events satisfy Ei ∩ Ej = Ø, i ǂ j = 1, 2, …, N
● The sample space, S = E1 U E2 U E3 U … U EN
A∩E2 A∩E3
A = (A ∩ E1)U(A ∩ E2) U (A ∩ E3) U … U (A ∩ EN)
E1 A
A∩E1
E1 A
The theorem of total probability
can be used to determine the E2
E4
E3
probability of a complex event
EN
in terms of related simpler
events.
This result will be used in Bays'
theorem.
Quick revision
Identify the correct statement
● The theorem of total probability can be used to determine the probability
of a complex event in terms of related simpler events.
● P(A) = P(E1) P(A| E1) + P(E2) P(A |E2) +……. + P(EN) P(A | E N)
● This result will be used in Bays' theorem.
All the above
None of these
Total Probability Theorem
This can be better understood with the help of the below three simple examples.
● The doctor reaches the patient for treatment, takes different modes of
transportation, and his probability of arriving on time is equal to the
summation of his probability of arriving on time, from different modes of
transportation.
● A student is to represent the school in an external competition. The probability
of selecting the student for the competition is equal to the summation of the
probability of selecting this student from the different classes in the school.
● The probability of finding a defective mango is the summation of the
probability of finding this defective mango from the different boxes of
mangoes.
● E1 : Selection of bag 1
E1
● E2 : Selection of bag 2
● A : from the selected bag pick a
ball that should be black. E2
● P(A) = ?
A
● P(E1) = P(E2) =1/2
● P(A) = P(E1) P(A/E1) + P(E2) P(A/ ● Substitute all values in the
E2) formula,
● P(A/E1)= 4/9 ● P(A)= (½ *4/9) + (½*5/8) = 77/144
● P(A/E2)= 5/8
● E1 : Boys student
● E2 : Girls student E1
● A : from the total students,
selected one will get distinction E2
● P(A) = ?
● P(E1) =0.6 , P(E2) =0.4 A
P(A)
Baye’s Theorem
● Proof: Let S be the sample space, E1, E2, …, EN are N mutually exclusive and
exhaustive events.
● These events satisfy Ei ∩ Ej = Ø, i ǂ j = 1, 2, …, N
● The sample space, S = E1 U E2 U E3 U … U EN
A∩E1 A∩E1
A = (A ∩ E 1)U(A ∩ E2) U (A ∩ E3) U … U (A ∩ EN)
A∩E1 E4
Since P(A/E1 )= P(A ∩ E1)/P( E1) E2 E3
EN
E4
● Using the multiplication theorem of probability, E2 E3
P(A ∩ Ei) = P(A) P(E i | A) = P(Ei) P(A/E i) EN
T1
Determine the probability that a zero was transmitted
when the received message is one. P(T0/R1) = ??? 0.14
Hw : In a binary communication system a zero and a one is transmitted with
probability 0.6 and 0.4 respectively. Due to error in the communication system a
zero becomes a one with a probability 0.1 and a one becomes a zero with a
probability 0.08.
Determine the probability (i) of receiving a zero and (ii) that a one was transmitted
when the received message is zero.
Let T0 : Event associated with transmission of 0
T1 : Event associated with transmission of 1
R 0 : Event associated with reception of 0
R 1 : Event associated with reception of 1 T0 R
P(T 0 ) = 0.6, P(T1 )=0.4,
P(R1 /T 0 ) = 0.1, P(R0 / T 0 ) = 0.9
P(R0 /T 1 ) =0.08, P(R1/T1)= 0.92 T1
P(R0 ) = ?? = P(R0 /T 0) P(T 0 ) + P(R0 /T 1) P(T 1 ) =0.9*0.6 +0.08*0.4=0.86
P(R1 ) = ?? = P(R1 /T 0) P(T 0 ) + P(R1 /T 1) P(T 1 ) = ??? (HW)
Hw : In a binary communication system a zero and a one is transmitted with
probability 0.6 and 0.4 respectively. Due to error in the communication
system a zero becomes a one with a probability 0.1 and a one becomes a
zero with a probability 0.08.
Determine the probability (i) of receiving a zero and (ii) that a one was
transmitted when the received message is zero.
J
Q
F
K
Simulation of coin flipping and die tossing.
● coin_flip=round(rand(1)) % Simulate flip of a coin.
● die_toss=ceil(6*rand(1)) % Simulate toss of one die. dice_toss=ceil(6*rand(1,2))
% Simulate toss of two dice
● The command rand(m,n) creates a matrix of m rows and n columns, where
each element of the matrix is a randomly selected number equally likely to fall
anywhere in the interval (0,1).
● By rounding this number to the nearest integer, we can create a randomly
selected number equally likely to be 0 or 1
● Similarly, if we multiply rand(1) by 6 and round up to the nearest integer, we
will get one of the numbers 1, 2, ... , 6 with equal probability. This can be used
to simulate the rolling of a die.
Relative frequency approach to assign the probability of the event,
Thank You !