Monday, April 9, 2012

04-09-2012

Lotto example continued

5 random numbers: 56, 55, 54, 53, 52 and a mega number: 46

So, 56 * 55 * 54 * 53 * 52 = 458377920
458377920 * 46 = 2.108538432 * 1010

But the actual probability is: 175711536
How do we get this number? We eliminate the duplicate counts.
How do we eliminate the duplicates? We first need to determine if it's a permutation or a combination.

Combination (nCr): n! / [r! (n-r)!]
  • r items chosen from n distinct items
  • No repetition allowed
  • Order is not important

Permutation (nPr): n! / (n-r)!
  • r items permuted from n distinct items 
  • No repetition allowed 
  • Order is important
Video lecture on Permutations and Combinations

Factorial:
0! = 1
1! = 1
2! = 2 * 1
5! = 5 * 4 * 3 * 2 * 1
9! = 9 * 8 * 7 * 6 * 5 *4 * 3 * 2 * 1

Video lecture on Factorials

As you may have determined, the lotto is a combination because the order of the numbers is not important.
Applying the combination formula: nCr -> 56C5, meaning 56 items to chose from 5 distinct times.
Plugging into the combination formula: 56! / [5! (56-5)!]
56! / [5! (51)!]
(56 * 55 * 54 *53 * 52 *51!) / 5! (51!)
simplifying: (56 * 55 * 54 *53 * 52) / 5!
rewriting: (56 * 55 * 54 *53 * 52) / (5 * 4 * 3 * 2 * 1)
multiplying: 458377920 / 120
simplifying: 3819816
Interpretation: 3819816 distinct number combinations can be created by choosing 5 random numbers between 1 and 56

Now for the mega number: 46C1
46! / [1! (46-1)!]
46! / 45!
(46 * 45!) / 45!
46

46 * 3819816 = 175711536
Probability of winning the lotto with 1 entry? 1 / 175711536 = 5.69x10-9 or 0.0000000056911. Making that a percentile: 0.0000000056911*100 =  0.00000056911% chance of winning.


Brandon's Snack Example p.247
5 carrots sticks, 4 celery sticks, 2 cherry tomatoes. How many different ways can Brandon arrange his snack?
Is order important? Yes, therefore it's a permutation.
n! (total number of items) / (n1! n2! n3! (factorial of each category))

11! / (5! 4! 2!)
(11 * 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1) / [(5 * 4 * 3 * 2 * 1)(4 * 3 * 2 * 1) (2 * 1)]
Simplifying:  (11 * 10 * 9 * 8 * 7 * 6) / [(4 * 3 * 2 * 1) (2 * 1)]
Multiplying: 332640 / 48
Simplifying: 6930
6930 different ways exist for Brandon to arrange his snack, that's enough to keep him busy for nearly 19 years. 


Student Project example
35 students in the class being paired in groups of two. How many pairs exist?

First, does order matter? No, therefore it's a combination.

35C2
35! / (2! (35-2)!)
(35 * 34 * 33!) / (2! (33!))
35 * 34 / 2!
35 * 34 / 2
1190/2 = 595
595 combinations of students.

5.2) Combining Events

Union (∪) - "or" -  The set of elements that is in the first set “or” the second set
Intersection (∩) - "and" - The set of elements that are in the first set “and” the second set.
Video lecture on Unions and Intersections
Video lecture on Unions and Intersections with Venn Diagrams (helps visualize the concept)

Addition rule - For "or" situations

p(A∪B) = p(A) + p(B) - p(A∩B)
Note: the subtraction of p(A∩B) removes the intersection so elements are not counted twice.

Cards example
Probability of pulling an ace [p(A)]? 4/52 (0.0769)
Probability of pulling a heart [p(H)]? 13/52 (0.25)
Probability of pulling an ace AND a heart [p(A∩H)]? 1/52 (0.0192)
Probability of pulling an ace OR a heart [p(A∪H)]? (4/52) + (13/52) - (1/52) = 16/52 (.307)

Gender and self-reported physical appearance (example 5.13 on p. 220)
Probability of female [p(f)] = 28865 / 52877 or 0.5465
Probability of self report "attractive" [p("attractive")] = 28635 / 52877 or 0.542
Probability of female AND self reporting "attractive" [p(f∩"attractive" )] = 16181 / 52877 or 0.306
Probability of female OR self reporting "attractive" [p(f∪"attractive" )] = (28865 / 52877) + (28635 / 52877) - (16181 / 52877) = 0.72033


Conditional Probabilities - What if you already know something? Suppose you passed the prerequisite for this class with an A, does that mean you will pass this class with an A?

Probability (B) given Probability(A) already occurred can be written: p(B|A).
How do you find p(B|A)? p(B|A) = [p (A∩B)] / p(A)

Probability of responding to a direct mail marketing campaign example 5.16
p(responded) = 48 / 288 = .167
p(responded | credit card on file) = [p(responded ∩ credit card on file] / p(credit card on file) = 31/110 = 0.282

2 comments:

  1. Your Post explains probability very well and I want to add further explanation in it that Probability is the measure of how frequently an event occurs.
    P(A) = The Number Of Ways Event A Can Occur / The total number Of Possible Outcomes
    and if you want to do more practice then you can go for Probability Worksheets available on the Internet.

    ReplyDelete
    Replies
    1. Thank you for your input and the link to said worksheets, much appreciated.

      Delete