Probability Basics

Probability = #offavorableoutcomes#oftotalpossibleoutcomes\large{\mathsf {\#\,of\,favorable\,outcomes \over \#\,of\,total\,possible\,outcomes}}

Examples:

  • In a deck of cards (4 suites),

    • Probability of drawing diamond = 1352{13 \over 52} = 14{1 \over 4}
    • Probability of drawing a Jack = 452{4 \over 52} = 113{1 \over 13}
  • In a 6 sided dice,

    • Probability of getting number six = 16{1 \over 6}
    • Probability of getting even number = 36{3 \over 6} = 12{1 \over 2}

Events

Now that we know the equation for Probability, the # of favorable outcomes is also called an Event and # of total possible outcomes is called Sample Space.

#offavorableoutcomesEvent(A,B,...)#oftotalpossibleoutcomesSampleSpace(S)\mathsf {\#\,of\,favorable\,outcomes\,\color{red}{\leftarrow Event\,(A,\,B,...)} \over \#\,of\,total\,possible\,outcomes\,\color{red}{\leftarrow Sample\,Space\,(S)}}

Example 1

Event A Event Ā

  • Sample S = Deck of cards (52)
  • Event A = Drawing a diamond from deck of cards
  • Event Ā = Complement of A = Drawing a non-diamond card from the deck
  • P(A) = 1352{13 \over 52} = 14{1 \over 4}, P(Ā) = 3952{39 \over 52} = 34{3 \over 4}
  • Also, P(A) = 1 - P(Ā)

Example 2

  • Event B = Drawing a Jack from deck of cards
  • Event (B) = Drawing a non-Jack card
  • P(B) = 452{4 \over 52} = 113{1 \over 13}, P(B) = 4852{48 \over 52} = 1213{12 \over 13}

Intersection & Union

Take the same sample space S = Deck of cards (52)

  • Event A: Draw a Diamond
  • Event B: Draw a Jack
  • Event C: Draw a Heart

Example 1: Intersection A, B

Now, intersection of Event A & Event B (or A and B) refers to Drawing a Diamond Jack card. There is only 1 card satisfying this condition.

  • A ∩ B => intersection of A and B => A and B
  • P(A ∩ B) = 152{1 \over 52}

Event Intersection

Example 2: Union A, B

Union of Event A & Event B (A or B) refers to Drawing a Diamond card or a Jack card. There are 13 Diamond cards and 4 Jack cards.

  • A ∪ B => Union of A and B => A or B
  • P(A ∪ B) = 1652{16 \over 52}

Looking at graphically,

Event Union

  • P(A ∪ B) = P(A) + P(B) - P(A ∩ B)

Example 3: Intersection A, C

Intersection of Event A & Event C refers to Drawing a card which is both Diamond and Heart. There are no cards with such condition.

  • A ∩ C = Ø
  • Event A and Event C are Mutually exclusive

Event Mutually exclusive

Conditional Probability

Independent Events

Two Events (say A and B) are said to to independent of each other, if probability that one event occurs doesn't affect the probability of the other event.

Example

Event A: Roll 2 on die first time, Event B: Roll 6 on die second time

  • Here A and B are independent of each other, i.e. Event B is no way affected by the outcome of Event A.
  • P(A ∩ B) = P(A) * P(B) = 16×16{1 \over 6} \times {1 \over 6} = 136{1 \over 36}

For independent events,

P(BA)=P(A)P(B\big|A) =P(A)

Dependent Events

Two Events (say A and B) are dependent if the occurrence of the first event affects the occurrence of the second event.

Example

Event A: Draw Diamond Ace from the deck, Event B: Draw Spades Ace from the remaining deck.

  • Here, after the completion of Event A, you're left with one less card in the deck.
  • Therefore, P(B|A) = 152×151{1 \over 52} \times {1 \over 51} = 12601{1 \over 2601}

For dependent events,

P(BA)=P(AB)P(A)P(B\big|A) ={P(A ∩ B) \over P(A)}

P(AB)=P(AB)P(B)P(A\big|B) ={P(A ∩ B) \over P(B)}

Bayes' Theorem

Example:

When India wins a cricket match, Mr. Harsha predicts the win correctly 70% of the time. When India loses the match, Harsha will predict win 35% of the time.

Given that, India wins cricket match 60% of the time, what are the chances of India winning whenever Harsha predicts that India wins?

This is clearly a conditional probability problem.

Event W: India wins the match
Event L: India loses the match
Event Y: Harsha predicts India wins the match
Event N: Harsha predicts India loses the match

What's been asked? The probability that India wins (W), given Harsha predicts the win (Y)

i.e. we need to calculate P(W | Y)

What do we know so far,

  • P(W) = 60% (India wins 60% of the time)
  • P(Y | W) = 70% (Harsha predicts 70% given India wins)

Now,

P(AB)=P(AB)P(B)P(A|B) = {P(A ∩ B) \over P(B)}

P(BA)=P(AB)P(A)P(B|A) = {P(A ∩ B) \over P(A)}

Equating them gives,

P(AB)=P(AB)×P(B)=P(BA)×P(A)P(A ∩ B) = P(A|B) \times P(B) = P(B|A) \times P(A)

Hence,

P(BA)=P(AB)×P(B)P(A)BayesTheoremP(B|A) = {P(A|B) \times P(B) \over P(A)} \color{red}{\leftarrow Bayes'\,Theorem}

Now we can calculate P(W|Y) as,

P(WY)=P(YW)×P(W)P(Y)P(W|Y) = {P(Y|W) \times P(W) \over P(Y)}

How to calculate P(Y)P(Y)? i.e. Probability of Harsha predicting India's win. Harsha predicts India's win in two scenarios - when India actually wins and when India loses. Therefore,

P(Y)=60%(Indiawin)×70%(Predictwin)+40%(Indialose)×35%(Predictwin)P(Y) = 60\% (India\,win) \times 70\% (Predict\,win) + 40\% (India\,lose) \times 35\% (Predict\,win)

P(Y)=56%P(Y) = 56\%

Therefore,

P(WY)=70%×60%56%=75%P(W|Y) = {70\% \times 60\% \over 56\%} = 75\%

Bottom-line is, if Harsha says India wins, there's 75% chance that India actually wins