MindFormal v1.0.0One Mind

MindFormal.Tools.ConditionalMassResponse

noncomputable def MindFormal.ConditionalMassResponse.mean {P : Type u_1} [Fintype P] (mass value : P → ℝ) :

Conditional mean of a finite marked mass. In the market application these are joint accepted masses, never products of separate acceptances.

Equations
Instances For
    noncomputable def MindFormal.ConditionalMassResponse.variance {P : Type u_1} [Fintype P] (mass value : P → ℝ) :

    The conditional variance, in its raw second-moment form.

    Equations
    Instances For
      theorem MindFormal.ConditionalMassResponse.normalized_mass_derivative {P : Type u_1} [Fintype P] (f : ℝ → P → ℝ) (df : P → ℝ) (x : ℝ) (hf : ∀ (i : P), HasDerivAt (fun (t : ℝ) => f t i) (df i) x) (ht : ∑ i : P, f x i ≠ 0) (i : P) :
      HasDerivAt (fun (t : ℝ) => f t i / ∑ j : P, f t j) ((df i - (f x i / ∑ j : P, f x j) * ∑ j : P, df j) / ∑ j : P, f x j) x

      PM1.5's normalization derivative, valid at individual zero masses. Only the total mass must be nonzero. Differentiability is the entry's explicit response hold; no stationary native realization is asserted.

      theorem MindFormal.ConditionalMassResponse.mean_derivative {P : Type u_1} [Fintype P] (f : ℝ → P → ℝ) (df value : P → ℝ) (x : ℝ) (hf : ∀ (i : P), HasDerivAt (fun (t : ℝ) => f t i) (df i) x) (ht : ∑ i : P, f x i ≠ 0) :
      HasDerivAt (fun (t : ℝ) => mean (f t) value) ((∑ i : P, df i * value i - mean (f x) value * ∑ i : P, df i) / ∑ i : P, f x i) x

      The accepted-mean derivative retains all changes of joint accepted mass. This unnormalized form does not divide by an individual price mass.

      theorem MindFormal.ConditionalMassResponse.variance_centered {P : Type u_1} [Fintype P] (mass value : P → ℝ) (ht : ∑ i : P, mass i ≠ 0) :
      variance mass value = mean mass fun (i : P) => (value i - mean mass value) ^ 2

      Raw and centered conditional second moments agree. Nonnegativity of the masses is needed for a probability interpretation, not this identity.

      theorem MindFormal.ConditionalMassResponse.variance_derivative {P : Type u_1} [Fintype P] (f : ℝ → P → ℝ) (df value : P → ℝ) (x : ℝ) (hf : ∀ (i : P), HasDerivAt (fun (t : ℝ) => f t i) (df i) x) (ht : ∑ i : P, f x i ≠ 0) :
      HasDerivAt (fun (t : ℝ) => variance (f t) value) ((∑ i : P, df i * ((value i - mean (f x) value) ^ 2 - variance (f x) value)) / ∑ i : P, f x i) x

      PM1.5's spread derivative is the centered-square response of the same accepted masses. The mean's movement is included and cancels by centering; there is no unconditional sign assertion.

      theorem MindFormal.ConditionalMassResponse.mean_eq_weighted {P : Type u_1} [Fintype P] (mass value : P → ℝ) :
      mean mass value = ∑ i : P, (mass i / ∑ j : P, mass j) * value i

      The conditional mean is the mean under the normalized finite weights.

      theorem MindFormal.ConditionalMassResponse.variance_half_sum_normalized {P : Type u_1} [Fintype P] (p value : P → ℝ) (hp : ∑ i : P, p i = 1) :
      variance p value = 1 / 2 * ∑ i : P, ∑ j : P, p i * p j * (value i - value j) ^ 2

      PM1.4's pairwise half-sum equals the variance of normalized weights.

      theorem MindFormal.ConditionalMassResponse.variance_half_sum {P : Type u_1} [Fintype P] (mass value : P → ℝ) (ht : ∑ i : P, mass i ≠ 0) :
      variance mass value = 1 / 2 * ∑ i : P, ∑ j : P, (mass i / ∑ k : P, mass k) * (mass j / ∑ k : P, mass k) * (value i - value j) ^ 2

      PM1.4's spread is the pairwise half-sum of the normalized accepted masses.

      theorem MindFormal.ConditionalMassResponse.variance_pos_of_two {P : Type u_1} [Fintype P] (mass value : P → ℝ) (hn : ∀ (i : P), 0 ≤ mass i) (ht : 0 < ∑ i : P, mass i) (i j : P) (hi : 0 < mass i) (hj : 0 < mass j) (hne : value i ≠ value j) :
      0 < variance mass value

      Two different prices with positive mass force strictly positive spread.

      noncomputable def MindFormal.ConditionalMassResponse.covariance {P : Type u_1} [Fintype P] (mass f g : P → ℝ) :

      Conditional covariance under the same normalized accepted masses.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem MindFormal.ConditionalMassResponse.derivative_zero_at_zero {P : Type u_1} (f : ℝ → P → ℝ) (df : P → ℝ) (a : ℝ) (hn : ∀ (t : ℝ) (i : P), 0 ≤ f t i) (hf : ∀ (i : P), HasDerivAt (fun (t : ℝ) => f t i) (df i) a) (i : P) (hi : f a i = 0) :
        df i = 0

        A differentiable nonnegative mass has zero derivative at a zero mass. This derives the zero-support case rather than postulating it.

        theorem MindFormal.ConditionalMassResponse.mass_mul_elasticity {P : Type u_1} (f : ℝ → P → ℝ) (df : P → ℝ) (a : ℝ) (hn : ∀ (t : ℝ) (i : P), 0 ≤ f t i) (hf : ∀ (i : P), HasDerivAt (fun (t : ℝ) => f t i) (df i) a) (i : P) :
        f a i * (df i / f a i) = df i

        Multiplication by the mass removes its elasticity denominator, including zero masses by the preceding nonnegativity argument.

        theorem MindFormal.ConditionalMassResponse.normalized_elasticity_derivative {P : Type u_1} [Fintype P] (f : ℝ → P → ℝ) (df : P → ℝ) (a : ℝ) (hn : ∀ (t : ℝ) (i : P), 0 ≤ f t i) (hf : ∀ (i : P), HasDerivAt (fun (t : ℝ) => f t i) (df i) a) (ht : ∑ i : P, f a i ≠ 0) (i : P) (hi : 0 < f a i) :
        HasDerivAt (fun (t : ℝ) => f t i / ∑ j : P, f t j) ((f a i / ∑ j : P, f a j) * (df i / f a i - mean (f a) fun (j : P) => df j / f a j)) a

        PM1.5's elasticity display on positive accepted support. The raw normalization theorem remains available at every zero mass.

        theorem MindFormal.ConditionalMassResponse.mean_covariance_derivative {P : Type u_1} [Fintype P] (f : ℝ → P → ℝ) (df value : P → ℝ) (a : ℝ) (hn : ∀ (t : ℝ) (i : P), 0 ≤ f t i) (hf : ∀ (i : P), HasDerivAt (fun (t : ℝ) => f t i) (df i) a) (ht : ∑ i : P, f a i ≠ 0) :
        HasDerivAt (fun (t : ℝ) => mean (f t) value) (covariance (f a) value fun (i : P) => df i / f a i) a

        The mean derivative is accepted-price covariance with elasticity. The elasticity at zero mass contributes zero, as proved from nonnegativity.

        theorem MindFormal.ConditionalMassResponse.variance_covariance_derivative {P : Type u_1} [Fintype P] (f : ℝ → P → ℝ) (df value : P → ℝ) (a : ℝ) (hn : ∀ (t : ℝ) (i : P), 0 ≤ f t i) (hf : ∀ (i : P), HasDerivAt (fun (t : ℝ) => f t i) (df i) a) (ht : ∑ i : P, f a i ≠ 0) :
        HasDerivAt (fun (t : ℝ) => variance (f t) value) (covariance (f a) (fun (i : P) => (value i - mean (f a) value) ^ 2) fun (i : P) => df i / f a i) a

        PM1.5's spread derivative is covariance of the centered squared price with elasticity; the changing mean has already been differentiated.