Uniform distribution


A uniform distribution is a probability distribution where all outcomes have equal probability.

A probability distribution \(p\) over a countable sample space \(S\) is uniform if and only if for every outcome \(s \in S\): $$p(s) = \frac{1}{|S|}$$ As a consequence, for every event \(E \subseteq S\): $$p(E) = \frac{|E|}{|S|}$$

Uniform distributions tend to appear in experiments involving "fair" objects, like coins and dice, where all outcomes are equally likely.

Because \(p(E) = \frac{|E|}{|S|}\) for uniform distributions, questions about the probability of an event \(E\) can be answered by just counting the number of elements in \(E\) and \(S\), and dividing. Now, let's bring back an experiment from before to demonstrate this.

The event that the numbers you get from rolling \(2\) fair dice add up to \(4\) is \(\set{(1, 3), (2, 2), (3, 1)}\), which consists of \(3\) outcomes. There are \(6 \times 6 = 36\) different outcomes in total for this experiment. Since the \(2\) dice are fair, there is an underlying uniform distribution. Therefore, the probability of the dice summing to \(4\) is just \(\frac{3}{36}.\)

This next example is a bit trickier because it involves combinations. Suppose, in a room of \(20\) people, there is a group of \(4\) friends. \(7\) people are chosen at random to be a team. What are the chances that all \(4\) friends are included within the team? Well, we know there are \(\binom{20}{7}\) ways of picking a subset of \(7\) from a set of \(20.\) Alright, that's easy. The more challenging part is recognizing that in any team of \(7\) where all \(4\) friends are included, there are \(\binom{16}{3}\) ways to pick the remaining \(3\) members, so the number of ways that the team can include all \(4\) friends is \(\binom{16}{3}.\) Since each person is equally likely to be chosen for the team, this is a uniform distribution, and the probability we're looking for is exactly \(\frac{\binom{16}{3}}{\binom{20}{7}} \approx 0.00722394...\), so it's really unlikely that all these friends will be in the team at once.

Let's bring back a question about combinations and remix it into a question about probability. Once again, imagine you're on the coordinate plane at \((0, 0)\) and want to reach the point \((7, 3)\), but you can only move right or up exactly \(1\) unit at a time, which is considered a step. If you pick a path (a sequence of steps) from \((0, 0)\) to \((7, 3)\) at random, what are the chances that you cross the point \((2, 2)\)? Previously, the number of distinct paths from \((0, 0)\) to \((7, 3)\) was shown to be \(\binom{10}{7}.\) Since this is a uniform distribution, all that we need to count now is the number of distinct paths that cross \((2, 2).\) This is sort of weird, but there's actually a really nice way to break down this problem that is not obvious. It's the number of distinct paths from \((0, 0)\) to \((2, 2)\) multiplied by the number of distinct paths from \((2, 2)\) to \((7, 3)\), because for every way of reaching \((2, 2)\) from \((0, 0)\), you need to consider each way of then reaching \((7, 3).\) Using the formulas we established last time, there are \(\binom{4}{2} \times \binom{6}{5}\) distinct paths that cross \((2, 2).\) The resulting probability of randomly picking such a path is \(\frac{\binom{4}{2} \times \binom{6}{5}}{\binom{10}{7}} = 0.3.\)

Up for a challenge? Read on. If you draw \(5\) cards from a standard deck, how likely is it to be a two pair hand? A two pair hand consists of \(2\) cards of one rank, \(2\) cards of another rank, and \(1\) card with a third, different rank. Determining that there are \(\binom{52}{5}\) possible \(5\)-card hands is easy. What's difficult here is counting the number of two pair hands that exist. Let's walk through what it takes to fully specify a two pair hand. Every two pair hand is uniquely identifiable by the \(2\) ranks chosen for the pairs (it does not matter which pair's rank is chosen first), the rank chosen for the unpaired card, the suits chosen in the first pair, the suits chosen in the second pair, and finally, the suit chosen for the unpaired card. By counting the number of choices at each step, we find that there are exactly \(\binom{13}{2} \times \binom{11}{1} \times \binom{4}{2} \times \binom{4}{2} \times \binom{4}{1}\) two pair hands. The probability is then \(\frac{\binom{13}{2} \times \binom{11}{1} \times \binom{4}{2} \times \binom{4}{2} \times \binom{4}{1}}{\binom{52}{5}} \approx 0.04753901.\)

Logic & Proofs
IntegerRational numberInequalityReal numberTheoremProofStatementProof by exhaustionUniversal generalizationCounterexampleExistence proofExistential instantiationAxiomLogicTruthPropositionCompound propositionLogical operationLogical equivalenceTautologyContradictionLogic lawPredicateDomainQuantifierArgumentRule of inferenceLogical proofDirect proofProof by contrapositiveIrrational numberProof by contradictionProof by casesSummationDisjunctive normal form
Set Theory
SetElementEmpty setUniversal setSubsetPower setCartesian productStringBinary stringEmpty stringSet operationSet identitySet proof
Functions
FunctionFloor functionCeiling functionInverse function
Algorithms
AlgorithmPseudocodeCommandAsymptotic notationTime complexityAtomic operationBrute-force algorithm
Relations
RelationReflexive relationSymmetric relationTransitive relationRelation compositionEquivalence relationEquivalence class
Number Theory
Integer divisionLinear combinationDivision algorithmModular arithmeticPrime factorizationGreatest common divisorLeast common multiplePrimality testFactoring algorithmEuclid's theoremPrime number theoremEuclidean algorithm
Induction
Proof by inductionFibonacci sequenceProof by strong inductionWell-ordering principleSequenceFactorialRecursive definition
Combinatorics
Rule of productRule of sumBijection rulePermutationCombinationComplement ruleExperimentOutcomeSample spaceEventProbabilityProbability distributionUniform distributionMultisetSixfold wayInclusion-exclusion principlePigeonhole principle
Graph Theory
GraphWalkSubgraphRegular graphComplete graphEmpty graphCycle graphHypercube graphBipartite graphComponentEulerian circuitEulerian trailHamiltonian cycleHamiltonian pathTreeHuffman treeSubstringForestPath graphStarSpanning treeWeighted graphMinimum spanning treeGreedy algorithmPrim's algorithm
Recursion
RecursionRecursive algorithmCorrectness proofDivide-and-conquer algorithmSorting algorithmMerge sort