Counting and Probability of Events

STAT 360 - Lecture 4

What we will cover today:

  • Multiplication Rule (2.3)
  • Permutations (2.3)
  • Combinations (2.3)
  • Review Probability of an Event (2.4)

Multiplication Rule

We use the multiplication rule whenever we have multiple "moving parts" but they combine to form one outcome.

For example, you are going to a party and have narrowed down your clothing to 4 shirts, 3 pants, 2 pairs of shoes, and 2 hats. You can only wear one of each to the party. How many different ensembles can you create?

Multiplication Rule

Let's see...
  1. With the fedora:
    1. you can wear any of the shirts, say you pick the black one. With the black shirt...
    2. pants, say you pick the green one. With the green one...
    3. and pairs of shoes, say you pick your cool boots. With the boots...
  2. With the bonnet, you can wear any of the shirts, pants and pairs of shoes

You get the gist.

Multiplication Rule
If an operation can be performed in $n_1$ ways, and if for each of these a second operation can be performed in $n_2$ ways, and for each of the first two a third operation can be performed in $n_3$ ways, and so forth, then the sequence of $k$ operations can be performed in $n_1n_2 \dots n_k$ ways.

Permutations

We care about permutations when we are concerned about the order of our sample or subsample.

For example, that T/F quantum physics quiz I gave you yesterday in which you completely guessed the answers to four distinct questions.

We figured out via the multiplication rule that there were 16 different ways to guess...that is

16 different permutations of 4 T's and F's.

Permutations

Picture yourself holding an urn containing two marbles: a green and a red.

  • It is random-guesses quiz time. Instructions: for each question draw a marble from your bag.
  • If it is green, answer T for that question. If it is red, answer F for that question.
  • Put the marble back in the bag, move on to the next question.
  • Since you always replace the marble, each question can have one of two answers!

Permutations

As a teacher though I had a different problem when I was making your quiz..."do I pick the entanglement question to be the first or the last? what about the particle spin question?!"

  1. It is random-making quiz time. Instructions: Place 4 labeled marbles $\{a, b, c, d\}$ in a bag.
  2. Draw one out - say it is $c$, this will be the first question. Don't replace it, a quiz with repeat questions is boring!
  1. Now there are 3 marbles in the bag, draw one - say it is $a$, this will be the second question. Don't replace it!
  2. Now there are 2 marbles in the bag, draw one...
  3. Now there is 1 marble in the bag, draw it. Done, we have a quiz ordering, say - $cadb$.
  1. That is, I had 4 choices for the first questions, 3 for the second, 2 for the third and 1 for the fourth by sampling distinct objects without replacement.
  2. Factorial definition: $n! = n(n-1)(n-2)...(2)(1)$ with $0! = 1$

How many passwords of length 5 can you make using the letters of the alphabet, if:

  • each letter must be unique?
  • each letter can be repeated?

Permutations

Another idea we should be aware of when dealing with permutations is non uniqueness, such as permuting the letters of the word "statistics".

This is a different case then the previous ones, since if we were to put labeled marbles in a bag, there would be one for $s_1$, one for $s_2$, one for $s_3$, ... that is, the bag would have all the repeats as if they were distinct.

However, when we draw a marble labeled $s_2$, we smudge out the subscript and treat it like an indistinguishable $s$.

That is, the anagram $s_1s_3s_2t_3a_1c_1i_2t_1i_1t_2$ is indistinguishable from the anagram $s_3s_1s_2t_2a_1c_1i_1t_1i_2t_3$.

Both spell out "ssstacitit".

Any ideas how we would count all the permutations for anagrams of the word "statistics"?

Idea:

  1. Treat all letters as unique: $s_1 \neq s_2 \neq s_3$ and so on for the others. That is, think of statistics having 10 unique letters and solve the old problem of counting all the permutations: 10!
  2. Counted by those 10! permutations are the permutations of the $s$ letters amongst each other, 3! of them. However we don't care about the order of the $s$'s in the anagram. So we undo the counting of permuted $s$'s by dividing: 10!/3!
  1. Do this for all repeated letters and get the following count: $$\frac{10!}{3!3!2!}$$

In general:

Circles

Circular arragements are special:

If you want to arrange $n$ objects in a circle, then there are $(n-1)!$ ways to do it. This is because you can rotate the circle $n$ times and it is still the same circle.

Combinations

Combinations are like permutations when order does not matter. The question it answers is: "In how many ways can I make a subset of the elements of a given set?"

It is like you have a bag with $n$ marbles and you want to draw $r$ of them to put in another bag.

$${n \choose r} = \frac{n!}{r!(n-r)!}$$

Let's try some problems: 2.38, 2.45

Probability of an Event

Informally, the probability of an event is a number between 0 and 1 such that:

  • If the number is close to 0, then the event is not likely;
  • If the number is close to 1, then the event is very likely;

Question: Discuss examples of events that have $P=0$ (practically impossible) and events that have $P=1$ (definitely will happen as far as we can understand reality).

Relative Frequencies

We assign the probability number via the ratio between the number of ways the event can happen and the total size of the sample space.

That is, let $A$ be the event we are interested in (say drawing a Jack, a Queen and a King from a deck of 52 shuffled cards) and let $S$ denote the sample space (all possible shufflings of 52 cards), then:

$$P(A) = \frac{n(A)}{n(S)}$$ - where $P(.)$ denotes "the probability of" and $n(.)$ denotes "number of points in the set."

Question: What is the probability of drawing a Jack, a Queen and a King from any suit (order does not matter) from a shuffled deck of 52 cards?

Formally we have: