question_id int64 1 450 | problem_name stringlengths 28 66 | informal_statement stringlengths 49 702 | lean_statement stringlengths 110 2.66k ⌀ | true_to_source stringclasses 2
values | proof stringclasses 168
values | time_seconds int64 40 1.95k ⌀ | topic stringclasses 8
values | time_seconds_is_lower_bound bool 1
class |
|---|---|---|---|---|---|---|---|---|
8 | stochastic_processes_martingale_1 | Consider biased gambler’s ruin: at each step, the gambler gains one dollar
with probability p and losses one dollar with probability (1 − p).
Let X_n be the money in purse at time n.
Show that if p = 1/2, then (X_n) is a martingale. | theorem q8_gambler_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ) (p : ℝ) (hp : p = 1 / 2)
(hstep : IsConstDrift μ ℱ X (2 * p - 1)) :
Martingale X ℱ μ := by sorry | literal | theorem q8_gambler_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ) (p : ℝ) (hp : p = 1 / 2)
(hstep : IsConstDrift μ ℱ X (2 * p - 1)) :
Martingale X ℱ μ := by
apply martingale_of_condExp_sub_eq_zero_nat hadap.s... | 40 | Martingales & stopping | null |
10 | stochastic_processes_birth_death_reversible | Consider a birth-death Markov chain on a countable state space that possesses a stationary distribution.
Show that the chain is reversible. | theorem q10_birth_death_reversible
(P : ℕ → ℕ → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)
(hbd : ∀ i j, 1 < max i j - min i j → P i j = 0)
(π : ℕ → ℝ) (hπ0 : ∀ i, 0 ≤ π i) (hπsum : ∑' i, π i = 1)
(hstat : ∀ j, ∑' i, π i * P i j = π j) :
∀ i j, π i * P i j = π j * P j i := by
sorry | abstract | theorem q10_birth_death_reversible
(P : ℕ → ℕ → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)
(hbd : ∀ i j, 1 < max i j - min i j → P i j = 0)
(π : ℕ → ℝ) (hπ0 : ∀ i, 0 ≤ π i) (hπsum : ∑' i, π i = 1)
(hstat : ∀ j, ∑' i, π i * P i j = π j) :
∀ i j, π i * P i j = π j * P j i := by
-- P va... | 149 | Markov chains (finite & countable) | null |
11 | stochastic_processes_birth_death_process_stationary | Consider an irreducible birth-death continuous-time Markov chain with birth rate λ_i in state i and death rate μ_{i+1} from state i+1, and let ρ_i = λ_i/μ_{i+1}.
Show that the steady-state distribution, when it exists, satisfies p_i = p_0 ∏_{j<i} ρ_j and p_i λ_i = p_{i+1} μ_{i+1} for all i. | theorem q11_birth_death_stationary
(lam : ℕ → ℝ) (hlam : ∀ i, 0 < lam i)
(mu : ℕ → ℝ) (hmu : ∀ i, 0 < mu (i + 1))
(ρ : ℕ → ℝ) (hρ : ∀ i, ρ i = lam i / mu (i + 1))
(p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)
(hbal0 : p 0 * lam 0 = p 1 * mu 1)
(hbal : ∀ n, p (n + 1) * (lam (n + 1) + m... | abstract | theorem q11_birth_death_stationary
(lam : ℕ → ℝ) (hlam : ∀ i, 0 < lam i)
(mu : ℕ → ℝ) (hmu : ∀ i, 0 < mu (i + 1))
(ρ : ℕ → ℝ) (hρ : ∀ i, ρ i = lam i / mu (i + 1))
(p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)
(hbal0 : p 0 * lam 0 = p 1 * mu 1)
(hbal : ∀ n, p (n + 1) * (lam (n + 1) + m... | 130 | Continuous-time Markov & queues | null |
19 | stochastic_processes_martingale_stopping_time_1 | Let (X_n)_{n ≥ 0} be a martingale, and let S ≤ T be bounded stopping times.
Show that 𝔼[X_T] = 𝔼[X_S]. | theorem q19_optional_stopping_eq (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (S T : Ω → ℕ)
(hS : IsStoppingTime ℱ (natStop S))
(hT : IsStoppingTime ℱ (natStop T))
(hST : ∀ ω, S ω ≤ T ω) (N : ℕ) (hTbdd : ∀ ω, T ω ≤ N) ... | literal | theorem q19_optional_stopping_eq (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (S T : Ω → ℕ)
(hS : IsStoppingTime ℱ (natStop S))
(hT : IsStoppingTime ℱ (natStop T))
(hST : ∀ ω, S ω ≤ T ω) (N : ℕ) (hTbdd : ∀ ω, T ω ≤ N) ... | 300 | Martingales & stopping | null |
22 | stochastic_processes_martingale_2 | Let (ξ_i)_{i ≥ 1} be i.i.d with 𝔼[ξ1] = 0.
Show that X_n = sum_1^n ξ_i is a martingale. | theorem q22_martingale_sum (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(ξ : ℕ → Ω → ℝ) (hint : ∀ n, Integrable (ξ n) μ)
(hmeas : ∀ n, StronglyMeasurable[ℱ (n + 1)] (ξ n))
(hmean : ∀ n, μ[ξ n | ℱ n] =ᵐ[μ] 0) :
Martingale (fun n ω => ∑ i ∈ Finset.range n, ξ i ω) ℱ μ := by sorry | literal | theorem q22_martingale_sum (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(ξ : ℕ → Ω → ℝ) (hint : ∀ n, Integrable (ξ n) μ)
(hmeas : ∀ n, StronglyMeasurable[ℱ (n + 1)] (ξ n))
(hmean : ∀ n, μ[ξ n | ℱ n] =ᵐ[μ] 0) :
Martingale (fun n ω => ∑ i ∈ Finset.range n, ξ i ω) ℱ μ := by
apply martin... | 259 | Martingales & stopping | null |
24 | stochastic_processes_ctmc_embedded_vs_process_probabilities | Let (X(t)) be an irreducible positive-recurrent continuous-time Markov chain with embedded stationary distribution (π_j) and exit rates (ν_j), and process probabilities (p_j).
Show that p_j = π_j when all exit rates ν_j are equal, and give an example where the two distributions differ. | theorem q24_ctmc_embedded_vs_process {S : Type*} [Countable S]
(P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)
(hPloop : ∀ i, P i i = 0)
(π : S → ℝ) (hπpos : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)
(hπstat : ∀ j, ∑' i, π i * P i j = π j)
(ν : S → ℝ) (hν : ∀ i, 0 < ν i)
(ν... | abstract | theorem q24_ctmc_embedded_vs_process {S : Type*} [Countable S]
(P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)
(hPloop : ∀ i, P i i = 0)
(π : S → ℝ) (hπpos : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)
(hπstat : ∀ j, ∑' i, π i * P i j = π j)
(ν : S → ℝ) (hν : ∀ i, 0 < ν i)
(ν... | 110 | Continuous-time Markov & queues | null |
29 | stochastic_processes_round_robin_steady_state | Consider the round-robin service system modeled as a Markov chain with arrival probability λ per quantum and geometric service requirement with per-quantum completion probability, and let ρ be the ratio of arrival rate to service rate with ρ < 1.
Show that the steady-state distribution of the number in the system is g... | theorem q29_round_robin_steady_state
(lam mu ρ : ℝ) (hmu : 0 < mu) (hρdef : ρ = lam / mu) (hρ0 : 0 ≤ ρ) (hρ1 : ρ < 1)
(p q : ℕ → ℝ) (hp : ∀ i, 0 < p i) (hq : ∀ i, 0 < q (i + 1))
(hratio : ∀ i, p i / q (i + 1) = ρ) :
∀ π : ℕ → ℝ, (∀ i, 0 ≤ π i) → (∑' i, π i = 1) →
(∀ i, π i * p i = π (i + 1) * q (i... | abstract | theorem q29_round_robin_steady_state
(lam mu ρ : ℝ) (hmu : 0 < mu) (hρdef : ρ = lam / mu) (hρ0 : 0 ≤ ρ) (hρ1 : ρ < 1)
(p q : ℕ → ℝ) (hp : ∀ i, 0 < p i) (hq : ∀ i, 0 < q (i + 1))
(hratio : ∀ i, p i / q (i + 1) = ρ) :
∀ π : ℕ → ℝ, (∀ i, 0 ≤ π i) → (∑' i, π i = 1) →
(∀ i, π i * p i = π (i + 1) * q (i... | 90 | Continuous-time Markov & queues | null |
31 | stochastic_processes_submartingale_convergence_theorem | Let (Z_n) be a submartingale satisfying E[|Z_n|] ≤ M < ∞ for all n.
Show that Z_n converges with probability 1 to a finite limiting random variable. | theorem q31_submartingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)
(M : ℝ) (hbdd : ∀ n, ∫ ω, |Z n ω| ∂μ ≤ M) :
∃ Zinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 (Zinf ω)) := by
sorry | literal | theorem q31_submartingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)
(M : ℝ) (hbdd : ∀ n, ∫ ω, |Z n ω| ∂μ ≤ M) :
∃ Zinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 (Zinf ω)) := by
refine ⟨ℱ.limitProcess Z μ, ?_⟩
have hbo... | 115 | Martingales & stopping | null |
32 | stochastic_processes_markov_modulated_matrix_generating | Let a Markov-modulated random walk have modulating chain with transition matrix [P] and per-transition increment generating functions g_{ij}(r), and define [A(r)] by A_{ij}(r) = P_{ij} g_{ij}(r).
Show that E[e^{r S_n}] is obtained from the nth power of [A(r)], so that the growth rate of the walk's moment generating fu... | theorem q32_markov_modulated_matrix_generating {σ : Type*} [Fintype σ] [DecidableEq σ]
(P : Matrix σ σ ℝ) (g : σ → σ → ℝ)
(A : Matrix σ σ ℝ) (hA : ∀ i j, A i j = P i j * g i j)
(Φ : ℕ → σ → ℝ) (hΦ0 : ∀ i, Φ 0 i = 1)
(hΦrec : ∀ n i, Φ (n + 1) i = ∑ j, A i j * Φ n j) :
∀ n i, Φ n i = ∑ j, (A ^ n) i j ... | abstract | theorem q32_markov_modulated_matrix_generating {σ : Type*} [Fintype σ] [DecidableEq σ]
(P : Matrix σ σ ℝ) (g : σ → σ → ℝ)
(A : Matrix σ σ ℝ) (hA : ∀ i j, A i j = P i j * g i j)
(Φ : ℕ → σ → ℝ) (hΦ0 : ∀ i, Φ 0 i = 1)
(hΦrec : ∀ n i, Φ (n + 1) i = ∑ j, A i j * Φ n j) :
∀ n i, Φ n i = ∑ j, (A ^ n) i j ... | 124 | Random walks & large deviations | null |
33 | stochastic_processes_brownian_motion_martingale | Let B be a standard Brownian motion with its natural filtration.
Show that B(t) is a martingale. | theorem q33_brownian_motion_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ)
(hadap : Adapted ℱ B)
(hint : ∀ t, Integrable (B t) μ)
(hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).to... | abstract | theorem q33_brownian_motion_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ)
(hadap : Adapted ℱ B)
(hint : ∀ t, Integrable (B t) μ)
(hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).to... | 474 | Brownian motion & stochastic calculus | null |
38 | stochastic_processes_markov_chain_1 | A company issues N different types of coupons. Each coupon is equally likely to be each of the N types.
A collector desires a complete set. Let S represent the sum of (1/k), for 1 ≤ k ≤ N.
Show that the expected time for the collector to obtain all N types is N*S. | theorem q38_coupon_collector_expected (N : ℕ) (hN : 0 < N) (e : ℕ → ℝ) (hbN : e N = 0)
(hrec : ∀ k, k < N →
e k = 1 + ((k : ℝ) / N) * e k + (((N : ℝ) - k) / N) * e (k + 1)) :
e 0 = (N : ℝ) * ∑ k ∈ Finset.Icc 1 N, (1 : ℝ) / k := by sorry | abstract | theorem q38_coupon_collector_expected (N : ℕ) (hN : 0 < N) (e : ℕ → ℝ) (hbN : e N = 0)
(hrec : ∀ k, k < N →
e k = 1 + ((k : ℝ) / N) * e k + (((N : ℝ) - k) / N) * e (k + 1)) :
e 0 = (N : ℝ) * ∑ k ∈ Finset.Icc 1 N, (1 : ℝ) / k := by
have hNR : (0:ℝ) < N := by exact_mod_cast hN
have hNne : (N:ℝ) ≠ 0 := n... | 928 | Markov chains (finite & countable) | null |
40 | stochastic_processes_class_same_period | Let (X_n) be a finite-state Markov chain and let d(i) = gcd{n ≥ 1 : P_{ii}^n > 0} be the period of state i.
Show that all states in the same communicating class have the same period. | theorem q40_class_same_period {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :
∀ x y : Ω, ((∃ m : ℕ, 0 < (P ^ m) x y) ∧ (∃ k : ℕ, 0 < (P ^ k) y x)) →
∀ d : ℕ, (∀ n, 0 < (P ^ n) x x → d ∣ n) ↔ (∀ n, 0 < (P ^ n) y y → d ∣ n) := by
sorry | abstract | theorem q40_class_same_period {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :
∀ x y : Ω, ((∃ m : ℕ, 0 < (P ^ m) x y) ∧ (∃ k : ℕ, 0 < (P ^ k) y x)) →
∀ d : ℕ, (∀ n, 0 < (P ^ n) x x → d ∣ n) ↔ (∀ n, 0 < (P ^ n) y y → d ∣ n) := by
have hPnn : ∀ (t : ℕ) (u v : Ω), 0 ≤ (P ^... | 157 | Markov chains (finite & countable) | null |
41 | stochastic_processes_mdp_optimal_policy_finite_horizon | Consider a finite-state, finite-decision Markov decision problem over a horizon of n transitions.
Show that the dynamic programming recursion yields an optimal policy, and that the decision achieving the maximum at each stage depends only on the current state and the number of stages remaining. | theorem q41_optimal_policy_finite_horizon {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
{K : Type*} [Fintype K] [Nonempty K]
(r : K → Ω → ℝ) (P : K → Matrix Ω Ω ℝ) (hP : ∀ k, IsStochastic (P k))
(v : ℕ → Ω → ℝ) (hv0 : ∀ i, v 0 i = 0)
(hvrec : ∀ n i, v (n + 1) i = ⨆ k, (r k i + ∑ j, P k i j * v n j)) :
∃ μ... | abstract | theorem q41_optimal_policy_finite_horizon {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
{K : Type*} [Fintype K] [Nonempty K]
(r : K → Ω → ℝ) (P : K → Matrix Ω Ω ℝ) (hP : ∀ k, IsStochastic (P k))
(v : ℕ → Ω → ℝ) (hv0 : ∀ i, v 0 i = 0)
(hvrec : ∀ n i, v (n + 1) i = ⨆ k, (r k i + ∑ j, P k i j * v n j)) :
∃ μ... | 109 | Markov chains (finite & countable) | null |
43 | stochastic_processes_exponential_tilting | Let X have moment generating function M and let θ_0 be such that M(θ_0) < ∞. Define the tilted distribution by P(X_{θ_0} ≤ z) = M(θ_0)^{-1} ∫_{−∞}^z e^{θ_0 x} dP(x).
Show that this defines a probability distribution and that E[X_{θ_0}] = Ṁ(θ_0)/M(θ_0). | theorem q43_exponential_tilting (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : Ω → ℝ) (hX : Measurable X) (θ₀ : ℝ)
(hInt : ∀ᶠ s in nhds θ₀, Integrable (fun ω => Real.exp (s * X ω)) μ) :
IsProbabilityMeasure (μ.tilted (fun ω => θ₀ * X ω)) ∧
∫ ω, X ω ∂(μ.tilted (fun ω => θ₀ * X ω))
= deriv (fun t => ... | literal | theorem q43_exponential_tilting (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : Ω → ℝ) (hX : Measurable X) (θ₀ : ℝ)
(hInt : ∀ᶠ s in nhds θ₀, Integrable (fun ω => Real.exp (s * X ω)) μ) :
IsProbabilityMeasure (μ.tilted (fun ω => θ₀ * X ω)) ∧
∫ ω, X ω ∂(μ.tilted (fun ω => θ₀ * X ω))
= deriv (fun t => ... | 443 | Random walks & large deviations | null |
51 | stochastic_processes_brownian_marginal | Let B be standard Brownian motion: B(0) = 0 and the increment B(t) − B(s) is normal with mean 0 and variance t − s for 0 ≤ s ≤ t. Show that B(t) is normally distributed with mean 0 and variance t. | theorem q51_brownian_marginal (μ : Measure Ω) [IsProbabilityMeasure μ]
(B : ℝ → Ω → ℝ) (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ) :
∀ t : ℝ, 0 ≤ t → HasLaw (B t) (gaussianReal 0 t.toNNReal) μ := by
sorry | abstract | theorem q51_brownian_marginal (μ : Measure Ω) [IsProbabilityMeasure μ]
(B : ℝ → Ω → ℝ) (hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ) :
∀ t : ℝ, 0 ≤ t → HasLaw (B t) (gaussianReal 0 t.toNNReal) μ := by
intro t ht
... | 52 | Brownian motion & stochastic calculus | null |
54 | stochastic_processes_continuous_mapping_theorem | Let P_n ⇒ P on a metric space S_1 and let f : S_1 → S_2 be continuous.
Show that P_n f^{-1} ⇒ P f^{-1}. | theorem q54_continuous_mapping_theorem
{S₁ S₂ : Type*} [MeasurableSpace S₁] [TopologicalSpace S₁] [OpensMeasurableSpace S₁]
[MeasurableSpace S₂] [TopologicalSpace S₂] [BorelSpace S₂]
(Ps : ℕ → ProbabilityMeasure S₁) (P : ProbabilityMeasure S₁)
(hconv : Tendsto Ps atTop (𝓝 P))
(f : S₁ → S₂) (hf : Co... | literal | theorem q54_continuous_mapping_theorem
{S₁ S₂ : Type*} [MeasurableSpace S₁] [TopologicalSpace S₁] [OpensMeasurableSpace S₁]
[MeasurableSpace S₂] [TopologicalSpace S₂] [BorelSpace S₂]
(Ps : ℕ → ProbabilityMeasure S₁) (P : ProbabilityMeasure S₁)
(hconv : Tendsto Ps atTop (𝓝 P))
(f : S₁ → S₂) (hf : Co... | 88 | Weak convergence & functional limits | null |
57 | stochastic_processes_doob_martingale | Let Z be a random variable with E[|Z|] < ∞, let (X_n) be an arbitrary sequence of random variables, and define Z_n = E[Z | X_n, X_{n−1}, …, X_1].
Show that (Z_n) is a martingale (Doob's martingale). | theorem q57_doob_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(Z : Ω → ℝ) (hZ : Integrable Z μ)
(X : ℕ → Ω → ℝ) (hX : ∀ i, StronglyMeasurable (X i)) :
Martingale (fun n => μ[Z | (Filtration.natural X hX) n]) (Filtration.natural X hX) μ := by
sorry | literal | theorem q57_doob_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(Z : Ω → ℝ) (hZ : Integrable Z μ)
(X : ℕ → Ω → ℝ) (hX : ∀ i, StronglyMeasurable (X i)) :
Martingale (fun n => μ[Z | (Filtration.natural X hX) n]) (Filtration.natural X hX) μ := by
exact martingale_condExp Z (Filtration.natural X hX) μ | 52 | Martingales & stopping | null |
60 | stochastic_processes_martingale_stopping_time_2 | Let (X_n)_{n ≥ 0} be a martingale, and let T be a stopping time.
Show that X^T is also a martingale. | theorem q60_stopped_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (T : Ω → ℕ)
(hT : IsStoppingTime ℱ (natStop T)) :
Martingale (stoppedProcess X (natStop T)) ℱ μ := by sorry | literal | theorem q60_stopped_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (T : Ω → ℕ)
(hT : IsStoppingTime ℱ (natStop T)) :
Martingale (stoppedProcess X (natStop T)) ℱ μ := by
rw [martingale_iff]
refine ⟨?_, hX.subma... | 93 | Martingales & stopping | null |
63 | stochastic_processes_product_form_unit_expectation | Let (S_n) be a random walk with i.i.d. steps X and semi-invariant generating function γ(r) = ln E[e^{rX}], and let Z_n = exp(r S_n − n γ(r)).
Show that E[Z_n] = 1 for all n. | theorem q63_product_form_unit_expectation (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(r : ℝ) (hint : Integrable (fun ω => Real.exp (r * X 0 ω)) μ)
(γ : ℝ) (hγ : γ = cgf (X 0) μ r)
(S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i... | abstract | theorem q63_product_form_unit_expectation (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(r : ℝ) (hint : Integrable (fun ω => Real.exp (r * X 0 ω)) μ)
(γ : ℝ) (hγ : γ = cgf (X 0) μ r)
(S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i... | 273 | Random walks & large deviations | null |
68 | stochastic_processes_slln_via_backward_martingale | Let ξ_1,ξ_2,… be i.i.d. with E|ξ_1| < ∞ and let S_n = Σ_{i=1}^n ξ_i.
Show, using the backward martingale convergence theorem, that S_n/n → E[ξ_1] almost surely. | theorem q68_slln_via_backward_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ξ : ℕ → Ω → ℝ) (hindep : iIndepFun ξ μ) (hident : ∀ i, IdentDistrib (ξ i) (ξ 0) μ μ)
(hint : Integrable (ξ 0) μ)
(S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, ξ i ω) :
∀ᵐ ω ∂μ, Tendsto (fun n => S n ω / (n : ... | literal | theorem q68_slln_via_backward_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ξ : ℕ → Ω → ℝ) (hindep : iIndepFun ξ μ) (hident : ∀ i, IdentDistrib (ξ i) (ξ 0) μ μ)
(hint : Integrable (ξ 0) μ)
(S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, ξ i ω) :
∀ᵐ ω ∂μ, Tendsto (fun n => S n ω / (n : ... | 165 | Martingales & stopping | null |
69 | stochastic_processes_ctmc_steady_state_process | Let (X(t)) be an irreducible continuous-time Markov chain whose embedded chain is positive-recurrent with stationary distribution (π_i), and whose transition rates ν_i satisfy Σ_i π_i/ν_i < ∞.
Show that the limiting process probabilities are p_j = (π_j/ν_j) / Σ_k (π_k/ν_k). | theorem q69_ctmc_steady_state_process
{S : Type*} [Countable S]
(P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)
(hPloop : ∀ i, P i i = 0)
(π : S → ℝ) (hπpos : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)
(hπstat : ∀ j, ∑' i, π i * P i j = π j)
(ν : S → ℝ) (hν : ∀ i, 0 < ν i)
... | abstract | theorem q69_ctmc_steady_state_process
{S : Type*} [Countable S]
(P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPstoch : ∀ i, ∑' j, P i j = 1)
(hPloop : ∀ i, P i i = 0)
(π : S → ℝ) (hπpos : ∀ i, 0 < π i) (hπsum : ∑' i, π i = 1)
(hπstat : ∀ j, ∑' i, π i * P i j = π j)
(ν : S → ℝ) (hν : ∀ i, 0 < ν i)
... | 639 | Continuous-time Markov & queues | null |
71 | stochastic_processes_stopping_times | Suppose τ and τ' are stopping times.
Show that τ + τ', τ ∧ τ', and τ ∨ τ' are also stopping times. | theorem q71_stopping_times {Ω : Type*} {m : MeasurableSpace Ω}
(ℱ : Filtration ℕ m) (τ σ : Ω → WithTop ℕ)
(hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ) :
IsStoppingTime ℱ (fun ω => τ ω + σ ω) ∧ IsStoppingTime ℱ (τ ⊓ σ) ∧
IsStoppingTime ℱ (τ ⊔ σ) := by sorry | literal | theorem q71_stopping_times {Ω : Type*} {m : MeasurableSpace Ω}
(ℱ : Filtration ℕ m) (τ σ : Ω → WithTop ℕ)
(hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ) :
IsStoppingTime ℱ (fun ω => τ ω + σ ω) ∧ IsStoppingTime ℱ (τ ⊓ σ) ∧
IsStoppingTime ℱ (τ ⊔ σ) :=
⟨hτ.add hσ, hτ.min hσ, hτ.max hσ⟩ | 76 | Martingales & stopping | null |
72 | stochastic_processes_submartingale_inequality_1 | Let X = (X_n)_{n ≥ 0} be a non-negative submartingale.
Let X_n^* = max_{0 ≤ k ≤ n} X_k.
Show that λℙ[X_n^* ≥ λ] ≤ 𝔼[X_n * 1_{X_n^* ≥ λ}] ≤ 𝔼[X_n]. | theorem q72_doob_maximal (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ) (hnn : ∀ n ω, 0 ≤ X n ω)
(lam : ℝ) (hlam : 0 < lam) (n : ℕ) :
lam * (μ {ω | lam ≤ runningMax X n ω}).toReal ≤ ∫ ω in {ω | lam ≤ runningMax X n ω}, X n ω ∂μ ∧
∫ ω in {ω | l... | literal | theorem q72_doob_maximal (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ) (hnn : ∀ n ω, 0 ≤ X n ω)
(lam : ℝ) (hlam : 0 < lam) (n : ℕ) :
lam * (μ {ω | lam ≤ runningMax X n ω}).toReal ≤ ∫ ω in {ω | lam ≤ runningMax X n ω}, X n ω ∂μ ∧
∫ ω in {ω | l... | 393 | Martingales & stopping | null |
75 | stochastic_processes_strong_stationary_time_1 | Let (X_n)_{n ≥ 0} be an irreducible Markov chain with stationary measure π.
Let the separation distance be S_x (n) = max_y (1 − P^n (x, y) / π(y)).
Show that ||P^n (x, ·) - π||_{TV} ≤ S_x (n). | theorem q75_tv_le_sep {Ω : Type*} [Fintype Ω] [Nonempty Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (π : Ω → ℝ) (hπ : IsStationary P π)
(hπpos : ∀ x, 0 < π x) (x : Ω) (n : ℕ) :
tvDist (fun y => (P ^ n) x y) π ≤ ⨆ y, (1 - (P ^ n) x y / π y) := by sorry | literal | theorem q75_tv_le_sep {Ω : Type*} [Fintype Ω] [Nonempty Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (π : Ω → ℝ) (hπ : IsStationary P π)
(hπpos : ∀ x, 0 < π x) (x : Ω) (n : ℕ) :
tvDist (fun y => (P ^ n) x y) π ≤ ⨆ y, (1 - (P ^ n) x y / π y) := by
-- power of stochastic matrix has nonneg ent... | 178 | Markov chains (finite & countable) | null |
78 | stochastic_processes_random_walk_square_martingale | Let X_1,X_2,… be i.i.d. with mean 0 and variance σ^2, and let S_n = Σ_{i=1}^n X_i.
Show that S_n^2 − nσ^2 is a martingale. | theorem q78_square_random_walk_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ)
(hadap : Adapted ℱ (fun n ω => ∑ i ∈ Finset.range n, X i ω))
(hint : ∀ n, Integrable (fun ω => (X n ω) ^ 2) μ) (σ2 : ℝ)
(hmean : ∀ n, μ[X n | ℱ n] =ᵐ[μ] fun _ => (0 : ℝ))
(hvar : ... | abstract | theorem q78_square_random_walk_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ)
(hadap : Adapted ℱ (fun n ω => ∑ i ∈ Finset.range n, X i ω))
(hint : ∀ n, Integrable (fun ω => (X n ω) ^ 2) μ) (σ2 : ℝ)
(hmean : ∀ n, μ[X n | ℱ n] =ᵐ[μ] fun _ => (0 : ℝ))
(hvar : ... | 491 | Martingales & stopping | null |
81 | stochastic_processes_markov_modulated_product_martingale | Let a Markov-modulated random walk have matrix [A(r)] with largest eigenvalue ρ(r) and corresponding positive right eigenvector ν(r), and define Z_n = exp(r S_n) ν_{Y_n}(r) / ρ(r)^n.
Show that (Z_n) is a martingale. | theorem q81_markov_modulated_product_martingale {σ : Type*} [Fintype σ]
(μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(Y : ℕ → Ω → σ) (X S : ℕ → Ω → ℝ) (r ρ : ℝ) (hρ : 0 < ρ)
(ν : σ → ℝ) (hν : ∀ s, 0 < ν s)
(hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω) (hSadap : Adapted ℱ S)
(Z ... | abstract | theorem q81_markov_modulated_product_martingale {σ : Type*} [Fintype σ]
(μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(Y : ℕ → Ω → σ) (X S : ℕ → Ω → ℝ) (r ρ : ℝ) (hρ : 0 < ρ)
(ν : σ → ℝ) (hν : ∀ s, 0 < ν s)
(hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω) (hSadap : Adapted ℱ S)
(Z ... | 300 | Martingales & stopping | null |
83 | stochastic_processes_class_transient_recurrent | Let (X_n) be a finite-state Markov chain.
Show that within any communicating class, either all states are transient or all states are recurrent. | theorem q83_class_transient_recurrent {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :
∀ x y : Ω, ((∃ m : ℕ, 0 < (P ^ m) x y) ∧ (∃ k : ℕ, 0 < (P ^ k) y x)) →
(Summable (fun n => (P ^ n) x x) ↔ Summable (fun n => (P ^ n) y y)) := by
sorry | abstract | theorem q83_class_transient_recurrent {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :
∀ x y : Ω, ((∃ m : ℕ, 0 < (P ^ m) x y) ∧ (∃ k : ℕ, 0 < (P ^ k) y x)) →
(Summable (fun n => (P ^ n) x x) ↔ Summable (fun n => (P ^ n) y y)) := by
obtain ⟨hnn, hstoch⟩ := hP
-- entrie... | 267 | Markov chains (finite & countable) | null |
85 | stochastic_processes_renewal_slln | Let S_n = X_1 + … + X_n where the X_i are i.i.d. with E[|X|] < ∞ and mean X̄.
Show that Pr[lim_{n→∞} S_n/n = X̄] = 1. | theorem q85_renewal_slln (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hint : Integrable (X 0) μ)
(hindep : Pairwise (fun i j => IndepFun (X i) (X j) μ))
(hident : ∀ i, IdentDistrib (X i) (X 0) μ μ) :
∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ • (∑ i ∈ Finset.range n, X i ω))
atTop (𝓝 (... | literal | theorem q85_renewal_slln (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hint : Integrable (X 0) μ)
(hindep : Pairwise (fun i j => IndepFun (X i) (X j) μ))
(hident : ∀ i, IdentDistrib (X i) (X 0) μ μ) :
∀ᵐ ω ∂μ, Tendsto (fun n : ℕ => (n : ℝ)⁻¹ • (∑ i ∈ Finset.range n, X i ω))
atTop (𝓝 (... | 48 | Weak convergence & functional limits | null |
86 | stochastic_processes_birth_death_geometric | Consider an irreducible birth-death chain on {0,1,2,…} with constant ratio ρ = p/q < 1 (up-probability p, down-probability q at every interior state).
Show that the stationary distribution is π_i = (1 − ρ) ρ^i for i ≥ 0. | theorem q86_birth_death_geometric
(P : ℕ → ℕ → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)
(ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
(hratio : ∀ i, P i (i + 1) = ρ * P (i + 1) i)
(π : ℕ → ℝ) (hπ : ∀ i, π i = (1 - ρ) * ρ ^ i) :
(∀ i, 0 ≤ π i) ∧ (∑' i, π i = 1) ∧
(∀ i, π i * P i (i + 1) =... | abstract | theorem q86_birth_death_geometric
(P : ℕ → ℕ → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hP1 : ∀ i, ∑' j, P i j = 1)
(ρ : ℝ) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
(hratio : ∀ i, P i (i + 1) = ρ * P (i + 1) i)
(π : ℕ → ℝ) (hπ : ∀ i, π i = (1 - ρ) * ρ ^ i) :
(∀ i, 0 ≤ π i) ∧ (∑' i, π i = 1) ∧
(∀ i, π i * P i (i + 1) =... | 94 | Markov chains (finite & countable) | null |
87 | stochastic_processes_martingale_simple_random_walk | Let X = (X_n)_{n ≥ 0} be the simple random walk on ℤ.
Show that (Y_n := X_n^3 − 3nX_n)_{n ≥ 0} is a martingale. | theorem q87_srw_cubic_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (fun ω => (X n ω) ^ 3) μ)
(hstep : ∀ n, ∀ᵐ ω ∂μ, X (n + 1) ω = X n ω + 1 ∨ X (n + 1) ω = X n ω - 1)
(hsym : IsConstDrift μ ℱ X 0) :
Martingale (fu... | literal | theorem q87_srw_cubic_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (fun ω => (X n ω) ^ 3) μ)
(hstep : ∀ n, ∀ᵐ ω ∂μ, X (n + 1) ω = X n ω + 1 ∨ X (n + 1) ω = X n ω - 1)
(hsym : IsConstDrift μ ℱ X 0) :
Martingale (fu... | 121 | Martingales & stopping | null |
88 | stochastic_processes_stopped_submartingale_bounds | Let (Z_n) be a submartingale and let J be a stopping trial with stopped process (Z_n*).
Show that E[Z_1] ≤ E[Z_n*] ≤ E[Z_n] for all n. | theorem q88_stopped_submartingale_bounds (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]
(Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)
(J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) (n : ℕ) :
∫ ω, Z 0 ω ∂μ ≤ ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ ∧
∫ ω, s... | literal | theorem q88_stopped_submartingale_bounds (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]
(Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)
(J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) (n : ℕ) :
∫ ω, Z 0 ω ∂μ ≤ ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ ∧
∫ ω, s... | 300 | Martingales & stopping | null |
96 | stochastic_processes_ctmc_reversibility_embedded | Let (X(t)) be an irreducible continuous-time Markov chain with embedded jump chain (X_n).
Show that the process (X(t)) is reversible if and only if the embedded chain (X_n) is reversible. | theorem q96_ctmc_reversibility_embedded {S : Type*} [Countable S]
(ν : S → ℝ) (hν : ∀ i, 0 < ν i)
(P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPloop : ∀ i, P i i = 0)
(hPstoch : ∀ i, ∑' j, P i j = 1)
(q : S → S → ℝ) (hq : ∀ i j, q i j = ν i * P i j)
(p : S → ℝ) (hp0 : ∀ i, 0 < p i) (hpsum : ∑' i, p i ... | abstract | theorem q96_ctmc_reversibility_embedded {S : Type*} [Countable S]
(ν : S → ℝ) (hν : ∀ i, 0 < ν i)
(P : S → S → ℝ) (hP0 : ∀ i j, 0 ≤ P i j) (hPloop : ∀ i, P i i = 0)
(hPstoch : ∀ i, ∑' j, P i j = 1)
(q : S → S → ℝ) (hq : ∀ i j, q i j = ν i * P i j)
(p : S → ℝ) (hp0 : ∀ i, 0 < p i) (hpsum : ∑' i, p i ... | 85 | Continuous-time Markov & queues | null |
99 | stochastic_processes_simple_random_walk | Let X = (X_n)_{n ≥ 0} be the simple random walk on ℤ.
Let τ be the first time that the walker hits either 0 or N.
Show that, for 0 ≤ k ≤ N, we have 𝔼_k [τ | X_τ = N] = (N^2 - k^2) / 3. | theorem q99_srw_conditional_time (N : ℕ) (v : ℕ → ℝ) (hbN : v N = 0)
(hrec : ∀ k, 0 < k → k < N →
v k = 1 + (((k : ℝ) + 1) / (2 * k)) * v (k + 1) + (((k : ℝ) - 1) / (2 * k)) * v (k - 1))
(k : ℕ) (hk0 : 0 < k) (hk : k ≤ N) :
v k = ((N : ℝ) ^ 2 - (k : ℝ) ^ 2) / 3 := by sorry | abstract | theorem q99_srw_conditional_time (N : ℕ) (v : ℕ → ℝ) (hbN : v N = 0)
(hrec : ∀ k, 0 < k → k < N →
v k = 1 + (((k : ℝ) + 1) / (2 * k)) * v (k + 1) + (((k : ℝ) - 1) / (2 * k)) * v (k - 1))
(k : ℕ) (hk0 : 0 < k) (hk : k ≤ N) :
v k = ((N : ℝ) ^ 2 - (k : ℝ) ^ 2) / 3 := by
-- Invariant: (j+1)*v(j+1) - j*v... | 675 | Random walks & large deviations | null |
101 | stochastic_processes_optional_stopping_bounded_process_martingale | Let (X_n) be a martingale that is uniformly bounded, i.e. |X_n| ≤ M almost surely for all n, and let τ be a stopping time.
Show that E[X_τ] = E[X_0]. | theorem q101_optional_stopping_bounded_process_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ)
(hX : Martingale X ℱ μ) (M : ℝ) (hbdd : ∀ n ω, |X n ω| ≤ M)
(T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :
∫ ω, stoppedValue X (natStop ... | literal | theorem q101_optional_stopping_bounded_process_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ)
(hX : Martingale X ℱ μ) (M : ℝ) (hbdd : ∀ n ω, |X n ω| ≤ M)
(T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :
∫ ω, stoppedValue X (natStop ... | 1,110 | Martingales & stopping | null |
102 | stochastic_processes_chapman_kolmogorov_finite | Let (X_n) be a finite-state Markov chain with transition matrix [P].
Show that the n-step transition probabilities satisfy P_{ij}^{m+n} = Σ_k P_{ik}^m P_{kj}^n. | theorem q102_chapman_kolmogorov {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (m n : ℕ) (i j : Ω) :
(P ^ (m + n)) i j = ∑ k, (P ^ m) i k * (P ^ n) k j := by
sorry | literal | theorem q102_chapman_kolmogorov {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (m n : ℕ) (i j : Ω) :
(P ^ (m + n)) i j = ∑ k, (P ^ m) i k * (P ^ n) k j := by
rw [pow_add, Matrix.mul_apply] | 47 | Markov chains (finite & countable) | null |
103 | stochastic_processes_random_walk_centered_martingale | Let X_1,X_2,… be i.i.d. with mean μ and E|X_1| < ∞, and let S_n = Σ_{i=1}^n X_i.
Show that S_n − μn is a martingale with respect to the filtration generated by (X_i). | theorem q103_centered_random_walk_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ)
(hadap : Adapted ℱ (fun n ω => ∑ i ∈ Finset.range n, X i ω))
(hint : ∀ n, Integrable (X n) μ) (m : ℝ)
(hincr : ∀ n, μ[X n | ℱ n] =ᵐ[μ] fun _ => m) :
Martingale (fun n ω => (∑ i... | abstract | theorem q103_centered_random_walk_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ)
(hadap : Adapted ℱ (fun n ω => ∑ i ∈ Finset.range n, X i ω))
(hint : ∀ n, Integrable (X n) μ) (m : ℝ)
(hincr : ∀ n, μ[X n | ℱ n] =ᵐ[μ] fun _ => m) :
Martingale (fun n ω => (∑ i... | 173 | Martingales & stopping | null |
106 | stochastic_processes_birth_death_process_reversible | Consider a birth-death continuous-time Markov chain that possesses a steady-state distribution.
Show that the process is reversible. | theorem q106_birth_death_reversible
(lam : ℕ → ℝ) (hlam : ∀ i, 0 < lam i)
(mu : ℕ → ℝ) (hmu : ∀ i, 0 < mu (i + 1))
(q : ℕ → ℕ → ℝ)
(hqbirth : ∀ i, q i (i + 1) = lam i)
(hqdeath : ∀ i, q (i + 1) i = mu (i + 1))
(hqother : ∀ i j, j ≠ i + 1 → i ≠ j + 1 → q i j = 0)
(p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p... | abstract | theorem q106_birth_death_reversible
(lam : ℕ → ℝ) (hlam : ∀ i, 0 < lam i)
(mu : ℕ → ℝ) (hmu : ∀ i, 0 < mu (i + 1))
(q : ℕ → ℕ → ℝ)
(hqbirth : ∀ i, q i (i + 1) = lam i)
(hqdeath : ∀ i, q (i + 1) i = mu (i + 1))
(hqother : ∀ i j, j ≠ i + 1 → i ≠ j + 1 → q i j = 0)
(p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p... | 88 | Continuous-time Markov & queues | null |
107 | stochastic_processes_product_unit_mean_martingale | Let (X_i) be i.i.d. with E[X_i] = 1, and let Z_n = X_1 X_2 … X_n.
Show that (Z_n) is a martingale. | theorem q107_iid_product_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))
(hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(hint : ∀ n, Integrable (fun ω => ∏ i ∈ Finset.range (n + 1), X i ω) μ)
(hmean : ∫ ω, X 0 ω ∂μ = 1) :... | literal | theorem q107_iid_product_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))
(hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(hint : ∀ n, Integrable (fun ω => ∏ i ∈ Finset.range (n + 1), X i ω) μ)
(hmean : ∫ ω, X 0 ω ∂μ = 1) :... | 265 | Martingales & stopping | null |
110 | stochastic_processes_brownian_scaling_1 | Standard Brownian motion is invariant under Brownian scaling: for c > 0, the rescaled process W(t) = c B(t / c²) has the same increment law as B, namely W(t) − W(s) ~ Normal(0, t − s) for 0 ≤ s ≤ t. | theorem q110_brownian_scaling (μ : Measure Ω) [IsProbabilityMeasure μ]
(B : ℝ → Ω → ℝ) (c : ℝ) (hc : 0 < c)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ) :
∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => c * B (t / c ^ 2) ω - c * B (s / c ^ ... | abstract | theorem q110_brownian_scaling (μ : Measure Ω) [IsProbabilityMeasure μ]
(B : ℝ → Ω → ℝ) (c : ℝ) (hc : 0 < c)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => B t ω - B s ω) (gaussianReal 0 (t - s).toNNReal) μ) :
∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => c * B (t / c ^ 2) ω - c * B (s / c ^ ... | 303 | Brownian motion & stochastic calculus | null |
113 | stochastic_processes_gamblers_ruin_1 | Consider a gambler betting on the outcome of a sequence of independent fair coin tosses.
If head, he gains one dollar. If tail, he loses one dollar.
If he reaches a fortune of N dollars, he stops. If his purse is ever empty, he stops.
Show that the probability that the gambler's fortune is equ... | theorem q113_gamblers_ruin_probability
(N : ℕ) (hN : 0 < N) (h : ℕ → ℝ)
(hb0 : h 0 = 0) (hbN : h N = 1)
(hharm : ∀ k, 0 < k → k < N → h k = (h (k - 1) + h (k + 1)) / 2)
(k : ℕ) (hk : k ≤ N) :
h k = (k : ℝ) / (N : ℝ) := by sorry | literal | theorem q113_gamblers_ruin_probability
(N : ℕ) (hN : 0 < N) (h : ℕ → ℝ)
(hb0 : h 0 = 0) (hbN : h N = 1)
(hharm : ∀ k, 0 < k → k < N → h k = (h (k - 1) + h (k + 1)) / 2)
(k : ℕ) (hk : k ≤ N) :
h k = (k : ℝ) / (N : ℝ) := by
-- Express everything in terms of the slope h 1.
have key : ∀ j, j ≤ N → h... | 80 | Random walks & large deviations | null |
119 | stochastic_processes_log_likelihood_random_walk | Consider a binary hypothesis test with i.i.d. observations Y_1, Y_2, … and let Z_n be the log-likelihood ratio after n observations.
Show that under each hypothesis (Z_n) is a random walk whose increments are the per-observation log-likelihood ratios. | theorem q119_log_likelihood_random_walk (μ : Measure Ω) [IsProbabilityMeasure μ]
(Y : ℕ → Ω → ℝ) (hindep : iIndepFun Y μ) (hident : ∀ i, IdentDistrib (Y i) (Y 0) μ μ)
(llr : ℝ → ℝ) (hllr : Measurable llr)
(W : ℕ → Ω → ℝ) (hW : ∀ i ω, W i ω = llr (Y i ω))
(Z : ℕ → Ω → ℝ) (hZ : ∀ n ω, Z n ω = ∑ i ∈ Finset... | abstract | theorem q119_log_likelihood_random_walk (μ : Measure Ω) [IsProbabilityMeasure μ]
(Y : ℕ → Ω → ℝ) (hindep : iIndepFun Y μ) (hident : ∀ i, IdentDistrib (Y i) (Y 0) μ μ)
(llr : ℝ → ℝ) (hllr : Measurable llr)
(W : ℕ → Ω → ℝ) (hW : ∀ i ω, W i ω = llr (Y i ω))
(Z : ℕ → Ω → ℝ) (hZ : ∀ n ω, Z n ω = ∑ i ∈ Finset... | 90 | Random walks & large deviations | null |
121 | stochastic_processes_martingale_stopping_time_3 | Let (X_n)_{n ≥ 0} be a martingale, and let T be a stopping time which is finite a.s.
Let there be an integrable random variable Y such that |Xn| ≤ Y for all n.
Show that 𝔼[X_T] = 𝔼[X_0]. | theorem q121_optional_stopping_dominated (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (T : Ω → ℕ)
(hT : IsStoppingTime ℱ (natStop T)) (Y : Ω → ℝ) (hY : Integrable Y μ)
(hdom : ∀ n, ∀ᵐ ω ∂μ, |X n ω| ≤ Y ω) :
∫ ω, stoppe... | literal | theorem q121_optional_stopping_dominated (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (T : Ω → ℕ)
(hT : IsStoppingTime ℱ (natStop T)) (Y : Ω → ℝ) (hY : Integrable Y μ)
(hdom : ∀ n, ∀ᵐ ω ∂μ, |X n ω| ≤ Y ω) :
∫ ω, stoppe... | 304 | Martingales & stopping | null |
123 | stochastic_processes_stopped_supermartingale | Let (X_n) be a supermartingale and let τ be a stopping time.
Show that the stopped process X_{n∧τ} is a supermartingale. | theorem q123_stopped_supermartingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ)
(hX : Supermartingale X ℱ μ) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :
Supermartingale (stoppedProcess X (natStop T)) ℱ μ := by
sorry | literal | theorem q123_stopped_supermartingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ)
(hX : Supermartingale X ℱ μ) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :
Supermartingale (stoppedProcess X (natStop T)) ℱ μ := by
have hsub : Submartingale ... | 120 | Martingales & stopping | null |
124 | stochastic_processes_markov_chain_2 | A company issues N different types of coupons. Each coupon is equally likely to be each of the N types.
A collector desires a complete set. Let τ be the first time that the collector obtains all N types.
Show that for any c > 0, P[τ > N log N + cN] ≤ e^{-c}. | theorem q124_coupon_collector_tail {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω)
[IsProbabilityMeasure μ] (N : ℕ) (hN : 0 < N) (c : ℝ) (hc : 0 < c)
(X : ℕ → Ω → ℕ)
(hXrange : ∀ k ω, X k ω < N)
(hXunif : ∀ (k : ℕ) (j : ℕ), j < N → (μ {ω | X k ω = j}).toReal = 1 / (N : ℝ))
(hXindep : iIndepFun X μ)
... | abstract | theorem q124_coupon_collector_tail {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω)
[IsProbabilityMeasure μ] (N : ℕ) (hN : 0 < N) (c : ℝ) (hc : 0 < c)
(X : ℕ → Ω → ℕ)
(hXrange : ∀ k ω, X k ω < N)
(hXunif : ∀ (k : ℕ) (j : ℕ), j < N → (μ {ω | X k ω = j}).toReal = 1 / (N : ℝ))
(hXindep : iIndepFun X μ)
... | 875 | Markov chains (finite & countable) | null |
126 | stochastic_processes_target_time | Suppose that (X_n)_{n ≥ 0} is an irreducible Markov chain with transition
matrix P and stationary measure π.
Let τ_x be the hitting time: τ_x = min{n ≥ 0 : X_n = x}.
Show that the quantity sum_x (𝔼_a [τ_x]π(x)) does not depend on a. | theorem q126_target_time {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)
(g : Ω → Ω → ℝ) (hg : IsHittingSolution P g)
(π : Ω → ℝ) (hπ : IsStationary P π) :
∀ a b : Ω, ∑ x, g a x * π x = ∑ x, g b x * π x := by sorry | abstract | theorem q126_target_time {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)
(g : Ω → Ω → ℝ) (hg : IsHittingSolution P g)
(π : Ω → ℝ) (hπ : IsStationary P π) :
∀ a b : Ω, ∑ x, g a x * π x = ∑ x, g b x * π x := by
obtain ⟨hPnn, hProw⟩ := hP
obtain... | 122 | Markov chains (finite & countable) | null |
127 | stochastic_processes_scaled_branching_convergence | Consider a branching process (X_n) with i.i.d. offspring counts of mean Ȳ, and let Z_n = X_n/Ȳ^n be the scaled process.
Show that Z_n is a nonnegative martingale and therefore converges with probability 1 to a finite limiting random variable. | theorem q127_scaled_branching_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ)
(hnn : ∀ n ω, 0 ≤ X n ω)
(Ybar : ℝ) (hY : 0 < Ybar)
(hbranch : ∀ n, μ[X (n + 1) | ℱ n] =ᵐ[μ] fun ω => Ybar * X n ω) :
Ma... | abstract | theorem q127_scaled_branching_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ)
(hnn : ∀ n ω, 0 ≤ X n ω)
(Ybar : ℝ) (hY : 0 < Ybar)
(hbranch : ∀ n, μ[X (n + 1) | ℱ n] =ᵐ[μ] fun ω => Ybar * X n ω) :
Ma... | 85 | Martingales & stopping | null |
128 | stochastic_processes_drifted_brownian_martingale | Let B_μ(t) = μt + σB(t) be a Brownian motion with drift.
Show that B_μ(t) − μt is a martingale, and that (B_μ(t) − μt)^2 − σ^2 t is a martingale. | theorem q128_drifted_brownian_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ) (c σ : ℝ)
(hadap : Adapted ℱ B)
(hint : ∀ t, Integrable (B t) μ)
(hint2 : ∀ t, Integrable (fun ω => (B t ω) ^ 2) μ)
(hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t... | abstract | theorem q128_drifted_brownian_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ) (c σ : ℝ)
(hadap : Adapted ℱ B)
(hint : ∀ t, Integrable (B t) μ)
(hint2 : ∀ t, Integrable (fun ω => (B t ω) ^ 2) μ)
(hB0 : ∀ᵐ ω ∂μ, B 0 ω = 0)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t... | 846 | Brownian motion & stochastic calculus | null |
129 | stochastic_processes_random_walk_recurrent_1 | Show that simple random walk on ℤ^2 is recurrent. | theorem q129_z2_recurrent :
¬ Summable (fun n : ℕ => ((Nat.choose (2 * n) n : ℝ) / (4 : ℝ) ^ n) ^ 2) := by sorry | abstract | theorem q129_z2_recurrent :
¬ Summable (fun n : ℕ => ((Nat.choose (2 * n) n : ℝ) / (4 : ℝ) ^ n) ^ 2) := by
intro hsum
set a : ℕ → ℝ := fun n => (Nat.choose (2 * n) n : ℝ) / (4 : ℝ) ^ n with ha
-- a n ≥ 0
have hapos : ∀ n, 0 ≤ a n := by
intro n; rw [ha]; positivity
-- recurrence: (n+1) * a (n+1) = (2n+... | 83 | Random walks & large deviations | null |
131 | stochastic_processes_markov_modulated_threshold_bound | Let a Markov-modulated random walk have negative drift and let r* > 0 satisfy ρ(r*) = 1, where ρ(r) is the largest eigenvalue of [A(r)], with positive right eigenvector ν(r*).
Show that the probability the walk ever crosses a threshold α > 0 is bounded by a constant times exp(−r* α). | theorem q131_markov_modulated_threshold_bound {σ : Type*} [Fintype σ]
(μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(Y : ℕ → Ω → σ) (S : ℕ → Ω → ℝ) (rstar : ℝ) (hr : 0 < rstar)
(ν : σ → ℝ) (νmin : ℝ) (hνmin : 0 < νmin) (hν : ∀ s, νmin ≤ ν s)
(Z : ℕ → Ω → ℝ) (hZ : ∀ n ω, Z n ω = Real.exp... | abstract | theorem q131_markov_modulated_threshold_bound {σ : Type*} [Fintype σ]
(μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(Y : ℕ → Ω → σ) (S : ℕ → Ω → ℝ) (rstar : ℝ) (hr : 0 < rstar)
(ν : σ → ℝ) (νmin : ℝ) (hνmin : 0 < νmin) (hν : ∀ s, νmin ≤ ν s)
(Z : ℕ → Ω → ℝ) (hZ : ∀ n ω, Z n ω = Real.exp... | 207 | Random walks & large deviations | null |
132 | stochastic_processes_mm1_expected_queue_delay | Consider an M/M/1 queue in steady state with arrival rate λ, service rate μ, and ρ = λ/μ < 1.
Show that the expected waiting time in queue (excluding service) is ρ/(μ − λ). | theorem q132_mm1_expected_queue_delay
(lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu) (hstab : lam < mu)
(ρ : ℝ) (hρ : ρ = lam / mu) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
(p : ℕ → ℝ) (hp : ∀ i, p i = (1 - ρ) * ρ ^ i)
(Wq Lq : ℝ) (hLq : Lq = ∑' k : ℕ, (k : ℝ) * p (k + 1))
(hLittle : Lq = lam * Wq) :
Wq = ρ / ... | abstract | theorem q132_mm1_expected_queue_delay
(lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu) (hstab : lam < mu)
(ρ : ℝ) (hρ : ρ = lam / mu) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
(p : ℕ → ℝ) (hp : ∀ i, p i = (1 - ρ) * ρ ^ i)
(Wq Lq : ℝ) (hLq : Lq = ∑' k : ℕ, (k : ℝ) * p (k + 1))
(hLittle : Lq = lam * Wq) :
Wq = ρ / ... | 214 | Continuous-time Markov & queues | null |
136 | stochastic_processes_three_state_cycle_nonreversible | Let (X_n) be an irreducible positive-recurrent Markov chain with stationary distribution π containing three states i, j, k.
Show that the chain is reversible only if P_{ij} P_{jk} P_{ki} = P_{ik} P_{kj} P_{ji}; if this product condition fails on any cycle, the chain is not reversible. | theorem q136_three_state_cycle
{S : Type*}
(P : S → S → ℝ) (π : S → ℝ) (hπpos : ∀ s, 0 < π s)
(hDB : ∀ a b, π a * P a b = π b * P b a)
(i j k : S) :
P i j * P j k * P k i = P i k * P k j * P j i := by
sorry | abstract | theorem q136_three_state_cycle
{S : Type*}
(P : S → S → ℝ) (π : S → ℝ) (hπpos : ∀ s, 0 < π s)
(hDB : ∀ a b, π a * P a b = π b * P b a)
(i j k : S) :
P i j * P j k * P k i = P i k * P k j * P j i := by
have h1 := hDB i j
have h2 := hDB j k
have h3 := hDB k i
have hpos : π i * π j * π k ≠ 0 :=... | 49 | Markov chains (finite & countable) | null |
140 | stochastic_processes_birth_death_null_recurrent_boundary | Consider an irreducible birth-death chain on the nonnegative integers with ρ_i = p_i/q_{i+1} and ∏_{j<i} ρ_j = 1 for all i.
Show that the chain is recurrent but not positive-recurrent. | theorem q140_birth_death_null_recurrent_boundary
(p q : ℕ → ℝ)
(hp : ∀ i, 0 < p i) (hq0 : q 0 = 0) (hqpos : ∀ i, 0 < q (i + 1))
(hbound : ∀ i, p i + q i ≤ 1)
(ρ : ℕ → ℝ) (hρ : ∀ i, ρ i = p i / q (i + 1))
(hprod : ∀ i, ∏ j ∈ Finset.range i, ρ j = 1) :
(¬ Summable (fun n : ℕ => 1 / (p n * ∏ j ∈ Fi... | abstract | theorem q140_birth_death_null_recurrent_boundary
(p q : ℕ → ℝ)
(hp : ∀ i, 0 < p i) (hq0 : q 0 = 0) (hqpos : ∀ i, 0 < q (i + 1))
(hbound : ∀ i, p i + q i ≤ 1)
(ρ : ℕ → ℝ) (hρ : ∀ i, ρ i = p i / q (i + 1))
(hprod : ∀ i, ∏ j ∈ Finset.range i, ρ j = 1) :
(¬ Summable (fun n : ℕ => 1 / (p n * ∏ j ∈ Fi... | 131 | Markov chains (finite & countable) | null |
141 | stochastic_processes_submartingale_1 | Let (X_n)_{n ≥ 0} be a martingale, and let ϕ be a convex function.
Show that (ϕ(X_n))_{n ≥ 0} is a submartingale. | theorem q141_convex_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (φ : ℝ → ℝ) (hconv : ConvexOn ℝ Set.univ φ)
(hint : ∀ n, Integrable (fun ω => φ (X n ω)) μ) :
Submartingale (fun n ω => φ (X n ω)) ℱ μ := by sorry | literal | theorem q141_convex_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (φ : ℝ → ℝ) (hconv : ConvexOn ℝ Set.univ φ)
(hint : ∀ n, Integrable (fun ω => φ (X n ω)) μ) :
Submartingale (fun n ω => φ (X n ω)) ℱ μ := by
have hcont : Continuous φ :=... | 304 | Martingales & stopping | null |
143 | stochastic_processes_convergence_theorem_2 | Suppose that (X_n)_n is a Markov chain with transition matrix P.
Assume that P is irreducible and aperiodic.
Show that there exists r such that P^r (x, y) > 0 for all x,y ∈ Ω. | theorem q143_convergence_primitive {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)
(haper : IsAperiodic P) :
IsPrimitive P := by sorry | literal | theorem q143_convergence_primitive {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)
(haper : IsAperiodic P) :
IsPrimitive P := by
have hPnn := hP.1
have hpow_nonneg : ∀ (k : ℕ) (i j : Ω), 0 ≤ (P ^ k) i j := by
intro k
induction k with
... | 132 | Markov chains (finite & countable) | null |
145 | stochastic_processes_two_threshold_possible_values | Let (S_n) be a random walk with i.i.d. steps in {−1,0,1} and mean 0, stopped at the first trial J with S_n ≥ a or S_n ≤ b for integer thresholds a > 0 > b.
Show that S_J ∈ {a, b}, i.e. the stopped walk lands exactly on a threshold with no overshoot. | theorem q145_two_threshold_possible_values (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hstepval : ∀ i ω, X i ω = -1 ∨ X i ω = 0 ∨ X i ω = 1)
(hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)
(a b : ℤ) (ha... | abstract | theorem q145_two_threshold_possible_values (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hstepval : ∀ i ω, X i ω = -1 ∨ X i ω = 0 ∨ X i ω = 1)
(hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(S : ℕ → Ω → ℝ) (hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, X i ω)
(a b : ℤ) (ha... | 53 | Random walks & large deviations | null |
147 | stochastic_processes_continuity_wp1 | Let (Z_n) be random variables with Z_n → α with probability 1, and let f be continuous at α.
Show that f(Z_n) → f(α) with probability 1. | theorem q147_continuity_wp1 (μ : Measure Ω)
(Z : ℕ → Ω → ℝ) (α : ℝ) (f : ℝ → ℝ) (hf : ContinuousAt f α)
(hZ : ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 α)) :
∀ᵐ ω ∂μ, Tendsto (fun n => f (Z n ω)) atTop (𝓝 (f α)) := by
sorry | literal | theorem q147_continuity_wp1 (μ : Measure Ω)
(Z : ℕ → Ω → ℝ) (α : ℝ) (f : ℝ → ℝ) (hf : ContinuousAt f α)
(hZ : ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 α)) :
∀ᵐ ω ∂μ, Tendsto (fun n => f (Z n ω)) atTop (𝓝 (f α)) := by
filter_upwards [hZ] with ω hω
exact (hf.tendsto).comp hω | 80 | Weak convergence & functional limits | null |
154 | stochastic_processes_column_range_monotone | Let [P] be the transition matrix of a finite-state Markov chain. For fixed j and n, let U_n = max_i P_{ij}^n and L_n = min_i P_{ij}^n.
Show that U_{n+1} ≤ U_n and L_{n+1} ≥ L_n, so the range of the jth column of [P]^n is nonincreasing in n. | theorem q154_column_range_monotone {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :
∀ (j : Ω) (n : ℕ),
(⨆ i, (P ^ (n + 1)) i j) ≤ (⨆ i, (P ^ n) i j) ∧
(⨅ i, (P ^ n) i j) ≤ (⨅ i, (P ^ (n + 1)) i j) := by
sorry | literal | theorem q154_column_range_monotone {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) :
∀ (j : Ω) (n : ℕ),
(⨆ i, (P ^ (n + 1)) i j) ≤ (⨆ i, (P ^ n) i j) ∧
(⨅ i, (P ^ n) i j) ≤ (⨅ i, (P ^ (n + 1)) i j) := by
obtain ⟨hnn, hrow⟩ := hP
intro j n
have hexp... | 76 | Markov chains (finite & countable) | null |
156 | stochastic_processes_geometric_brownian_mean | Let S(t) = S0 · exp(m t + σ B(t)) be a geometric Brownian motion, where B is standard Brownian motion (B(t) ~ Normal(0, t)). Show that its mean is E[S(t)] = S0 · exp((m + σ²/2) t). | theorem q156_geometric_brownian_mean (μ : Measure Ω) [IsProbabilityMeasure μ]
(B : ℝ → Ω → ℝ) (S0 mdrift σ : ℝ)
(hlaw : ∀ t : ℝ, 0 ≤ t → HasLaw (B t) (gaussianReal 0 t.toNNReal) μ)
(S : ℝ → Ω → ℝ) (hS : ∀ t ω, S t ω = S0 * Real.exp (mdrift * t + σ * B t ω))
(hint : ∀ t, Integrable (S t) μ) :
∀ t : ℝ... | abstract | theorem q156_geometric_brownian_mean (μ : Measure Ω) [IsProbabilityMeasure μ]
(B : ℝ → Ω → ℝ) (S0 mdrift σ : ℝ)
(hlaw : ∀ t : ℝ, 0 ≤ t → HasLaw (B t) (gaussianReal 0 t.toNNReal) μ)
(S : ℝ → Ω → ℝ) (hS : ∀ t ω, S t ω = S0 * Real.exp (mdrift * t + σ * B t ω))
(hint : ∀ t, Integrable (S t) μ) :
∀ t : ℝ... | 156 | Brownian motion & stochastic calculus | null |
157 | stochastic_processes_exponential_memoryless | Let X have an exponential distribution with rate r > 0. Show the memoryless property: for all s, t ≥ 0, P(X > s + t) = P(X > s) · P(X > t). | theorem q157_exponential_memoryless (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : Ω → ℝ) (r : ℝ) (hr : 0 < r) (hlaw : HasLaw X (expMeasure r) μ) :
∀ s t : ℝ, 0 ≤ s → 0 ≤ t →
(μ {ω | s + t < X ω}).toReal
= (μ {ω | s < X ω}).toReal * (μ {ω | t < X ω}).toReal := by
sorry | abstract | theorem q157_exponential_memoryless (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : Ω → ℝ) (r : ℝ) (hr : 0 < r) (hlaw : HasLaw X (expMeasure r) μ) :
∀ s t : ℝ, 0 ≤ s → 0 ≤ t →
(μ {ω | s + t < X ω}).toReal
= (μ {ω | s < X ω}).toReal * (μ {ω | t < X ω}).toReal := by
haveI hp : IsProbabilityMeasure (... | 156 | Poisson processes | null |
165 | stochastic_processes_gg1_idle_time_identity | Consider a G/G/1 queue with queue-length process Q and cumulative busy time B(t).
Show that the cumulative idle time satisfies I(t) = t − B(t) = ∫_0^t 1{Q(s) = 0} ds. | theorem q165_gg1_idle_time_identity
(Q : ℝ → ℕ) (hQmeas : Measurable Q) (B I : ℝ → ℝ)
(hbusy : ∀ t : ℝ, 0 ≤ t → B t = ∫ s in (0 : ℝ)..t, (if 0 < Q s then (1 : ℝ) else 0))
(hIdef : ∀ t, I t = t - B t) :
∀ t : ℝ, 0 ≤ t → I t = ∫ s in (0 : ℝ)..t, (if Q s = 0 then (1 : ℝ) else 0) := by
sorry | abstract | theorem q165_gg1_idle_time_identity
(Q : ℝ → ℕ) (hQmeas : Measurable Q) (B I : ℝ → ℝ)
(hbusy : ∀ t : ℝ, 0 ≤ t → B t = ∫ s in (0 : ℝ)..t, (if 0 < Q s then (1 : ℝ) else 0))
(hIdef : ∀ t, I t = t - B t) :
∀ t : ℝ, 0 ≤ t → I t = ∫ s in (0 : ℝ)..t, (if Q s = 0 then (1 : ℝ) else 0) := by
have hmeas : Measur... | 54 | Continuous-time Markov & queues | null |
168 | stochastic_processes_scaled_branching_martingale | Consider a branching process (X_n) with i.i.d. offspring counts of mean Ȳ, and let Z_n = X_n / Ȳ^n.
Show that (Z_n) is a martingale. | theorem q168_branching_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ)
(Ybar : ℝ) (hY : 0 < Ybar)
(hbranch : ∀ n, μ[X (n + 1) | ℱ n] =ᵐ[μ] fun ω => Ybar * X n ω) :
Martingale (fun n ω => X n ω / Ybar ^ n) ℱ ... | abstract | theorem q168_branching_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ)
(Ybar : ℝ) (hY : 0 < Ybar)
(hbranch : ∀ n, μ[X (n + 1) | ℱ n] =ᵐ[μ] fun ω => Ybar * X n ω) :
Martingale (fun n ω => X n ω / Ybar ^ n) ℱ ... | 207 | Martingales & stopping | null |
169 | stochastic_processes_gamblers_ruin_2 | Let X = (X_n)_{n ≥ 0} be Gambler’s ruin with state space Ω = {0, 1, 2, ..., N}:
X_0 = k, ℙ[X_{n + 1} = X_n + 1 | X_n] = 1/2, τ = min{n: X_n = 0 or N}.
You are given the martingale Y = (Yn := X_n^2 − n)_{n ≥ 0}.
Show that Y has bounded increments. | theorem q169_gambler_bounded_increments (μ : Measure Ω) [IsProbabilityMeasure μ] (N : ℕ)
(X : ℕ → Ω → ℝ) (hXbd : ∀ n ω, 0 ≤ X n ω ∧ X n ω ≤ N)
(hstep1 : ∀ n, ∀ᵐ ω ∂μ, |X (n + 1) ω - X n ω| = 1) :
∃ M : ℝ, ∀ n, ∀ᵐ ω ∂μ,
|((X (n + 1) ω) ^ 2 - (n + 1)) - ((X n ω) ^ 2 - n)| ≤ M := by sorry | literal | theorem q169_gambler_bounded_increments (μ : Measure Ω) [IsProbabilityMeasure μ] (N : ℕ)
(X : ℕ → Ω → ℝ) (hXbd : ∀ n ω, 0 ≤ X n ω ∧ X n ω ≤ N)
(hstep1 : ∀ n, ∀ᵐ ω ∂μ, |X (n + 1) ω - X n ω| = 1) :
∃ M : ℝ, ∀ n, ∀ᵐ ω ∂μ,
|((X (n + 1) ω) ^ 2 - (n + 1)) - ((X n ω) ^ 2 - n)| ≤ M := by
refine ⟨2 * N + 1, ... | 67 | Martingales & stopping | null |
177 | stochastic_processes_supermartingale_convergence | Let X = (X_n)_{n ≥ 0} be a non-negative supermartingale.
Show that X_n converges a.s. to some a.s. finite limit. | theorem q177_super_convergence (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ) (hnn : ∀ n ω, 0 ≤ X n ω) :
∃ Xinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => X n ω) atTop (𝓝 (Xinf ω)) := by sorry | literal | theorem q177_super_convergence (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ) (hnn : ∀ n ω, 0 ≤ X n ω) :
∃ Xinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => X n ω) atTop (𝓝 (Xinf ω)) := by
have hsub : Submartingale (-X) ℱ μ := hX.neg
have hint_le : ∀ n, ∫... | 273 | Martingales & stopping | null |
185 | stochastic_processes_stopped_martingale_preserves | Let (Z_n) be a martingale and let J be a stopping trial; let Z_n* be the stopped process (frozen at value Z_J for n ≥ J).
Show that (Z_n*) is also a martingale. | theorem q185_stopped_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (J : Ω → ℕ)
(hJ : IsStoppingTime ℱ (natStop J)) :
Martingale (stoppedProcess Z (natStop J)) ℱ μ := by
sorry | literal | theorem q185_stopped_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (J : Ω → ℕ)
(hJ : IsStoppingTime ℱ (natStop J)) :
Martingale (stoppedProcess Z (natStop J)) ℱ μ := by
have hneg : stoppedProcess (-Z) (natStop ... | 89 | Martingales & stopping | null |
187 | stochastic_processes_mm1_expected_delay | Consider an M/M/1 queue in steady state with arrival rate λ, service rate μ, and ρ = λ/μ < 1.
Show that the expected time a customer spends in the system is 1/(μ − λ). | theorem q187_mm1_expected_delay
(lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)
(ρ : ℝ) (hρ : ρ = lam / mu) (hρ1 : ρ < 1)
(p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)
(hbal0 : p 0 * lam = p 1 * mu)
(hbal : ∀ n, p (n + 1) * (lam + mu) = p n * lam + p (n + 2) * mu)
(L : ℝ) (hL : L = ∑' i ... | abstract | theorem q187_mm1_expected_delay
(lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)
(ρ : ℝ) (hρ : ρ = lam / mu) (hρ1 : ρ < 1)
(p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)
(hbal0 : p 0 * lam = p 1 * mu)
(hbal : ∀ n, p (n + 1) * (lam + mu) = p n * lam + p (n + 2) * mu)
(L : ℝ) (hL : L = ∑' i ... | 242 | Continuous-time Markov & queues | null |
188 | stochastic_processes_accessibility_transitive | Let (X_n) be a finite-state Markov chain, and say i → j if j is accessible from i.
Show that accessibility is transitive: if i → j and j → k then i → k. | theorem q188_accessibility_transitive {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (i j k : Ω)
(hij : ∃ m : ℕ, 0 < (P ^ m) i j) (hjk : ∃ n : ℕ, 0 < (P ^ n) j k) :
∃ p : ℕ, 0 < (P ^ p) i k := by
sorry | literal | theorem q188_accessibility_transitive {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (i j k : Ω)
(hij : ∃ m : ℕ, 0 < (P ^ m) i j) (hjk : ∃ n : ℕ, 0 < (P ^ n) j k) :
∃ p : ℕ, 0 < (P ^ p) i k := by
obtain ⟨m, hm⟩ := hij
obtain ⟨n, hn⟩ := hjk
-- nonnegativity of powers
... | 65 | Markov chains (finite & countable) | null |
189 | stochastic_processes_transitivity | For a transitive Markov chain on finite state space Ω, the uniform measure is stationary. | theorem q189_transitivity {Ω : Type*} [Fintype Ω] [Nonempty Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P)
(htrans : ∀ x y : Ω, ∃ φ : Ω ≃ Ω, φ x = y ∧ ∀ a b, P (φ a) (φ b) = P a b) :
IsStationary P (fun _ => 1 / (Fintype.card Ω : ℝ)) := by sorry | literal | theorem q189_transitivity {Ω : Type*} [Fintype Ω] [Nonempty Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P)
(htrans : ∀ x y : Ω, ∃ φ : Ω ≃ Ω, φ x = y ∧ ∀ a b, P (φ a) (φ b) = P a b) :
IsStationary P (fun _ => 1 / (Fintype.card Ω : ℝ)) := by
have hN : (Fintype.card Ω : ℝ) ≠ 0 := by exact_mod_cast Fintype.card_... | 160 | Markov chains (finite & countable) | null |
191 | stochastic_processes_doob_martingale_convergence | Let (X_n) be a supermartingale with sup_n E|X_n| < ∞.
Show that X_∞ = lim_{n→∞} X_n exists almost surely and satisfies E|X_∞| < ∞. | theorem q191_doob_martingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ)
(hbdd : ∃ C : ℝ, ∀ n, ∫ ω, |X n ω| ∂μ ≤ C) :
∃ Xinf : Ω → ℝ,
(∀ᵐ ω ∂μ, Tendsto (fun n => X n ω) atTop (𝓝 (Xinf ω))) ∧ Integrable Xinf μ := by
sorry | literal | theorem q191_doob_martingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ)
(hbdd : ∃ C : ℝ, ∀ n, ∫ ω, |X n ω| ∂μ ≤ C) :
∃ Xinf : Ω → ℝ,
(∀ᵐ ω ∂μ, Tendsto (fun n => X n ω) atTop (𝓝 (Xinf ω))) ∧ Integrable Xinf μ := by
obtain ⟨... | 207 | Martingales & stopping | null |
192 | stochastic_processes_brownian_exponential_martingale | For standard Brownian motion B and a real parameter θ, the exponential process exp(θ B(t) − θ² t / 2) is a martingale with respect to the natural filtration. | theorem q192_brownian_exponential_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ) (θ : ℝ)
(hadap : Adapted ℱ B)
(hint : ∀ t, Integrable (fun ω => Real.exp (θ * B t ω - θ ^ 2 * t / 2)) μ)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => B t ω - B s ω) (... | abstract | theorem q192_brownian_exponential_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℝ m0) (B : ℝ → Ω → ℝ) (θ : ℝ)
(hadap : Adapted ℱ B)
(hint : ∀ t, Integrable (fun ω => Real.exp (θ * B t ω - θ ^ 2 * t / 2)) μ)
(hincr : ∀ s t : ℝ, 0 ≤ s → s ≤ t →
HasLaw (fun ω => B t ω - B s ω) (... | 156 | Brownian motion & stochastic calculus | null |
193 | stochastic_processes_sprt_generating_function_root | Consider a sequential probability ratio test whose per-observation log-likelihood ratio under hypothesis 1 has semi-invariant generating function γ_1(r) = ln ∫ f_{Y|H}(y|1)^{1−r} f_{Y|H}(y|0)^r dy.
Show that γ_1(1) = 0, so that r* = 1 is the relevant root for applying Wald's identity to the log-likelihood-ratio walk. | theorem q193_sprt_generating_function_root {α : Type*} [MeasurableSpace α] (ν : Measure α)
(f0 f1 : α → ℝ) (hf0 : ∫ y, f0 y ∂ν = 1)
(γ₁ : ℝ → ℝ)
(hγ : ∀ r, γ₁ r = Real.log (∫ y, (f1 y) ^ (1 - r) * (f0 y) ^ r ∂ν)) :
γ₁ 1 = 0 := by
sorry | literal | theorem q193_sprt_generating_function_root {α : Type*} [MeasurableSpace α] (ν : Measure α)
(f0 f1 : α → ℝ) (hf0 : ∫ y, f0 y ∂ν = 1)
(γ₁ : ℝ → ℝ)
(hγ : ∀ r, γ₁ r = Real.log (∫ y, (f1 y) ^ (1 - r) * (f0 y) ^ r ∂ν)) :
γ₁ 1 = 0 := by
rw [hγ]
have : (∫ y, (f1 y) ^ (1 - (1:ℝ)) * (f0 y) ^ (1:ℝ) ∂ν) = 1 := ... | 44 | Random walks & large deviations | null |
194 | stochastic_processes_stopping_time_indicator_predictable | Let τ be a stopping time with respect to a filtration (F_n).
Show that H_n = 1{τ ≥ n} is predictable. | theorem q194_stopping_time_indicator_predictable
(ℱ : Filtration ℕ m0) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :
IsStronglyPredictable ℱ
(fun n ω => Set.indicator {ω | n ≤ T ω} (fun _ => (1 : ℝ)) ω) := by
sorry | literal | theorem q194_stopping_time_indicator_predictable
(ℱ : Filtration ℕ m0) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :
IsStronglyPredictable ℱ
(fun n ω => Set.indicator {ω | n ≤ T ω} (fun _ => (1 : ℝ)) ω) := by
refine IsStronglyPredictable.of_measurable_add_one ?_ ?_
· have hset : {ω : Ω | (0 : ℕ) ≤... | 560 | Martingales & stopping | null |
195 | stochastic_processes_no_arbitrage_riskless | Consider a market with a bond of rate r and a risky asset with volatility σ = 0.
Show that the absence of arbitrage forces the drift to satisfy μ = r. | theorem q195_no_arbitrage_riskless
(r μ S₀ : ℝ) (hS₀ : 0 < S₀)
(hnoarb : ∀ t : ℝ, Real.exp (-(r * t)) * (S₀ * Real.exp (μ * t)) = S₀) :
μ = r := by
sorry | abstract | theorem q195_no_arbitrage_riskless
(r μ S₀ : ℝ) (hS₀ : 0 < S₀)
(hnoarb : ∀ t : ℝ, Real.exp (-(r * t)) * (S₀ * Real.exp (μ * t)) = S₀) :
μ = r := by
have h := hnoarb 1
simp only [mul_one] at h
have key : Real.exp (-r) * Real.exp μ = 1 :=
mul_left_cancel₀ (ne_of_gt hS₀) (by rw [mul_one]; linear_comb... | 84 | Brownian motion & stochastic calculus | null |
200 | stochastic_processes_gg1_workload_representation | Consider a G/G/1 queue with arrival process A, service process S, cumulative busy time B(t), and workload Z(t). Let X(t) = V(Q(0) + A(t)) − t and I(t) = t − B(t).
Show that Z(t) = X(t) + I(t) with Z(t) ≥ 0, that I is non-decreasing with I(0)=0, and that ∫_0^∞ Z(t) dI(t) = 0. | theorem q200_gg1_workload_representation
(W B X I Z : ℝ → ℝ)
(hXdef : ∀ t, X t = W t - t)
(hIdef : ∀ t, I t = t - B t)
(hZdef : ∀ t, Z t = W t - B t)
(hW0 : 0 ≤ W 0) (hB0 : B 0 = 0)
(hrate : ∀ s t : ℝ, s ≤ t → B t - B s ≤ t - s)
(hcap : ∀ t, B t ≤ W t)
(hbusy : ∀ s t : ℝ, s ≤ t → (∀ u ∈ ... | abstract | theorem q200_gg1_workload_representation
(W B X I Z : ℝ → ℝ)
(hXdef : ∀ t, X t = W t - t)
(hIdef : ∀ t, I t = t - B t)
(hZdef : ∀ t, Z t = W t - B t)
(hW0 : 0 ≤ W 0) (hB0 : B 0 = 0)
(hrate : ∀ s t : ℝ, s ≤ t → B t - B s ≤ t - s)
(hcap : ∀ t, B t ≤ W t)
(hbusy : ∀ s t : ℝ, s ≤ t → (∀ u ∈ ... | 40 | Continuous-time Markov & queues | null |
202 | stochastic_processes_strong_stationary_time_2 | Let (X_n)_{n ≥ 0} be an irreducible Markov chain with stationary measure π.
Let τ be a strong stationary time for (X_n).
Let the separation distance be S_x (n) = max_y (1 − P^n (x, y) / π(y)).
Show that S_x (n) ≤ ℙ_x [τ > n]. | theorem q202_sst_sep {Ω' : Type*} [MeasurableSpace Ω'] (μ : Measure Ω') [IsProbabilityMeasure μ]
{Ω : Type*} [Fintype Ω] [DecidableEq Ω] (P : Matrix Ω Ω ℝ) (π : Ω → ℝ) (hπpos : ∀ x, 0 < π x)
(x0 : Ω) (X : ℕ → Ω' → Ω) (τ : Ω' → ℕ)
(hmarg : HasMatrixMarginals μ X P x0)
(hsst : IsStrongStationary μ X τ π)
... | abstract | theorem q202_sst_sep {Ω' : Type*} [MeasurableSpace Ω'] (μ : Measure Ω') [IsProbabilityMeasure μ]
{Ω : Type*} [Fintype Ω] [DecidableEq Ω] (P : Matrix Ω Ω ℝ) (π : Ω → ℝ) (hπpos : ∀ x, 0 < π x)
(x0 : Ω) (X : ℕ → Ω' → Ω) (τ : Ω' → ℕ)
(hmarg : HasMatrixMarginals μ X P x0)
(hsst : IsStrongStationary μ X τ π)
... | 127 | Markov chains (finite & countable) | null |
206 | stochastic_processes_ctmc_guess_verify_reversal | Let (X(t)) be an irreducible continuous-time Markov chain with rates q_{ij}. Suppose a distribution (p_i) and candidate backward rates q*_{ij} satisfy Σ_j q_{ij} = Σ_j q*_{ij} and p_i q_{ij} = p_j q*_{ji} for all i, j.
Show that (p_i) is the steady-state distribution and (q*_{ij}) are the transition rates of the time-... | theorem q206_ctmc_guess_verify_reversal {S : Type*} [Countable S]
(q : S → S → ℝ) (hq0 : ∀ i j, 0 ≤ q i j) (hqloop : ∀ i, q i i = 0)
(hqSum : ∀ i, Summable (q i))
(qstar : S → S → ℝ) (hqs0 : ∀ i j, 0 ≤ qstar i j) (hqsloop : ∀ i, qstar i i = 0)
(hqstarSum : ∀ i, Summable (qstar i))
(p : S → ℝ) (hppos... | abstract | theorem q206_ctmc_guess_verify_reversal {S : Type*} [Countable S]
(q : S → S → ℝ) (hq0 : ∀ i j, 0 ≤ q i j) (hqloop : ∀ i, q i i = 0)
(hqSum : ∀ i, Summable (q i))
(qstar : S → S → ℝ) (hqs0 : ∀ i j, 0 ≤ qstar i j) (hqsloop : ∀ i, qstar i i = 0)
(hqstarSum : ∀ i, Summable (qstar i))
(p : S → ℝ) (hppos... | 65 | Continuous-time Markov & queues | null |
207 | stochastic_processes_mm1_process_geometric | Consider an M/M/1 queue as a continuous-time birth-death process with ρ = λ/μ < 1.
Show that the fraction of time the system contains exactly i customers is (1 − ρ) ρ^i. | theorem q207_mm1_process_geometric
(lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)
(ρ : ℝ) (hρ : ρ = lam / mu) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
(p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)
(hbal0 : p 0 * lam = p 1 * mu)
(hbal : ∀ n, p (n + 1) * (lam + mu) = p n * lam + p (n + 2) * mu) :
∀ i,... | abstract | theorem q207_mm1_process_geometric
(lam mu : ℝ) (hlam : 0 < lam) (hmu : 0 < mu)
(ρ : ℝ) (hρ : ρ = lam / mu) (hρ0 : 0 < ρ) (hρ1 : ρ < 1)
(p : ℕ → ℝ) (hp0 : ∀ i, 0 ≤ p i) (hpsum : ∑' i, p i = 1)
(hbal0 : p 0 * lam = p 1 * mu)
(hbal : ∀ n, p (n + 1) * (lam + mu) = p n * lam + p (n + 2) * mu) :
∀ i,... | 141 | Continuous-time Markov & queues | null |
210 | stochastic_processes_stopped_supermartingale_preserves | Let (Z_n) be a supermartingale and let J be a stopping trial with stopped process (Z_n*).
Show that (Z_n*) is also a supermartingale. | theorem q210_stopped_supermartingale_preserves (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]
(Z : ℕ → Ω → ℝ) (hZ : Supermartingale Z ℱ μ)
(J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) :
Supermartingale (stoppedProcess Z (natStop J)) ℱ μ := by
sorry | literal | theorem q210_stopped_supermartingale_preserves (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]
(Z : ℕ → Ω → ℝ) (hZ : Supermartingale Z ℱ μ)
(J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) :
Supermartingale (stoppedProcess Z (natStop J)) ℱ μ := by
have h1 : Su... | 777 | Martingales & stopping | null |
212 | stochastic_processes_jackson_reverse_process | Consider an open Jackson network in steady state.
Show that the time-reversed process is itself a Jackson network, with service rates unchanged and routing probabilities Q*_{ij} = λ_j Q_{ji} / λ_i. | theorem q212_jackson_reverse_process
(k : ℕ) (γ : Fin k → ℝ) (Q : Fin k → Fin k → ℝ) (Q0 : Fin k → ℝ)
(hQ : ∀ i j, 0 ≤ Q i j) (hcons : ∀ i, Q0 i + ∑ j, Q i j = 1)
(lam : Fin k → ℝ) (hlam : ∀ i, 0 < lam i)
(htraffic : ∀ j, lam j = γ j + ∑ i, lam i * Q i j)
(Qstar : Fin k → Fin k → ℝ) (hQstar : ∀ i j,... | abstract | theorem q212_jackson_reverse_process
(k : ℕ) (γ : Fin k → ℝ) (Q : Fin k → Fin k → ℝ) (Q0 : Fin k → ℝ)
(hQ : ∀ i j, 0 ≤ Q i j) (hcons : ∀ i, Q0 i + ∑ j, Q i j = 1)
(lam : Fin k → ℝ) (hlam : ∀ i, 0 < lam i)
(htraffic : ∀ j, lam j = γ j + ∑ i, lam i * Q i j)
(Qstar : Fin k → Fin k → ℝ) (hQstar : ∀ i j,... | 167 | Continuous-time Markov & queues | null |
213 | stochastic_processes_aperiodicity | Suppose that P is irreducible and aperiodic.
Show that there exists an integer r such that P^n (x, y) > 0, ∀x,y ∈ Ω, ∀n ≥ r. | theorem q213_aperiodicity {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)
(haper : IsAperiodic P) :
IsPrimitive P := by sorry | literal | theorem q213_aperiodicity {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)
(haper : IsAperiodic P) :
IsPrimitive P := by
have hPnn : ∀ n : ℕ, ∀ i j : Ω, 0 ≤ (P ^ n) i j := by
intro n
induction n with
| zero =>
intro i j
rw [p... | 197 | Markov chains (finite & countable) | null |
214 | stochastic_processes_irreducibility | Let P be irreducible.
Show that gcd(T(x)) = gcd(T(y)) for all x, y ∈ Ω. | theorem q214_irreducibility_gcd {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P) :
∀ x y : Ω, ∀ d : ℕ,
(∀ n, 0 < (P ^ n) x x → d ∣ n) ↔ (∀ n, 0 < (P ^ n) y y → d ∣ n) := by sorry | literal | theorem q214_irreducibility_gcd {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P) :
∀ x y : Ω, ∀ d : ℕ,
(∀ n, 0 < (P ^ n) x x → d ∣ n) ↔ (∀ n, 0 < (P ^ n) y y → d ∣ n) := by
have hnn : ∀ n : ℕ, ∀ a b, 0 ≤ (P ^ n) a b := by
intro n
induction... | 54 | Markov chains (finite & countable) | null |
217 | stochastic_processes_doob_decomposition | Let (X_n) be a submartingale adapted to a filtration (F_n).
Show that X_n admits a decomposition X_n = M_n + A_n where (M_n) is a martingale and (A_n) is almost surely non-decreasing and predictable, and that this decomposition is unique. | theorem q217_doob_decomposition (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ) :
∃ M A : ℕ → Ω → ℝ,
Martingale M ℱ μ ∧
IsStronglyPredictable ℱ A ∧
A 0 = 0 ∧
(∀ᵐ ω ∂μ, Monotone fun n => A n ω) ∧
(∀ n, X n =ᵐ[μ] fun ω => M n ... | literal | theorem q217_doob_decomposition (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (X : ℕ → Ω → ℝ) (hX : Submartingale X ℱ μ) :
∃ M A : ℕ → Ω → ℝ,
Martingale M ℱ μ ∧
IsStronglyPredictable ℱ A ∧
A 0 = 0 ∧
(∀ᵐ ω ∂μ, Monotone fun n => A n ω) ∧
(∀ n, X n =ᵐ[μ] fun ω => M n ... | 235 | Martingales & stopping | null |
218 | stochastic_processes_strong_stationary_time_4 | Let (X_n)_{n ≥ 0} be an irreducible Markov chain with stationary measure π.
Let τ be a strong stationary time for (X_n).
Show that max_x ||P^n (x, ·) − π||_{TV} ≤ max_x ℙ_x [τ > n]. | theorem q218_sst_tv {Ω' : Type*} [MeasurableSpace Ω'] (μ : Measure Ω') [IsProbabilityMeasure μ]
{Ω : Type*} [Fintype Ω] [DecidableEq Ω] (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)
(π : Ω → ℝ) (hπ : IsStationary P π) (x0 : Ω) (X : ℕ → Ω' → Ω) (τ : Ω' → ℕ)
(hmarg : HasMatrixMarginals μ X P x0)
(hsst : IsStro... | abstract | theorem q218_sst_tv {Ω' : Type*} [MeasurableSpace Ω'] (μ : Measure Ω') [IsProbabilityMeasure μ]
{Ω : Type*} [Fintype Ω] [DecidableEq Ω] (P : Matrix Ω Ω ℝ) (hP : IsStochastic P)
(π : Ω → ℝ) (hπ : IsStationary P π) (x0 : Ω) (X : ℕ → Ω' → Ω) (τ : Ω' → ℕ)
(hmarg : HasMatrixMarginals μ X P x0)
(hsst : IsStro... | 61 | Markov chains (finite & countable) | null |
220 | stochastic_processes_poisson_conditional_two_intervals | Let (N(t)) be a Poisson process of rate λ and let 0 < s < t.
Show that the conditional distribution of N(s) given N(t) = n is binomial with parameters n and s/t. | theorem q220_poisson_conditional_binomial (μ : Measure Ω) [IsProbabilityMeasure μ]
(lam s t : ℝ≥0) (hlam : 0 < lam) (hs : 0 < s) (hst : s < t)
(N : ℝ≥0 → Ω → ℕ)
(hNs : HasLaw (N s) (poissonMeasure (lam * s)) μ)
(hNincr : HasLaw (fun ω => N t ω - N s ω) (poissonMeasure (lam * (t - s))) μ)
(hindep : I... | abstract | theorem q220_poisson_conditional_binomial (μ : Measure Ω) [IsProbabilityMeasure μ]
(lam s t : ℝ≥0) (hlam : 0 < lam) (hs : 0 < s) (hst : s < t)
(N : ℝ≥0 → Ω → ℕ)
(hNs : HasLaw (N s) (poissonMeasure (lam * s)) μ)
(hNincr : HasLaw (fun ω => N t ω - N s ω) (poissonMeasure (lam * (t - s))) μ)
(hindep : I... | 368 | Poisson processes | null |
221 | stochastic_processes_finite_chain_aperiodic_self_loop | Let (X_n) be an irreducible finite-state Markov chain in which some state i has P_{ii} > 0.
Show that the chain is aperiodic. | theorem q221_finite_chain_aperiodic_self_loop {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)
(i : Ω) (hself : 0 < P i i) :
IsAperiodic P := by
sorry | abstract | theorem q221_finite_chain_aperiodic_self_loop {Ω : Type*} [Fintype Ω] [DecidableEq Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P)
(i : Ω) (hself : 0 < P i i) :
IsAperiodic P := by
have hnn : ∀ (n : ℕ) (u v : Ω), 0 ≤ (P ^ n) u v := by
intro n
induction n with
| zero =>
... | 197 | Markov chains (finite & countable) | null |
222 | stochastic_processes_stationary_existance_1 | Suppose that P is irreducible.
Show that there exists a probability measure π such that π = πP and π(x) > 0 for all x ∈ Ω. | theorem q222_stationary_existence_positive {Ω : Type*} [Fintype Ω] [DecidableEq Ω] [Nonempty Ω]
(P : Matrix Ω Ω ℝ) (hP : IsStochastic P) (hirr : IsIrreducible P) :
∃ π : Ω → ℝ, IsStationary P π ∧ ∀ x, 0 < π x := by sorry | literal | private def stepMap {Ω : Type*} [Fintype Ω] (P : Matrix Ω Ω ℝ) (v : Ω → ℝ) : Ω → ℝ :=
fun y => ∑ x, v x * P x y
/-- Cesàro averages of the iterates of `stepMap P` started at `v0`. -/
private noncomputable def cesaro {Ω : Type*} [Fintype Ω] (P : Matrix Ω Ω ℝ) (v0 : Ω → ℝ)
(N : ℕ) : Ω → ℝ :=
fun y => (1 / (N + 1... | 194 | Markov chains (finite & countable) | null |
227 | stochastic_processes_random_walk_graph | Show that the stationary distribution for the simple random walk on the graph is deg(x)/(2|E|). | theorem q227_random_walk_graph {V : Type*} [Fintype V]
(G : SimpleGraph V) [DecidableRel G.Adj] (hd : ∀ x, 0 < G.degree x)
(P : Matrix V V ℝ) (hP : ∀ x y, P x y = if G.Adj x y then 1 / (G.degree x : ℝ) else 0)
(π : V → ℝ) (hπ : ∀ x, π x = (G.degree x : ℝ) / (2 * G.edgeFinset.card)) :
∀ y, ∑ x, π x * P x... | literal | theorem q227_random_walk_graph {V : Type*} [Fintype V]
(G : SimpleGraph V) [DecidableRel G.Adj] (hd : ∀ x, 0 < G.degree x)
(P : Matrix V V ℝ) (hP : ∀ x y, P x y = if G.Adj x y then 1 / (G.degree x : ℝ) else 0)
(π : V → ℝ) (hπ : ∀ x, π x = (G.degree x : ℝ) / (2 * G.edgeFinset.card)) :
∀ y, ∑ x, π x * P x... | 375 | Markov chains (finite & countable) | null |
228 | stochastic_processes_kolmogorov_submartingale_inequality | Let (Z_n) be a nonnegative submartingale.
Show that for every a > 0 and m ≥ 1, Pr[max_{1 ≤ i ≤ m} Z_i ≥ a] ≤ E[Z_m]/a. | theorem q228_kolmogorov_submartingale_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)
(hnn : ∀ n ω, 0 ≤ Z n ω) (a : ℝ) (ha : 0 < a) (m : ℕ) (hm : 1 ≤ m) :
(μ {ω | a ≤ runningMax Z m ω}).toReal ≤ (∫ ω, Z m ω ∂μ) / a := by
sorry | literal | theorem q228_kolmogorov_submartingale_inequality (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Submartingale Z ℱ μ)
(hnn : ∀ n ω, 0 ≤ Z n ω) (a : ℝ) (ha : 0 < a) (m : ℕ) (hm : 1 ≤ m) :
(μ {ω | a ≤ runningMax Z m ω}).toReal ≤ (∫ ω, Z m ω ∂μ) / a := by
have hrm : ∀ ω, ... | 120 | Martingales & stopping | null |
230 | stochastic_processes_detailed_balance_stationary | If a probability distribution π satisfies the detailed balance equations π(x) P(x, y) = π(y) P(y, x) for a stochastic matrix P, then π is stationary for P. | theorem q230_detailed_balance_stationary {S : Type*} [Fintype S]
(P : Matrix S S ℝ) (hP : IsStochastic P)
(π : S → ℝ) (hπnn : ∀ x, 0 ≤ π x) (hπ1 : ∑ x, π x = 1)
(hdb : DetailedBalance P π) :
IsStationary P π := by
sorry | abstract | theorem q230_detailed_balance_stationary {S : Type*} [Fintype S]
(P : Matrix S S ℝ) (hP : IsStochastic P)
(π : S → ℝ) (hπnn : ∀ x, 0 ≤ π x) (hπ1 : ∑ x, π x = 1)
(hdb : DetailedBalance P π) :
IsStationary P π := by
refine ⟨hπnn, hπ1, ?_⟩
intro y
have h : ∑ x, π x * P x y = ∑ x, π y * P y x := by
... | 40 | Markov chains (finite & countable) | null |
231 | stochastic_processes_supermartingale_stopping_time_1 | Let (X_n)_{n ≥ 0} be a supermartingale. Suppose that X is a non-negative supermartingale,
and let T be a stopping time which is finite a.s.
Show that 𝔼[X_T] ≤ 𝔼[X_0]. | theorem q231_super_nonneg (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ)
(hnn : ∀ n ω, 0 ≤ X n ω) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :
∫ ω, stoppedValue X (natStop T) ω ∂μ ≤ ∫ ω, X 0 ω ∂μ := by sorry | literal | theorem q231_super_nonneg (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Supermartingale X ℱ μ)
(hnn : ∀ n ω, 0 ≤ X n ω) (T : Ω → ℕ) (hT : IsStoppingTime ℱ (natStop T)) :
∫ ω, stoppedValue X (natStop T) ω ∂μ ≤ ∫ ω, X 0 ω ∂μ := by
set g : Ω ... | 85 | Martingales & stopping | null |
234 | stochastic_processes_dependent_zero_mean_martingale | Let (X_i) be random variables with E[|X_i|] < ∞ and E[X_i | X_{i−1}, …, X_1] = 0 for all i ≥ 2, with E[X_1] = 0, and let Z_n = X_1 + … + X_n.
Show that (Z_n) is a zero-mean martingale. | theorem q234_mds_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ)
(hmean0 : ∫ ω, X 0 ω ∂μ = 0)
(hmds : ∀ n, μ[X (n + 1) | ℱ n] =ᵐ[μ] 0) :
Martingale (fun n ω => ∑ i ∈ Finset.range (n + 1), X i ω) ℱ μ := by
... | literal | theorem q234_mds_martingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ)
(hmean0 : ∫ ω, X 0 ω ∂μ = 0)
(hmds : ∀ n, μ[X (n + 1) | ℱ n] =ᵐ[μ] 0) :
Martingale (fun n ω => ∑ i ∈ Finset.range (n + 1), X i ω) ℱ μ := by
... | 472 | Martingales & stopping | null |
244 | stochastic_processes_submartingale_2 | Consider biased gambler’s ruin: at each step, the gambler gains one dollar
with probability p and losses one dollar with probability (1 − p).
Let X_n be the money in purse at time n.
Show that if p > 1/2, then (X_n) is a submartingale. | theorem q244_gambler_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ) (p : ℝ) (hp : 1 / 2 < p)
(hstep : IsConstDrift μ ℱ X (2 * p - 1)) :
Submartingale X ℱ μ := by sorry | literal | theorem q244_gambler_submartingale (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(X : ℕ → Ω → ℝ) (hadap : Adapted ℱ X) (hint : ∀ n, Integrable (X n) μ) (p : ℝ) (hp : 1 / 2 < p)
(hstep : IsConstDrift μ ℱ X (2 * p - 1)) :
Submartingale X ℱ μ := by
apply submartingale_of_condExp_sub_nonneg_n... | 60 | Martingales & stopping | null |
245 | stochastic_processes_martingale_partial_isolation | Let (Z_n) be a martingale.
Show that for any n > i ≥ 1, E[Z_n | Z_i, Z_{i−1}, …, Z_1] = Z_i, and consequently E[Z_n] = E[Z_1]. | theorem q245_martingale_tower (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (i n : ℕ) (hin : i ≤ n) :
μ[Z n | ℱ i] =ᵐ[μ] Z i ∧ ∫ ω, Z n ω ∂μ = ∫ ω, Z i ω ∂μ := by
sorry | literal | theorem q245_martingale_tower (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
(Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ) (i n : ℕ) (hin : i ≤ n) :
μ[Z n | ℱ i] =ᵐ[μ] Z i ∧ ∫ ω, Z n ω ∂μ = ∫ ω, Z i ω ∂μ := by
refine ⟨hZ.condExp_ae_eq hin, ?_⟩
have h1 : ∫ ω, (μ[Z n | ℱ i]) ω ∂μ = ∫ ω, Z n ω ∂μ := ... | 46 | Martingales & stopping | null |
248 | stochastic_processes_sprt_expected_sample_size | Consider a sequential probability ratio test with thresholds α > 0 and β < 0, stopping at trial J, where the per-observation log-likelihood ratio Z has E[Z | H = 0] > 0.
Show that E[J | H = 0] = (α Pr[cross α | H=0] + β Pr[cross β | H=0]) / E[Z | H = 0] by Wald's equality. | theorem q248_sprt_expected_sample_size (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]
(Z S M : ℕ → Ω → ℝ) (d : ℝ) (hd : 0 < d)
(hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, Z i ω)
(hmean : ∫ ω, Z 0 ω ∂μ = d)
(hM : ∀ n ω, M n ω = S n ω - (n : ℝ) * d)
(hMma... | abstract | theorem q248_sprt_expected_sample_size (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]
(Z S M : ℕ → Ω → ℝ) (d : ℝ) (hd : 0 < d)
(hS : ∀ n ω, S n ω = ∑ i ∈ Finset.range n, Z i ω)
(hmean : ∫ ω, Z 0 ω ∂μ = d)
(hM : ∀ n ω, M n ω = S n ω - (n : ℝ) * d)
(hMma... | 815 | Random walks & large deviations | null |
251 | stochastic_processes_random_walk_recurrent_2 | Show that simple random walk on ℤ^1 is recurrent. | theorem q251_z1_recurrent :
¬ Summable (fun n : ℕ => (Nat.choose (2 * n) n : ℝ) / (4 : ℝ) ^ n) := by sorry | abstract | theorem q251_z1_recurrent :
¬ Summable (fun n : ℕ => (Nat.choose (2 * n) n : ℝ) / (4 : ℝ) ^ n) := by
intro hs
have key : Summable (fun n : ℕ => (1/2) * (1/((n:ℝ)+1))) := by
apply Summable.of_nonneg_of_le (g := fun n : ℕ => (1/2) * (1/((n:ℝ)+1)))
(f := fun n : ℕ => (Nat.choose (2 * n) n : ℝ) / (4 : ℝ) ... | 119 | Random walks & large deviations | null |
252 | stochastic_processes_birth_death_balance_equation | Consider an irreducible positive-recurrent birth-death Markov chain on {0,1,2,…} with stationary distribution π, up-probability p_i and down-probability q_{i+1}.
Show that the stationary distribution satisfies the detailed balance relation π_i p_i = π_{i+1} q_{i+1} for all i ≥ 0. | theorem q252_birth_death_detailed_balance
(p q π : ℕ → ℝ)
(hp : ∀ i, 0 ≤ p i) (hq : ∀ i, 0 ≤ q i) (hπ : ∀ i, 0 ≤ π i)
(hbal0 : π 0 * p 0 = π 1 * q 1)
(hbal : ∀ k, π (k + 1) * (p (k + 1) + q (k + 1)) = π k * p k + π (k + 2) * q (k + 2)) :
∀ i, π i * p i = π (i + 1) * q (i + 1) := by
sorry | abstract | theorem q252_birth_death_detailed_balance
(p q π : ℕ → ℝ)
(hp : ∀ i, 0 ≤ p i) (hq : ∀ i, 0 ≤ q i) (hπ : ∀ i, 0 ≤ π i)
(hbal0 : π 0 * p 0 = π 1 * q 1)
(hbal : ∀ k, π (k + 1) * (p (k + 1) + q (k + 1)) = π k * p k + π (k + 2) * q (k + 2)) :
∀ i, π i * p i = π (i + 1) * q (i + 1) := by
intro i
induc... | 47 | Markov chains (finite & countable) | null |
257 | stochastic_processes_stopped_martingale_expectation_equal | Let (Z_n) be a martingale and J a stopping trial with stopped process (Z_n*).
Show that E[Z_1] = E[Z_n*] = E[Z_n] for all n. | theorem q257_stopped_martingale_expectation_equal (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]
(Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ)
(J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) (n : ℕ) :
∫ ω, Z 0 ω ∂μ = ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ ∧
... | literal | theorem q257_stopped_martingale_expectation_equal (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) [SigmaFiniteFiltration μ ℱ]
(Z : ℕ → Ω → ℝ) (hZ : Martingale Z ℱ μ)
(J : Ω → ℕ) (hJ : IsStoppingTime ℱ (natStop J)) (n : ℕ) :
∫ ω, Z 0 ω ∂μ = ∫ ω, stoppedProcess Z (natStop J) n ω ∂μ ∧
... | 157 | Martingales & stopping | null |
259 | stochastic_processes_martingale_stopping_time_4 | Let (X_n)_{n ≥ 0} be a martingale, and let T be a stopping time with 𝔼[T] < ∞.
You are given that X has bounded increments, i.e. ∃M > 0 such that |X_{n+1} − X_n| ≤ M for all n.
Show that 𝔼[X_T] = 𝔼[X_0]. | theorem q259_optional_stopping_bdd_incr (μ : Measure Ω) [IsProbabilityMeasure μ] (ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (T : Ω → ℕ)
(hT : IsStoppingTime ℱ (natStop T)) (hET : Integrable (fun ω => (T ω : ℝ)) μ)
(M : ℝ) (hincr : ∀ n, ∀ᵐ ω ∂μ, |X (n + 1) ω - X... | literal | theorem q259_optional_stopping_bdd_incr (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0)
[SigmaFiniteFiltration μ ℱ] (X : ℕ → Ω → ℝ) (hX : Martingale X ℱ μ) (T : Ω → ℕ)
(hT : IsStoppingTime ℱ (natStop T)) (hET : Integrable (fun ω => (T ω : ℝ)) μ)
(M : ℝ) (hincr : ∀ n, ∀ᵐ ω ∂μ, |X (n + 1) ω... | 560 | Martingales & stopping | null |
262 | stochastic_processes_nonneg_supermartingale_convergence | Let (Z_n) be a nonnegative supermartingale.
Show that Z_n converges with probability 1 to a finite limiting random variable as n → ∞. | theorem q262_nonneg_supermartingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Supermartingale Z ℱ μ)
(hnn : ∀ n ω, 0 ≤ Z n ω) :
∃ Zinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 (Zinf ω)) := by
sorry | literal | theorem q262_nonneg_supermartingale_convergence (μ : Measure Ω) [IsProbabilityMeasure μ]
(ℱ : Filtration ℕ m0) (Z : ℕ → Ω → ℝ) (hZ : Supermartingale Z ℱ μ)
(hnn : ∀ n ω, 0 ≤ Z n ω) :
∃ Zinf : Ω → ℝ, ∀ᵐ ω ∂μ, Tendsto (fun n => Z n ω) atTop (𝓝 (Zinf ω)) := by
have hsub : Submartingale (-Z) ℱ μ := hZ.neg
... | 225 | Martingales & stopping | null |
265 | stochastic_processes_product_form_exponential_martingale | Let (S_n) be a random walk with i.i.d. steps X whose semi-invariant generating function γ(r) = ln E[e^{rX}] exists near r, and let Z_n = exp(r S_n − n γ(r)).
Show that (Z_n) is a martingale. | theorem q265_exponential_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))
(hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(r γ : ℝ) (hγ : ∫ ω, Real.exp (r * X 0 ω) ∂μ = Real.exp γ)
(hint : ∀ n, Integrable
(fun ω => Re... | literal | theorem q265_exponential_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))
(hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(r γ : ℝ) (hγ : ∫ ω, Real.exp (r * X 0 ω) ∂μ = Real.exp γ)
(hint : ∀ n, Integrable
(fun ω => Re... | 249 | Martingales & stopping | null |
267 | stochastic_processes_random_walk_martingale | Let (X_i) be i.i.d. with E[X_i] = 0, and let Z_n = X_1 + … + X_n.
Show that (Z_n) is a martingale. | theorem q267_iid_sum_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))
(hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(hint : ∀ i, Integrable (X i) μ) (hmean : ∫ ω, X 0 ω ∂μ = 0) :
Martingale (fun n ω => ∑ i ∈ Finset.range ... | literal | theorem q267_iid_sum_martingale (μ : Measure Ω) [IsProbabilityMeasure μ]
(X : ℕ → Ω → ℝ) (hmeas : ∀ i, StronglyMeasurable (X i))
(hindep : iIndepFun X μ) (hident : ∀ i, IdentDistrib (X i) (X 0) μ μ)
(hint : ∀ i, Integrable (X i) μ) (hmean : ∫ ω, X 0 ω ∂μ = 0) :
Martingale (fun n ω => ∑ i ∈ Finset.range ... | 579 | Martingales & stopping | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.