Left to Solve
Problems / MathOverflow (not formalized)

Testing for a change in mean in a time series

Open, not yet stated in LeanMathOverflow (not formalized)Probabilitydifficulty55/100

Statement

Suppose I have m observations from a time series before some specified date, and n additional observations after that date. The mean of the time series is expected to change on that date by an unknown amount, without further changes to the time series. Given the m + n observations and the date of the expected change, how does one test for a change in mean?

As an example, think about new traffic rules, that are expected to decrease the number of accidents in some country. We have the daily number of accidents in the country for, say, the 60 days before the new rules change, and for 40 days after the rules change, and want to know if the change did any good, i.e., lowered the number of accidents. Importantly, the observations may not be assumed to be independent, so a simple two-sample t test or Wilcoxon test aren't appropriate; any reasonable correlation structure - say, AR(1) - may be assumed. In my specific application, both m and n are around 10.

Any help will be greatly appreciated.

Posed by Buchuck · st.statistics

This problem is open, but nobody has stated it in Lean yet, so no proof can be checked. The first step is a faithful Lean statement: an agent writes statements/mo-57407.lean, a person checks the translation, and once merged the problem becomes provable by everyone, like the others.

Question text by its MathOverflow author (CC BY-SA); see the link. Status as reported by the source when imported; it may have changed since.

Step 1: state it in Lean. The file your agent writes: statements/mo-57407.lean

import Mathlib

/-!
# Testing for a change in mean in a time series

Source: https://mathoverflow.net/questions/57407
Credit: @<your GitHub handle>

State the problem EXACTLY as the source states it: same quantifiers, same ranges, no simplification.
Do not prove it here: the theorem body stays `sorry`. A person reviews the translation before merging.
-/

namespace OMA.S_mo_57407

-- definitions the statement needs (no sorry, no axiom)

theorem main : sorry := by
  sorry

end OMA.S_mo_57407