# Classical probability #

The classical formulation of probability states that the probability of an event occurring in a finite probability space is the ratio of that event to all possible events. This notion can be expressed with measure theory using the counting measure. In particular, given the sets s and t, we define the probability of t occurring in s to be |s|⁻¹ * |s ∩ t|. With this definition, we recover the probability over the entire sample space when s = Set.univ.

Classical probability is often used in combinatorics and we prove some useful lemmas in this file for that purpose.

## Main definition #

• ProbabilityTheory.condCount: given a set s, condCount s is the counting measure conditioned on s. This is a probability measure when s is finite and nonempty.

## Notes #

The original aim of this file is to provide a measure theoretic method of describing the probability an element of a set s satisfies some predicate P. Our current formulation still allow us to describe this by abusing the definitional equality of sets and predicates by simply writing condCount s P. We should avoid this however as none of the lemmas are written for predicates.

def ProbabilityTheory.condCount {Ω : Type u_1} [] (s : Set Ω) :

Given a set s, condCount s is the counting measure conditioned on s. In particular, condCount s t is the proportion of s that is contained in t.

This is a probability measure when s is finite and nonempty and is given by ProbabilityTheory.condCount_isProbabilityMeasure.

Equations
Instances For
@[simp]
theorem ProbabilityTheory.condCount_empty {Ω : Type u_1} [] {s : Set Ω} :
theorem ProbabilityTheory.finite_of_condCount_ne_zero {Ω : Type u_1} [] {s : Set Ω} {t : Set Ω} (h : 0) :
s.Finite
theorem ProbabilityTheory.condCount_univ {Ω : Type u_1} [] [] {s : Set Ω} :
(ProbabilityTheory.condCount Set.univ) s = MeasureTheory.Measure.count s / ()
theorem ProbabilityTheory.condCount_isProbabilityMeasure {Ω : Type u_1} [] {s : Set Ω} (hs : s.Finite) (hs' : s.Nonempty) :
theorem ProbabilityTheory.condCount_singleton {Ω : Type u_1} [] (ω : Ω) (t : Set Ω) [Decidable (ω t)] :
t = if ω t then 1 else 0
theorem ProbabilityTheory.condCount_inter_self {Ω : Type u_1} [] {s : Set Ω} {t : Set Ω} (hs : s.Finite) :
(s t) =
theorem ProbabilityTheory.condCount_self {Ω : Type u_1} [] {s : Set Ω} (hs : s.Finite) (hs' : s.Nonempty) :
= 1
theorem ProbabilityTheory.condCount_eq_one_of {Ω : Type u_1} [] {s : Set Ω} {t : Set Ω} (hs : s.Finite) (hs' : s.Nonempty) (ht : s t) :
= 1
theorem ProbabilityTheory.pred_true_of_condCount_eq_one {Ω : Type u_1} [] {s : Set Ω} {t : Set Ω} (h : = 1) :
s t
theorem ProbabilityTheory.condCount_eq_zero_iff {Ω : Type u_1} [] {s : Set Ω} {t : Set Ω} (hs : s.Finite) :
= 0 s t =
theorem ProbabilityTheory.condCount_of_univ {Ω : Type u_1} [] {s : Set Ω} (hs : s.Finite) (hs' : s.Nonempty) :
Set.univ = 1
theorem ProbabilityTheory.condCount_inter {Ω : Type u_1} [] {s : Set Ω} {t : Set Ω} {u : Set Ω} (hs : s.Finite) :
(t u) = () u *
theorem ProbabilityTheory.condCount_inter' {Ω : Type u_1} [] {s : Set Ω} {t : Set Ω} {u : Set Ω} (hs : s.Finite) :
(t u) = () t *
theorem ProbabilityTheory.condCount_union {Ω : Type u_1} [] {s : Set Ω} {t : Set Ω} {u : Set Ω} (hs : s.Finite) (htu : Disjoint t u) :
(t u) =
theorem ProbabilityTheory.condCount_compl {Ω : Type u_1} [] {s : Set Ω} (t : Set Ω) (hs : s.Finite) (hs' : s.Nonempty) :
= 1
theorem ProbabilityTheory.condCount_disjoint_union {Ω : Type u_1} [] {s : Set Ω} {t : Set Ω} {u : Set Ω} (hs : s.Finite) (ht : t.Finite) (hst : Disjoint s t) :
* () s + * () t = () u
theorem ProbabilityTheory.condCount_add_compl_eq {Ω : Type u_1} [] {s : Set Ω} (u : Set Ω) (t : Set Ω) (hs : s.Finite) :
() t * + () t * =

A version of the law of total probability for counting probabilities.