Episode 8 — Aptitude and Reasoning / 8.15 — Probability

8.15.a Concepts and Formulas -- Probability


1. Basic Definitions

Experiment

An activity or process that produces a definite outcome. Examples: tossing a coin, rolling a die, drawing a card.

Random Experiment

An experiment whose outcome cannot be predicted with certainty in advance.

Sample Space (S)

The set of all possible outcomes of a random experiment.

Coin toss:     S = {Head, Tail}          |S| = 2
Rolling a die: S = {1, 2, 3, 4, 5, 6}   |S| = 6
Two coins:     S = {HH, HT, TH, TT}     |S| = 4
Two dice:      |S| = 36
n coins:       |S| = 2^n

Event (E)

A subset of the sample space. An event is said to "occur" when the outcome belongs to that subset.

Event: "getting an even number on a die"
E = {2, 4, 6}

Favourable Outcomes

The outcomes in the sample space that satisfy the condition of the event.


2. Definition of Probability

Classical (Theoretical) Definition

P(E) = Number of favourable outcomes / Total number of outcomes
     = n(E) / n(S)

Properties

1. 0 <= P(E) <= 1        for any event E
2. P(S) = 1              (certain event)
3. P(empty set) = 0      (impossible event)
4. P(E) = 0              means E is impossible
5. P(E) = 1              means E is certain

Example

What is the probability of getting a prime number when a die is rolled?

S = {1, 2, 3, 4, 5, 6}
E (prime) = {2, 3, 5}

P(E) = 3/6 = 1/2

3. Complementary Probability

Definition

The complement of event E (written as E' or E-bar) consists of all outcomes NOT in E.

P(E') = 1 - P(E)
P(not E) = 1 - P(E)

Why It Matters

For "at least one" problems, it is almost always easier to compute:

P(at least one) = 1 - P(none)

Example

Probability of getting at least one head in 3 coin tosses:

P(at least 1 head) = 1 - P(no head)
                   = 1 - P(all tails)
                   = 1 - (1/2)^3
                   = 1 - 1/8
                   = 7/8

4. Types of Events

Mutually Exclusive Events

Two events A and B are mutually exclusive if they cannot occur simultaneously.

A intersection B = empty set
P(A and B) = 0

Example: Getting a "2" and getting a "5" on a single die roll are mutually exclusive.

Exhaustive Events

Events that together cover the entire sample space.

E1 union E2 union ... union En = S

Independent Events

Two events A and B are independent if the occurrence of one does not affect the probability of the other.

P(A and B) = P(A) x P(B)     (if independent)

Example: Two separate coin tosses -- the result of the first does not affect the second.

Dependent Events

Events where the outcome of one affects the probability of the other.

Example: Drawing two cards from a deck without replacement.


5. Addition Rule (OR Rule)

For Mutually Exclusive Events

P(A or B) = P(A) + P(B)

For Non-Mutually Exclusive Events (General Rule)

P(A or B) = P(A) + P(B) - P(A and B)

For Three Events

P(A or B or C) = P(A) + P(B) + P(C) - P(A and B) - P(B and C) - P(A and C) + P(A and B and C)

Example

From a deck of 52 cards, one card is drawn. What is the probability of drawing a King or a Heart?

P(King) = 4/52
P(Heart) = 13/52
P(King and Heart) = 1/52    (King of Hearts)

P(King or Heart) = 4/52 + 13/52 - 1/52 = 16/52 = 4/13

6. Multiplication Rule (AND Rule)

For Independent Events

P(A and B) = P(A) x P(B)

For Dependent Events

P(A and B) = P(A) x P(B|A)

where P(B|A) is the probability of B given that A has occurred.

Extended to Multiple Events

P(A and B and C) = P(A) x P(B|A) x P(C|A and B)

For independent events:
P(A and B and C) = P(A) x P(B) x P(C)

Example

A bag has 5 red and 3 blue balls. Two balls are drawn without replacement. What is the probability that both are red?

P(1st red) = 5/8
P(2nd red | 1st red) = 4/7

P(both red) = 5/8 x 4/7 = 20/56 = 5/14

7. Independent vs Dependent Events

How to Identify

Independent:
- Events on separate experiments (separate coins, separate dice)
- Drawing WITH replacement
- Keyword: "and then independently"

Dependent:
- Events on the same experiment
- Drawing WITHOUT replacement
- The pool of items changes after the first draw

Formal Test

Events A and B are independent if and only if:

P(A and B) = P(A) x P(B)

If this equality does NOT hold, the events are dependent.

Example: Independent

Two dice are rolled. What is the probability of getting 6 on the first AND 4 on the second?

P(6 on 1st) = 1/6
P(4 on 2nd) = 1/6      (independent -- different dice)

P(both) = 1/6 x 1/6 = 1/36

Example: Dependent

A box has 4 white and 6 black balls. Two balls are drawn without replacement. What is the probability of getting 1 white and 1 black (in that order)?

P(1st white) = 4/10 = 2/5
P(2nd black | 1st white) = 6/9 = 2/3

P(white then black) = 2/5 x 2/3 = 4/15

8. Conditional Probability

Definition

The probability of event A occurring given that event B has already occurred:

P(A|B) = P(A and B) / P(B)         [P(B) != 0]

Rearranged Forms

P(A and B) = P(B) x P(A|B) = P(A) x P(B|A)

Bayes' Theorem (Introductory)

P(A|B) = [P(B|A) x P(A)] / P(B)

Example

In a class of 100 students, 40 study Mathematics, 30 study Physics, and 10 study both. If a student is known to study Mathematics, what is the probability that they also study Physics?

P(M) = 40/100 = 2/5
P(P) = 30/100 = 3/10
P(M and P) = 10/100 = 1/10

P(P|M) = P(M and P) / P(M)
       = (1/10) / (2/5)
       = (1/10) x (5/2)
       = 5/20
       = 1/4

9. Dice Problems

Single Die

Sample space: {1, 2, 3, 4, 5, 6}
Total outcomes = 6

P(even) = 3/6 = 1/2
P(odd) = 3/6 = 1/2
P(prime) = 3/6 = 1/2         {2, 3, 5}
P(>4) = 2/6 = 1/3            {5, 6}
P(multiple of 3) = 2/6 = 1/3 {3, 6}

Two Dice

Total outcomes = 6 x 6 = 36

Sum Table for Two Dice:

Sum:  2  3  4  5  6  7  8  9  10  11  12
Ways: 1  2  3  4  5  6  5  4   3   2   1

Common Probabilities:

P(sum = 7) = 6/36 = 1/6
P(sum = 2) = 1/36
P(sum = 12) = 1/36
P(doublet) = 6/36 = 1/6        {(1,1),(2,2),...,(6,6)}
P(sum >= 10) = (3+2+1)/36 = 6/36 = 1/6
P(sum < 5) = (1+2+3)/36 = 6/36 = 1/6

Three Dice

Total outcomes = 6^3 = 216

10. Card Problems

Standard Deck Composition

Total cards = 52

4 Suits:
  - Hearts (red)    : 13 cards (A,2,3,...,10,J,Q,K)
  - Diamonds (red)  : 13 cards
  - Clubs (black)   : 13 cards
  - Spades (black)  : 13 cards

Face cards (J, Q, K): 12 total (3 per suit)
Number cards (A-10): 40 total (10 per suit)
Aces: 4
Kings: 4
Queens: 4
Jacks: 4

Red cards: 26
Black cards: 26

Single Card Drawn

P(Ace) = 4/52 = 1/13
P(King) = 4/52 = 1/13
P(Face card) = 12/52 = 3/13
P(Heart) = 13/52 = 1/4
P(Red) = 26/52 = 1/2
P(Black King) = 2/52 = 1/26
P(Red Ace) = 2/52 = 1/26
P(Queen of Spades) = 1/52

Two Cards Drawn (Without Replacement)

Total ways = 52C2 = 1,326

P(both Aces) = 4C2 / 52C2 = 6/1326 = 1/221
P(both Kings) = 4C2 / 52C2 = 1/221
P(both red) = 26C2 / 52C2 = 325/1326 = 25/102
P(one red, one black) = (26C1 x 26C1) / 52C2 = 676/1326 = 26/51

Five Cards Drawn (Poker Hands)

Total 5-card hands = 52C5 = 2,598,960

Royal Flush:     4
Straight Flush:  36
Four of a Kind:  624
Full House:      3,744
Flush:           5,108
Straight:        10,200
Three of a Kind: 54,912
Two Pair:        123,552
One Pair:        1,098,240
High Card:       1,302,540

11. Coin Problems

Single Coin

S = {H, T}
P(Head) = 1/2
P(Tail) = 1/2

n Coin Tosses

Total outcomes = 2^n

P(exactly k heads in n tosses) = nCk x (1/2)^n
                                = nCk / 2^n

Common Results for n Coin Tosses

n=2: S = {HH, HT, TH, TT}  Total = 4
  P(exactly 1 head) = 2/4 = 1/2
  P(at least 1 head) = 3/4
  P(both heads) = 1/4

n=3: Total = 8
  P(exactly 2 heads) = 3C2/8 = 3/8
  P(at least 1 head) = 1 - 1/8 = 7/8
  P(all heads) = 1/8

n=4: Total = 16
  P(exactly 2 heads) = 4C2/16 = 6/16 = 3/8
  P(at least 1 head) = 1 - 1/16 = 15/16

n=5: Total = 32
  P(exactly 3 heads) = 5C3/32 = 10/32 = 5/16
  P(at least 1 head) = 1 - 1/32 = 31/32

Biased Coin

If P(Head) = p and P(Tail) = q = 1 - p, then for n tosses:

P(exactly k heads) = nCk x p^k x q^(n-k)

This is the Binomial Distribution formula.


12. Odds

Odds in Favour

Odds in favour of E = P(E) / P(E')
                    = Favourable outcomes : Unfavourable outcomes

Odds Against

Odds against E = P(E') / P(E)
               = Unfavourable outcomes : Favourable outcomes

Converting Between Odds and Probability

If odds in favour are a : b, then:

P(E) = a / (a + b)
P(E') = b / (a + b)

Example

The odds of winning a game are 3:5. What is the probability of winning?

P(winning) = 3 / (3 + 5) = 3/8

13. Expected Value (Introduction)

Definition

If an experiment has outcomes x1, x2, ..., xn with probabilities p1, p2, ..., pn, then:

E(X) = x1*p1 + x2*p2 + ... + xn*pn
     = Sum of (outcome x its probability)

Example

A game pays Rs. 10 if you roll a 6 on a die, and you lose Rs. 2 otherwise. What is the expected value?

E(X) = 10 x (1/6) + (-2) x (5/6)
     = 10/6 - 10/6
     = 0

The expected value is Rs. 0 (fair game).

14. Summary of All Key Formulas

+----------------------------------------------------+------------------------------------+
| Concept                                            | Formula                            |
+----------------------------------------------------+------------------------------------+
| Basic Probability                                  | P(E) = n(E) / n(S)                |
| Complement                                         | P(E') = 1 - P(E)                  |
| Addition (Mutually Exclusive)                      | P(A or B) = P(A) + P(B)           |
| Addition (General)                                 | P(AuB) = P(A)+P(B)-P(AnB)        |
| Multiplication (Independent)                       | P(A and B) = P(A) x P(B)          |
| Multiplication (Dependent)                         | P(A and B) = P(A) x P(B|A)        |
| Conditional Probability                            | P(A|B) = P(AnB) / P(B)            |
| Bayes' Theorem                                     | P(A|B) = P(B|A)P(A) / P(B)        |
| n coin tosses: exactly k heads                     | nCk / 2^n                         |
| Binomial (biased coin)                             | nCk x p^k x q^(n-k)              |
| Two dice: total outcomes                           | 36                                 |
| 52-card deck: choosing r cards                     | 52Cr total ways                    |
| Odds to probability (a:b in favour)                | P = a/(a+b)                        |
| Expected value                                     | E(X) = Sum(xi x pi)               |
+----------------------------------------------------+------------------------------------+

15. Important Identities and Properties

1.  0 <= P(E) <= 1
2.  P(S) = 1, P(empty) = 0
3.  P(A') = 1 - P(A)
4.  P(A or B) <= P(A) + P(B)
5.  P(A and B) <= min(P(A), P(B))
6.  If A is a subset of B, then P(A) <= P(B)
7.  P(A - B) = P(A) - P(A and B)
8.  P(A' and B') = 1 - P(A or B)           [De Morgan]
9.  P(A' or B') = 1 - P(A and B)           [De Morgan]
10. For independent events: P(A|B) = P(A)

Next: 8.15.b Tips, Tricks, and Shortcuts