theorem cumulant3_is_derivative_of_variance [NeZero J]
(x : Fin J → ℝ) (hx : ∀ j, 0 < x j) (ρ : ℝ) :
HasDerivAt (fun p => escortCumulant2 x p)
(escortCumulant3 x ρ) ρ := by
unfold escortCumulant2 escortCumulant3
-- Get the moment recursion for M_2 and M_1
have hM2 := escortRawMoment_hasDerivAt x hx ρ 2
have hM1 := escortRawMoment_hasDerivAt x hx ρ 1
-- Derivative of M_1^2 via chain rule
have hM1sq := hM1.pow 2
-- Combine: d/drho (M_2 - M_1^2) = dM_2 - d(M_1^2)
have h := hM2.sub hM1sq
refine h.congr_deriv ?_
simp only [Nat.cast_ofNat]
ringThe Cumulant Tower: Higher-Order Bridges Between CES and Escort Statistics