FOUNDATION TO DATA SCIENCE
Business Analytics
       Unit1: BASIC STATISTICS
              Probability-5
     Prof. Dr. George Mathew
   B.Sc., B.Tech, PGDCA, PGDM, MBA, PhD   1
               PROBABILITY
      Probability can be defined as a numerical
measure of the likelihood that an event will
occur. The value of probability always comes
between 0 and 1.
      A probability near zero indicates an event
is unlikely to occur and a probability near 1
indicates an event is almost certain to occur.
Other probabilities between 0 and 1 represent
degrees of likelihood that an event will occur.
PROBABILITY
PROBABILITY
PROBABILITY
PROBABILITY
PROBABILITY
PROBABILITY
         Conditional Probability
Often the probability of an event is influenced by the
occurrence of another related event. Assuming we have an
event A, the probability of which is P(A). If new information
comes up about a related event B that has already occured,
this information can be utilized to calculate a new probability
for event A, which is called conditional probability denoted
by P(A|B). This is read as ‘the probability of event A given B.
Calculation of Conditional Probability
The fact that conditional probabilities can be computed as
the ratio of a joint probability to a marginal probability
provides
P(A|B) = P(A ∩ B)/ P(B)
PROBABILITY
         Independent Events
     If the probability of event A is not
affected by the existence of event B, these
events are considered as
independent events. In that case the
definition is as follows:
P(A | B) = P(A)
     Or
P(B|A) = P(B)
        Probability Problems
Example 1: A coin is thrown 3 times .what is
the probability that at least one head is
obtained?
Sol: Sample space = [HHH, HHT, HTH,
THH, TTH, THT, HTT, TTT]
Total number of ways = 2 × 2 × 2 = 8.
Fav. Cases = 7
P (A) = 7/8
OR
P (of getting at least one head) = 1 – P (no
head)⇒ 1 – (1/8) = 7/8
Example 2: Find the probability of getting a
numbered card when a card is drawn from
the pack of 52 cards.
Sol: Total Cards = 52.
Numbered Cards = (2, 3, 4, 5, 6, 7, 8, 9, 10)
Total numbered cards=9 from each suit
                      =4 × 9 = 36
Probability of getting a numbered card
P (E) = 36/52 = 9/13
Example 3: There are 5 green 7 red balls.
Two balls are selected one by one without
replacement. Find the probability that first is
green and second is red.
Sol: P (G) × P (R) = (5/12) x (7/11) = 35/132
Example 4: What is the probability of getting
a sum of 7 when two dice are thrown?
Sol: Total number of ways = 6 × 6 = 36
ways.
Favorable cases = (1, 6) (6, 1) (2, 5) (5, 2) (3,
4) (4, 3) --- 6 ways. P (A) = 6/36 = 1/6
Example 6: Two cards are drawn from the
pack of 52 cards. Find the probability that
both are diamonds or both are kings.
Sol: Total no. of ways = 52C2
Case I: Both are diamonds = 13C2
Case II: Both are kings = 4C2
P (both are diamonds or both are kings) =
(13C2 + 4C2 ) / 52C2
Example 2: Find the probability of getting a
numbered card when a card is drawn from
the pack of 52 cards.
Sol: Total Cards = 52.
Numbered Cards = (2, 3, 4, 5, 6, 7, 8, 9, 10)
Total numbered cards=9 from each suit
                      =4 × 9 = 36
Probability of getting a numbered card
P (E) = 36/52 = 9/13
Example 7: Three dice are rolled together.
What is the probability as getting at least one
'4'?
Sol: Total number of ways = 6 × 6 × 6 = 216.
Probability of getting number ‘4’ at least one
time
= 1 – (Probability of getting no number 4) = 1
– (5/6) x (5/6) x (5/6) = 91/216
Conditional Probability
Conditional Probability
Example 2
You toss a fair coin three times:
a.What is the probability of three heads, HHH?
b.What is the probability that you observe exactly one heads?
c.Given that you have observed at least one heads, what is the
probability that you observe at least two heads?
a. P(HHH) = (½)^ 3 =1/8
b. P(Exactly one Head)=P((HTT) +(THT)+(TTH))
                               =(1/8) +(1/8) +(1/8)
                            =3/8
   Let A1 be the event at least one head, and A2 be the event at last
   head
   P(A1) =1- P(TTT) =7/8
   P(A2) =P(2 head)= P(HHT,HTH,THH,HHH) =4/8
   P(A2/A1)= P(A2∩A1)/P(A1)
              =P(A2)/P(A1)= (4/8)/(7/8) =4/7
Given that P(A) =3/8, P(B)=5/8, P(AUB)= 3/4
Find: 1. P(A/B) 2. P(B/A) Show whether A
and B are independent
P(AUB)= P(A)+P(B)-P(A.B)
      3/4 =3/8 +5/8 –P(A.B)
P(A.B)=(3/8+5/8)-3/4 = ¼
P(A/B)= P(A.B)/P(B)=(1/4)/(5/8)= 2/5
P(B/A)=P(A.B)/P(B)= (1/4)/(3/8)=2/3
P(A).P(B)= 3/8X5/8 =15/64 != ¼
Hence A and B are not indeipendent
Bayes Theorem
             Bayes Theorem
Bayes Theorem is based on the concept that
probabilities should be revised when some new
information is available.
Bayes' Theorem states that the conditional
probability of an event, based on the occurrence of
another event, is equal to the likelihood of the
second event given the first event multiplied by the
probability of the first event.
Bayes' Theorem calculates the conditional
probability of an event, based on the values of
specific related known probabilities.
           Bayes Theorem
Bayes theorem is based on the conditional
probability law:
P(A|B) = P(B|A)P(A)/P(B)
where P(A) is the probability of A before the
outcome of event B is known, P(B|A) is the
probability of B assuming what is known about
event A, and P(A|B) is the probability of
A knowing that event B has occurred. P(A) is
called the prior probability of A, while P(A|B)
is called the posterior probability of A.
             Tree diagram
So, this conditional probability can be
explained with the help of a tree diagram,
because the tree diagram is easy to visualize.
So, having AC, having not AC, having CD,
having not CD having CD having not CD. So,
0.7 0.2 0.5 0.2 0.1 so, if you want to know
having CD, so you have to divide 0.2 divided
by 0.7. For example, if you want to know this
this arc, so, this is a 0.5 divided by 0.7 and so
on because a tree diagram is very easy to
understand.
Extension of Conditional Probability
      Next we are going to an important
application that is a Bayes ruler Bayes
theorem, it is used to revise the probabilities,
it has lot of applications in higher level of
probability theory.
      And extension to the conditional law of
probabilities enables revision of original
probability with the new information’s. So, P
( X \ Y) equal to P( Y \ X) x P ( X ) divided by
the summation of this one I will tell you the
net the next slides
             Bayes’ Theorem
Bayes' Theorem, named after 18th-century British
mathematician Thomas Bayes, is a mathematical
formula for determining conditional probability.
Conditional probability is the likelihood of an outcome
occurring, based on a previous outcome having
occurred in similar circumstances. Bayes' theorem
provides a way to revise existing predictions or
theories (update probabilities) given new or additional
evidence.
Bayes Theorem
                        Tabular Approach
Tabular Approach
Step 1. Prepare the following three columns:
Column 1 - The mutually exclusive events Ai for which posterior probabilities are
desired
Column 2 - The prior probabilities P(Ai) for the events
Column 3 - The conditional probabilities P(B ∣ Ai) of the new information B given
each event
Step 2. In column 4, compute the joint probabilities P(Ai ∩ B) for each event and
the new
information B by using the multiplication law. These joint probabilities are found by
multiplying the prior probabilities in column 2 by the corresponding conditional
probabilities in column 3; that is, P(Ai ∩ B) = P(Ai )P(B ∣ Ai ).
Step 3. Sum the joint probabilities in column 4. The sum is the probability of the
new information, P(B).
     Bayes Theorem Example
There are 4 boys and 2 girls in room A and 5
boys and 3 girls in room B. A girl from one of
the two rooms laughed loudely. What is the
probability that the girl who laughed was from
room B.
Solution:
E1:the event that the girl laughed from room A
E2=the event that the girl laughed from room B
P(E1)=1/2
P(E2)=1/2
        Bayes Theorem Example
Let G denote the event that the girl laughed
P(G/ E1)= Probability that the girl selected belongs to room A
P(G/ E1)=2/6 =1/3
Similarly, P(G/ E2)=3/8
        P(E2) P(G/E2)
P(E2/G)= ----------------
         P(E1) P(G/E1)+ P(E2) P(G/E2)
                 (1/2)x (3/8)           (3/16)
P(E2/G)= ---------------------------- = ------   =9/17
          (1/2)x(1/3)+ (1/2)x (3/8) (17/48)
Bayes Theorem Example
Example
Three persons A, B and C have applied for a job in a private company. The
chance of their selections is in the ratio 1 : 2 : 4. The probabilities that A, B and C
can introduce changes to improve the profits of the company are 0.8, 0.5 and 0.3,
respectively. If the change does not take place, find the probability that it is due to
the appointment of C.
Let E1: person A get selected,
E2: person B get selected,
E3: person C get selected
A: Changes introduced but profit not happened
Now, P(E1) = 1/(1+2+4) = 1/7
P(E2) = 2/7 and P(E3) = 4/7
P(A|E1) = P(Profit not happened by the changes introduces by A) = 1 – P(Profit
happened by the changes introduces by A) = 1 – 0.8 = 0.2
P(A|E2) = P(Profit not happened by the changes introduces by B) = 1 – P(Profit
happened by the changes introduces by B) = 1 – 0.5 = 0.5
P(A|E3) = P(Profit not happened by the changes introduces by C) = 1 – P(Profit
happened by the changes introduces by C) = 1 – 0.3 = 0.7
Example