Counting Methods

Week 2

Maghfira Ramadhani

Aug 27, 2025

Plan

In today’s class we will:

  1. Review some content from week 1
  2. Learn some counting methods:
    1. Product and sum rule
    2. Permutations and combinations
    3. Binomial and multinomial coefficients
  3. Application Exercise (Form a group of 3/4)

Textbook Reference: SDG Chapter 1.7-1.9; JA Chapter 4

Week 1: Independence

Events A and B are independent, if and only if \[P(A \cap B)=P(A)\times P(B).\]

Are vaccine hesitancy and Indian ethnicity independent in our cohort?

Etchnicity Vaccine Hesitant Not Hesitant
White British or Irish 1362 7368
Other white background 71 199
Mixed 55 115
Asian or Asian British - Indian 37 143
Asian or Asian British - Pakistani/Bangladeshi 85 115
Asian or Asian British - other 15 95
Black or Black British 136 54
Other Ethnic Group or Not Specified 31 119

Bayes’ Theorem and Baseline Prevalence

Most people who have a negative test result (e.g., mammogram looks good or COVID test negative) don’t worry any longer about whether they really do have disease. Are they right not to worry? Suppose our 40 year old woman with a baseline 1% breast cancer risk instead had a negative (all clear) mammogram. What is the updated probability she has breast cancer given this test result?

We know :

  • Baseline probability of cancer \(P(A)=0.01\) (prevalence)

  • Bayes’ Theorem: \(P(A \mid B)=\frac{P(B \mid A)P(A)}{P(B)}\).

  • Sensitivity is \(P(B \mid A)=0.85\), Specificity is \(P(B^c \mid A^c)=0.90\)

Counting Methods

Product Rule

Product Rule If there are \(m\) choices for the first action and \(n\) choices for the second actions, the number of possible choices for both actions is \(m\times n\).

Sum Rule

Sum Rule If there are \(m\) choices for the first action, \(n\) choices for the second actions, and only one of the actions can be taken, the number of possible choices is \(m+n\).

Permutations

Number of Permutations (ordered subset) The number of permutations of size \(k\) that can be formed from \(n\) objects (\(k\leq n\)) is \[P_{n,k}=\frac{n!}{(n-k)!}\]

Combinations

Number of Combinations (unordered subset) The number of combinations of size \(k\) that can be formed from \(n\) objects (\(k\leq n\)) is \[\begin{pmatrix}n\\k\end{pmatrix}=\frac{P_{n,k}}{k!}=\frac{n!}{(n-k)!}\]

Binomial Coefficients

The number \(\begin{pmatrix}n\\k\end{pmatrix}\) is also called binomial coefficient.

Originated from Binomial Theorem: For all number \(x\) and \(y\) and each positive integer \(n\), \[(x+y)^n=\sum_{k=0}^n\begin{pmatrix}n\\k\end{pmatrix}x^k y^{n-k}.\]

Note that binomial coefficient have symmetric relation such that \[\begin{pmatrix}n\\0\end{pmatrix}=\begin{pmatrix}n\\n\end{pmatrix}=1\quad \text{and}\quad \begin{pmatrix}n\\k\end{pmatrix}=\begin{pmatrix}n\\n-k\end{pmatrix}\]

Multinomial Coefficients

The number of ways that \(n\) objects can be split into \(m\geq 2\) different subsets of size \(k_1,k_2,\ldots,k_m\), where \(k_1+k_2+\ldots+k_m=n\), is \[\begin{pmatrix}n\\k_1,k_2,\ldots,k_m\end{pmatrix}=\frac{n!}{k_1!k_2!\cdots k_m!}.\] As you may have guessed, this is called multinomial coefficient.

Originated from Multinomial Theorem: For all number \(x_1,\ldots,x_k\) and each positive integer \(n\), \[(x_1+\cdots+x_m)^n=\sum_{j\in\mathcal{J}}\begin{pmatrix}n\\k_1,k_2,\ldots,k_m\end{pmatrix}x_1^{k_1}x_2^{k_2}\cdots x_k^{k_1}.\] where \(\mathcal{J}\) is all possible combination of \(k_1,k_2,\ldots,k_m\) such that \(k_1+k_2+\ldots+k_m=n\).

Application Exercise 1

  1. Suppose that on any given weekday, 70% of college students eat breakfast, 60% do homework, and 85% do at least one of these two things.
    1. Are the events “Student eats breakfast” and “Student does homework” independent?
    2. If a randomly selected student eats breakfast, what is the probability that they do homework?
    3. Suppose that two students are selected at random and their behaviors are independent of each other. What is the probability that exactly one of the two students does homework?
    4. Suppose that 80% of students who eat breakfast on a given day also eat lunch that day, while 90% of students who don’t eat breakfast on a given day eat lunch that day. For a student who eats lunch on a given day, what is the probability that she or he eats breakfast on that day?

Application Exercise 2

  1. A company visits a college campus to interview students. The company has seven economics majors, six finance majors,and five accounting majors from which to choose. Unfortunately, the company has lost everyone’s résumés, so they randomly pick three students to interview.
    1. What is the probability that all three interviewees are economics students?
    2. What is the probability that all three interviewees are from the same major?
    3. What is the probability that the set of three interviewees has either no economics students, or no Finance students?
    4. What is the probability that at least one of the majors has no students interviewed?

Application Exercise 3

  1. An office manager needs to assign offices to nine employees. There are three offices available: office A, which holds two workers; office B, which holds three workers; and office C, which holds four workers.
    1. How many possible office assignments of the employees are there?
    2. McKenna is one of the nine workers. If assignments are made at random, what is the probability that McKenna gets assigned to office C?
    3. If assignments are made at random, what is the probability that McKenna is in the same office as her coworker Daniel?
    4. If assignments are made at random, what is the probability that McKenna is in the same office as her coworkers Daniel and Alma?

End of Lecture