5
Stack Exchange
votes

a moving average relation that I can't find a counter-example to

Posted on 7/12/2013
UQ ID:401
Technology
Signal Processing
Original

Hi: I'm new to this list but I had a question that's not exactly related to dsp but maybe in a slight way and I didn't know where else to send it. So, here goes and my apologies if this is totally the wrong place to send it.

The following describes the background as far as number generation.

Suppose have a series of positive numbers coming in sequentially ( regularly spaced ) that are generated by some invisible machine or oracle. no distribution is assumed for these numbers ( except that they are positive ) and they are generated at t1, ... tn. they are labelled as . at each time , the moving average with window size of the log of the is calculated and is labelled .

the parameters of are and . is the length of the moving average calculated at each time . is positive and will be explained below.

The following describes the game for a player who decides to play given the above ( assuming that atleast n numbers have been generated by now so a moving average can be calculated ). It doesn't cost anything to play this game.

The player of the game sees a new number at time , , and if is less than the current moving average, , then is marked as the player's "initial" number. like 36.83 or whatever. the game works so the next time crosses the moving average, , from below at say , then is marked as the player's ending number and the game ends.

The game rule is such that at , the game ends and the player receives = ( winnum could be negative in which the player of course pays ). Of course it could happen that the player never get an initial number or that the player gets an initial number and never gets an ending number but let's make the assumption that the player plays and the game both starts and ends.

Now, I claim ( and think I proved ) the following two things. ( really one because it's an if and only if ) are true for the player playing the game.

A) if turns out to be less than , then has to be positive. similarly if turns out to be greater than or equal to , then has to be non-positive.

and conversely

B) if is positive, then has to be less than . similarly, if is not positive , then has to be greater than or equal to .

I could send the proof to anyone who is interested but my questions were :

A) does anyone have a counter-example to disprove what I'm saying in A) or B).

B) if A) and B) are true ( my proof is correct ), then is this a well known result in the literature ( any literature. doesn't have to be DSP ) ?

thanks a lot. Mark

Keywords & Tags
algorithms
Model Answers (9)
Submitted answers from various AI models
Unsolved
No reviews yet

K2-Think

Pending UQ Validation
Needs Human Verification
MBZUAI-IFM
Qwen2.5-32B
Sep 18, 2025, 01:50 PM

To address the question, we first clarify potential ambiguities. The original definition of winnum as log(tstarstar) - log(tstar) is problematic because tstarstar > tstar implies winnum is always positive, contradicting the claim that it could be negative. We assume this is a typo and winnum should be log(x_{tstarstar}) - log(x_{tstar}), which depends on the ratio of the ending and ini...

0 model reviews
0 human reviews
No reviews yet

GPT-5

UQ Validated
Needs Human Verification
OpenAI
Sep 2, 2025, 06:56 AM

Short answer: Your statements A and B are false. You can construct sequences where the crossing happens in fewer than n steps but the log-return is negative, and also sequences where the crossing takes at least n steps but the log-return is positive. So there’s no such deterministic relation in general.

First, a quick clarification: you wrote winnum = log(tstarstar) − log(tstar). If tstarstar > t...

0 model reviews
0 human reviews
No reviews yet

Claude Opus 4

Failed UQ Validation
Needs Human Verification
Anthropic
Aug 1, 2025, 12:00 AM

This is an interesting problem involving moving averages and logarithms. Let me analyze your claims carefully.

First, let me clarify the setup:

  • You have a sequence of positive numbers
  • At time , you calculate
  • The game starts when
  • The game ends when $\log(x_{t^{*...
0 model reviews
0 human reviews
No reviews yet

o3 Pro

UQ Validated
Needs Human Verification
OpenAI
Aug 1, 2025, 12:00 AM

The statements you call A) and B) are unfortunately not true in general.
Below are two explicit counter-examples that violate them, followed by an explanation of why no “time–length versus profit” rule of the type you proposed can hold.

Notation that will be used:

Lk = log(xk) (the samples that are actually averaged)
Mk = (1/n) Σi=0…n-1 Lk-i (the n-point moving average of the lo...

0 model reviews
0 human reviews
No reviews yet

o3

Failed UQ Validation
Needs Human Verification
OpenAI
Aug 1, 2025, 12:00 AM

The statement is unfortunately not correct in general; it becomes false as soon as the length of the moving–average window is larger than 2.
Below is an explicit counter-example for the case n = 3 (the same idea works for any n ≥ 3). After the example you will find an explanation of why the claim fails and a remark on the only case in which it is true (n = 2).

---------------------------------...

0 model reviews
0 human reviews
No reviews yet

DeepSeek R1

Failed UQ Validation
Needs Human Verification
DeepSeek
deepseek-ai/DeepSeek-R1
Aug 1, 2025, 12:00 AM
<think> We are given a sequence of positive numbers: x_1, x_2, ..., x_{n}, x_{n+1}, ... At each time t (starting from t=n), we compute the moving average of the log of the last n numbers: mavelogx_t = (1/n) * (log(x_{t-n+1}) + log(x_{t-n+2}) + ... + log(x_t))

The game has two parameters: n (window size) and d (a positive threshold).

The player starts the game at time t* (tstar) when: log(...

0 model reviews
0 human reviews
No reviews yet

Gemini 2.5 Pro

Failed UQ Validation
Needs Human Verification
Google
Aug 1, 2025, 12:00 AM

This is a fascinating question that sits right at the intersection of time-series analysis, signal processing, and even quantitative finance. The relationship you're exploring is a simplified model of a "mean reversion" strategy.

Let's break down your claim and see if we can validate it or find a counter-example.

Formalizing the Problem

First, let's establish a clear mathematical notation t...

0 model reviews
0 human reviews
No reviews yet

o4 mini

UQ Validated
Needs Human Verification
OpenAI
Aug 1, 2025, 12:00 AM

Here is a very simple “by‐hand” counter–example which shows that neither of the two implications

(i) if t**–t* < n then winnum>0, and t**–t* ≥ n then winnum≤0
(ii) if winnum>0 then t**–t* < n, and if winnum≤0 then t**–t* ≥ n

holds in general. In fact one can do everything in log‐space so that xᵢ>0 is automatic.

— Take n=2. Let L₁=L₂=0 so that the 2-point moving average at t=2 ...

0 model reviews
0 human reviews
No reviews yet

Claude 3.7 Sonnet

Failed UQ Validation
Needs Human Verification
Anthropic
Aug 1, 2025, 12:00 AM

Moving Average Relation Analysis

I'll analyze the claimed relationship between game duration and player's winnings in this moving average problem.

Understanding the Setup

Let me first establish the key elements:

  • Positive numbers are generated sequentially
  • At time , we calculate (moving average with window size of log values)
  • Game...
0 model reviews
0 human reviews
Submit Your Model's Answer
Your submission will be validated by our LLM validator and then by human experts

You need to be logged in to submit an answer