0. Info
- Section date: 9/13
- Associated lectures: 9/5, 9/7
- Associated pset: Pset 1, due 9/15
- Where to find me
- Section: Wednesdays 3-4:15pm, see section info on Canvas for location.
- Section will always cover content for the pset due on Friday (in two days)
- Specifically, this means we’ll focus on the lectures from the previous week (six and eight days previous), and not the lecture from the day before section
- Office Hours: Wednesdays 7-9pm, see office hours info on Canvas/Google Calendar for location. I will often stay for the office hours that come right after (Wednesday 9-11pm), and occasionally may drop by at the Thursday 7:30-9:30pm office hours in the same location as well.
- Section: Wednesdays 3-4:15pm, see section info on Canvas for location.
- Syllabus clarifications
- Problem Sets: due Fridays at 5pm. They will cover content up to the previous week (e.g., up to the lecture 8 days before the due date).
- Attendance: If your grade ends up being slightly below a grade cutoff, attendance in lecture in section may boost you over. Attendance (or lack thereof) will not be used to penalize.
- Me: Srihari Ganesh (senior)
- Concentrating in Chemical & Physical Biology and Math w/ a master’s in Stat
- Doing computational biology research in diffusion models for protein structure generation
- Love teaching Stat + playing IM sports on the side
- Happy to chat about everything though I’m not an expert on anything
1. Set Theory
A set is an unordered collection of unique items. For example,
- Sets are unordered, so
. - Sets contain unique elemnts, so
is NOT a set. - Sets are a collection of any type of item, so
, , and ❤️, 👨🏫, ⏳ are all sets.
1.1 Definitions
is a subset of (notated or ) if every element of is also an element of .The empty set (notated
) is the set with no elements, .The union (notated
) is the set of all elements that are in or (or both).The intersection (notated
) is the set of all elements that are in both and . and are disjoint if and share no elements (notated )- A collection of sets
are disjoint if no pair of sets shares any elements ( for all )
- A collection of sets
A collection of sets
are a partition of if are disjoint, and .
Intuitively,
are (non-overlapping) puzzle pieces that form the the puzzle, , when put together.The complement of a set
(notated ) is the set of all elements not in- Complements have to be taken relative to some superset
(notated ). We think of this set as the “universe” that lives in, and is usually implied by context. - ex. Let
. Then . - Note that
and partition .
- Complements have to be taken relative to some superset
The difference between two sets
is the set of all elements in which are not in .- Note that
, partition . - An equivalent notation is
.
- Note that
The cardinality of a set, |A|, indicates the size of the set. For finite sets, it is the number of elements in the set.
We notate set membership in the following way: letting
,- “
is in ” is notated . - “
is not in ” is notated .
- “
1.2 Verbal Understanding
We want to think about basic set operations in words.
reads as “ is in ”.- We tend to work with sets by thinking about whether some variable or number is in the (e.g., whether or not
) instead of just looking at the set written out like .
- We tend to work with sets by thinking about whether some variable or number is in the (e.g., whether or not
reads as “ or ”. So we can say intuitively reads as “ is in or is in ”.- Be careful to note that we are using the inclusive or, so
means , , or both.
- Be careful to note that we are using the inclusive or, so
reads as “ and ”. So reads as “ is in and is in ”. reads as “not ”, so reads as “ is not in ”
We can apply this so see that the two versions of the set difference are equivalent.
What if we have multiple operations in the same expression?
reads as “ is not in both and ”. This means that either is not in or is not in , so . read as “ is not in or ”. This means that is not in and is not in , so . We see in the next section that these statements are essentially DeMorgan’s laws.
1.3 DeMorgan’s Laws
By talking through the expressions, you should eventually be able to convince yourself that the laws are true.
These videos also walk through the process visually:
2. Counting
2.0 Some useful problem-solving strategies (lifted from 9/5 lecture)
- Try simple/extreme cases (i.e., set
to be a small number and brute-force)- For each tool below, we’ll motivate it with an example. You can click the drop-down to view the example.
- Give objects of interest names or ID numbers
- Draw a diagram
- Make a story
2.1 Multiplication Rule
How many different combinations can you make?
Click for example
If an ice cream parlor has
This example exhibits all of the above problem-solving strategies. We took the general multiplication rule (see general statement below) and, made a story about an ice cream parlor, and set

General statement: Say the outcome of a full experiment is given by the outcomes of two-subexperiments,
- Note here that this will work as long as the outcome of
doesn’t change the number of possible outcomes of , even if changes which outcomes are possible for .
2.2 Factorial
How many ways can you order
Click for example
How many ways can
General statement: We use the factorial,
2.3 Permutations
How many ways can you choose an ordered collection of
Click for example
I want to take a
Be careful with off-by-one errors when you’re listing consecutive integers.
For a list of
For example, the list “
How many ways can you order a set of
Click for example
How many anagrams (orderings/permutations) are there of the word “BANANA”? In other words, how many
If we treated the letters as distinct, there would be
“BANANA”, “BANANA”, “BANANA”, “BANANA”, “BANANA”, and “BANANA”
are all counted as different words. This means there we are overcounting the orderings of the 3 A’s by
Similarly, we are overcounting the orderings of the 2 N’s by
General statement: say we have
2.4 Binomial Coefficient
How many ways can you choose an unordered group of
In order words, if a set has
Click for example
From my
I can use the multiplication rule, so I have
General statement: Using our previous permutation result, we can first pick
Since we don’t care about the order, we can then correct our overcounting by dividing by
2.5 Counting Subsets
How many ways can you select an unordered group of items (of any size, including
Alternatively worded, given a set of size
The first item of the set is either in the the group or not, so there are 2 possibilities. This applies for each item in the set — it is either in the group or not. We can apply the multiplication rule to get the that the number of possible groups is
2.6 Bose-Einstein
How many ways can you choose an unordered group of
Click for example
At a donut shop with
Let’s start with smaller values of
For larger
Note that we need
Another way to think about this is that we have
I encourage you to check out the example above for much of the derivation of the Bose-Einstein counting method.
General statement: We are trying to split the
Note: Bose-Einstein is a bit of a “big hammer” — it can solve some pretty complicated problems, but also some simpler ones. You should make sure you have exhausted your other tools, and that your problem matches the “unordered, with replacement” requirement before trying this out.
3. Definitions of Probability
- The sample space
is the set of all possible outcomes of an experiment (i.e., each element of is a unique outcome).- After an experiment is completed, exactly one of the outcomes will have occurred.
- An event
is any subset of ( ) - anything that we could say either “happened” or “didn’t happen” once the experiment takes place. We calculate the probabilities of events (e.g., the probability that an event happens).- After an experiment is completed, every event will have
- “Happened” or “happened” if it contains the outcome which actually occurred.
- “Not happened” or “not occurred” if it does not contain the outcome which actually occured.
- After an experiment is completed, every event will have
3.1 Naive Definition of Probability
Click for example
When rolling a standard die, the sample space is typically denoted by
Possible events could be rolling a
For a fair die, you might intuitively know that the probability of
We assume that there are a finite number of outcomes (the sample space,
Limitations:
- Assumes that all outcomes are equally likely
- Shaky definition of what “equally likely” means because we can arbitrarily construct the outcomes.
- ex. Say the weather tomorrow has two possible outcomes:
. By the naive definition, there’s a chance of no precipitation.
Alternatively, I could have said the possible outcomes are . Then there’s only a chance of no precipitation… so which is it?
- Assumes the sample space is finite
- What if the sample space is of possible temperatures? There are infinitely many possible temperatures, they can’t each have a
probability.
- What if the sample space is of possible temperatures? There are infinitely many possible temperatures, they can’t each have a
3.2 General Definition of Probability
Definition of probability:
There are just two axioms (rules that probabilities have to follow):
- If events
are disjoint, then
In other words, if
3.2.1 Probability of Complements
Let’s say we know the probability of some event
3.2.2 Principle of Inclusion-Exclusion (PIE)/Probability of unions
Say we have two events (not necessarily disjoint)
This extends to finding the probability of the union of any
We are a bit careless with notation in the sums:
PIE is another tool that is a big hammer: it will always work if you’re finding the probability of a union (the probability that at least one event occurs), but it is unwieldy for most problems and should be one of your last resorts.
4. Summary
4.1 Set Theory
- Sets: unordered collections of items
- Important set operations: intersection, union, complement, difference, cardinality
- Important properties: set membership, subsets, disjoint sets, partitions
- Theorems: DeMorgan’s laws
4.2 Counting
All of our counting is driven by the multiplication rule. Here’s what we’ve built from that, working from a set of
select how many items? | ordered or unordered? | with or without replacement? | solution |
---|---|---|---|
take all | order the items, | without replacement | n! |
select | ordered, | without replacement | |
select | unordered, | without replacment | |
select any number of items, | unordered, | without replacement | |
select | unordered, | with replacement | |
select | ordered, | with replacement |
You may also have seen this sampling table (below) in lecture (for counting the numbers of ways to draw a sample of
Order matters | Order doesn’t matter | |
---|---|---|
With replacement | ||
Without replacement |
We also talked about the permutation problem with
4.3 Definitions of Probability
Naive probability: probably the most intuitive (and yet very flawed) way to define probability: the probability is proportional to the number of outcomes. For example, there are 3 ways to roll an even number on a die, so by this definition, there is a
(Non-naive) probability: given by two axioms:
for disjoint.
The principle of inclusion-exclusion and the probability of complements follow from the axioms.
5. Practice Problems
Practice Problem Solutions PDF
I am interested in five subjects (statistics, math, computer science, chemistry, and biology) and am deciding between 100, 102, 110, and 111 in each department (e.g., my options are Stat 100, Stat 102, Stat 110, Stat 111, Math 100, Math 102, etc.). Assume unless stated otherwise that each class (or set of classes) is equally likely to be chosen if possible.
- How many different schedules of four courses can I take?
- I want to send my friend a text of my 4-class schedule. My text will look be a list like “Chemistry 101, Stat 110, Biology 111, Math 101”, which is considered a different text from “Stat 110, Chemistry 101, Biology 111, Math 101”. How many different such texts could I send?
- If I take 5 courses, what is the probability that I take exactly 1 course from each department?
- My advisor wants to know that I have backup plans, so they ask me to send 2 schedules with 4 courses each, where the schedules can have no overlap. How many such sets of two schedules can I send my advisor?
- After I finalize my schedule, my advisor now wants to know how many classes I’m taking in each subject, so I send them a list that follows the following format of the following example (with the subjects always in this order):
[Statistics: 2, Math: 0, Computer Science: 1, Chemistry: 1, Biology: 1]
How many such lists can I send for a 4-class schedule? - If I take 6 courses, what is the probability that there’s at least 1 subject in which I am not taking any courses? Solve this problem in two ways.
(Problem statement taken from Rachel Li and Ginnie Ma’s notes) Hockey Stick Identity: show using a story proof that
Hint: Imagine arranging a group of people by age, and then think about the oldest person in a chosen subgroup.Use problem 1.4 to construct a story proof for the following identity (assuming
). Recall that in problem 1.4, my advisor asked me to make 2 (non-overlapping) schedules with 4 courses each.
5.1 Extra practice problems (if you have time during section)
Taken from the section materials of Rachel Li and Ginnie Ma (‘23)
(Lattice Walks) You start at the origin of a grid. Assuming you can only move up or to the right one unit at a time, how many different paths exist between you and position
? Next, assume you are in a 3D-space. How many different paths exist between you and position ? Last, say your motions are defined by a 2-dimensional random walk: where you either walk right or up one unit with equal probability. After 20 steps, what is the probability that you are at position ?(Coin Toss Gambling, Question Credit: Zhou, 2008) Two gamblers are playing a coin toss game. Gambler A has
fair coins. Gambler B has fair coins. What is the probability that A will have more heads than B if they all flip their coins?
Hint: What are the possible results (events) if we compare the number of heads in A’s first coins with B’s coins? By making the number of coins equal, we can take advantage of symmetry. For each event, what will happen if A’s last coin is a head? Or Tails?(Teenager Steps) A teenage boy recently went through his first growth spurt, and can now walk up stairs one or two stairs at a time. How many different ways are there for him to ascend to the top of a staircase with
stairs?
Hint: start with small . The solution should look familiar!