Engineering Probability Class 4 Thu 2019-01-24
Table of contents::
2 Chapter 2 ctd
-
Today: counting methods, Leon-Garcia section 2.3, page 41.
- We have an urn with n balls.
- Maybe the balls are all different, maybe not.
- W/o looking, we take k balls out and look at them.
- Maybe we put each ball back after looking at it, maybe not.
- Suppose we took out one white and one green ball. Maybe we care about their order, so that's a different case from green then white, maybe not.
-
Applications:
- How many ways can we divide a class of 12 students into 2 groups of 6?
- How many ways can we pick 4 teams of 6 students from a class of 88 students (leaving 64 students behind)?
- We pick 5 cards from a deck. What's the probability that they're all the same suit?
- We're picking teams of 12 students, but now the order matters since they're playing baseball and that's the batting order.
- We have 100 widgets; 10 are bad. We pick 5 widgets. What's the probability that none are bad? Exactly 1? More than 3?
- In the approval voting scheme, you mark as many candidates as you please. The candidate with the most votes wins. How many different ways can you mark the ballot?
- In preferential voting, you mark as many candidates as you please, but rank them 1,2,3,... How many different ways can you mark the ballot?
-
Leon-Garcia 2.3: Counting methods, pp 41-46.
- finite sample space
- each outcome equally probable
- get some useful formulae
- warmup: consider a multiple choice exam where 1st answer has 3 choices,
2nd answer has 5 choices and 3rd answer has 6 choices.
- Q: How many ways can a student answer the exam?
- A: 3x5x6
- If there are k questions, and the i-th question has \(n_i\) answers then the number of possible combinations of answers is \(n_1n_2 .. n_k\)
-
2.3.1 Sampling WITH replacement and WITH ordering
- Consider an urn with n different colored balls.
- Repeat k times:
- Draw a ball.
- Write down its color.
- Put it back.
- Number of distinct ordered k-tuples = \(n^k\)
-
Example 2.1.5. How many distinct ordered pairs for 2 balls from 5? 5*5.
-
iClicker. Suppose I want to eat one of the following 4 places, for tonight and again tomorrow, and don't care if I eat at the same place both times: Commons, Sage, Union, Knotty Pine. How many choices to I have where to eat?
- 16
- 12
- 8
- 4
- something else
-
2.3.2 Sampling WITHOUT replacement and WITH ordering
- Consider an urn with n different colored balls.
- Repeat k times:
- Draw a ball.
- Write down its color.
- Don't put it back.
- Number of distinct ordered k-tuples = n(n-1)(n-2)...(n-k+1)
-
iClicker. Suppose I want to visit two of the following four cities: Buffalo, Miami, Boston, New York. I don't want to visit one city twice, and the order matters. How many choices to I have how to visit?
- 16
- 12
- 8
- 4
- something else
-
Example 2.1.6: Draw 2 balls from 5 w/o replacement.
- 5 choices for 1st ball, 4 for 2nd. 20 outcomes.
- Probability that 1st ball is larger?
- List the 20 outcomes. 10 have 1st ball larger. P=1/2.
-
Example 2.1.7: Draw 3 balls from 5 with replacement. What's the probability they're all different?
- P = \(\small \frac{\text{# cases where they're different}}{\text{# cases where I don't care}}\)
- P = \(\small \frac{\text{# case w/o replacement}}{\text{# cases w replacement}}\)
- P = \(\frac{5*4*3}{5*5*5}\)
-
2.3.3 Permutations of n distinct objects
-
Distinct means that you can tell the objects apart.
-
This is sampling w/o replacement for k=n
-
1.2.3.4...n = n!
-
It grows fast. 1!=1, 2!=2, 3!=6, 4!=24, 5!=120, 6!=720, 7!=5040
-
Stirling approx:
\begin{equation*} n! \approx \sqrt{2\pi n} \left(\frac{n}{e}\right)^n\left(1+\frac{1}{12n}+...\right) \end{equation*} -
Therefore if you ignore the last term, the relative error is about 1/(12n).
-
-
Example 2.1.8. # permutations of 3 objects. 6!
-
Example 2.1.9. 12 airplane crashes last year. Assume independent, uniform, etc, etc. What's probability of exactly one in each month?
- For each crash, let the outcome be its month.
- Number of events for all 12 crashes = \(12^{12}\)
- Number of events for 12 crashes in 12 different months = 12!
- Probability = \(12!/(12^{12}) = 0.000054\)
- Random does not mean evenly spaced.
-
2.3.4 Sampling w/o replacement and w/o ordering
-
We care what objects we pick but not the order
-
E.g., drawing a hand of cards.
-
term: Combinations of k objects selected from n. Binomial coefficient.
\begin{equation*} C^n_k = {n \choose k} = \frac{n!}{k! (n-k)!} \end{equation*} -
Permutations is when order matters.
-
-
Example 2.20. Select 2 from 5 w/o order. \(5\choose 2\)
-
Example 2.21 # permutations of k black and n-k white balls. This is choosing k from n.
-
Example 2.22. 10 of 50 items are bad. What's probability 5 of 10 selected randomly are bad?
- # ways to have 10 bad items in 50 is \(50\choose 10\)
- # ways to have exactly 5 bad is 3 ways to select 5 good from 40 times # ways to select 5 bad from 10 = \({40\choose5} {10\choose5}\)
- Probability is ratio.
-
Multinomial coefficient: Partition n items into sets of size \(k_1, k_2, ... k_j, \sum k_i=n\)
\begin{equation*} \frac{n!}{k_1! k_2! ... k_j!} \end{equation*} -
2.3.5. skip
-
More state lottery incompetence: Statistician Cracks Code For Lottery Tickets
Finding these stories is just too easy.
Reading: 2.4 Conditional probability, page 47-
3 Iclicker questions
- Retransmitting a very noisy bit 2 times: The probability of each bit
going bad is 0.4. What is probability of no error at all in the 2
transmissions?
- 0.16
- 0.4
- 0.36
- 0.48
- 0.8
- Flipping an unfair coin 2 times: The probability of each toss being heads is 0.4. What is probability of both tosses being tails?
- 0.16
- 0.4
- 0.36
- 0.48
- 0.8
- Flipping a fair coin until we get heads: How many times will it take until the probability of seeing a head is >=.8?
- 1
- 2
- 3
- 4
- 5
- This time, the coin is weighted so that p[H]=.6. How many times will it take until the probability of seeing a head is >=.8?
- 1
- 2
- 3
- 4
- 5