Set Theory Basics
The grammar of collections — union, intersection, and complement — that every probability statement and every trading filter is secretly written in.
Every time you screen a universe of stocks — "market cap over $1bn and momentum positive but not already in the portfolio" — you are doing set theory. You never call it that, but the words "and," "or," and "not" are precise operations on collections of objects, and probability theory borrows exactly this machinery to talk about outcomes. Before you can say "the probability of A or B," you need to know exactly what "A or B" is as a collection. That is what this page pins down.
The analogy: a filing cabinet of index cards
Picture a big filing cabinet holding one card for every stock in your universe. A set is simply any pile of cards you pull out and label — "large caps," "tech names," "stocks you currently own." Once you have two piles, three questions become natural: which cards are in either pile (push them together), which cards are in both piles (find the overlap), and which cards are in the whole cabinet but not in a given pile (everything left behind). Those three questions are union, intersection, and complement, and nothing more sophisticated is happening underneath the symbols.
The symbols, one at a time
Let (a capital omega) denote the universe — the whole filing cabinet, every card that could possibly come up. A set is a sub-pile of cards drawn from , and reads "the card is in pile ."
The three operations:
This is the union: every card that belongs to at least one of the two piles. In plain English, answers "large cap or tech."
This is the intersection: only the cards that belong to both piles at once — the overlap. In plain English, answers "large cap and tech."
This is the complement: everything in the cabinet that is not in pile . In plain English, answers "everything except large caps."
Two sets with no overlap at all — , the empty pile — are called disjoint. That single idea is what lets probabilities be added instead of double-counted, and it is exactly the property Kolmogorov's third axiom relies on.
Worked example 1: screening a ten-stock universe
Say your universe has ten stocks, numbered 1 through 10. Large caps are . Positive-momentum names are .
Union : list every number appearing in either set, once each: — eight stocks pass "large cap or momentum."
Intersection : numbers appearing in both lists: — three stocks are both large cap and positive momentum. Count them by hand: 3 is in A and in B, keep it; 4 is in both, keep it; 5 is in both, keep it; 1, 2, 6 are only in A, drop them; 7, 8 are only in B, drop them.
Complement : everything in not in : — the small caps.
Worked example 2: counting via inclusion-exclusion
How many stocks are in without listing them? Count : 6 stocks. Count : 5 stocks. Add them: . But stocks 3, 4, 5 got counted twice — once in each pile — so subtract the overlap once: . That matches the union counted by hand above. The rule in general is
read as "add the two pile sizes, then remove the double-counted overlap." This exact formula is why in every introductory probability course — probability is just a way of weighting each card instead of counting it as 1.
What this means in practice
A trading filter chain — liquidity screen and sector screen and not already-held — is a chain of intersections and complements applied to the universe of tradable names. A probability question like "what's the chance the market is up or volatility is down" is a union of two events, computed with exactly the inclusion-exclusion rule above. Set notation is the plumbing every later probability concept sits on top of.
A set is just a labelled pile of objects out of a universe . Union combines piles ("or"), intersection keeps only the overlap ("and"), complement takes everything left over ("not"). Inclusion-exclusion, , exists purely to undo double-counting the overlap.
The everyday word "or" is ambiguous — it can mean "one or the other, not both" (exclusive) — but set-theoretic union is always inclusive: an element in both and still counts, just once. Forgetting this is the single most common source of double- or under-counting in probability homework: adding without subtracting silently double-counts every card that sits in both piles.
Related concepts
Practice in interviews
Further reading
- Halmos, Naive Set Theory (ch. 1-4)
- Billingsley, Probability and Measure (ch. 1)