Explore how window size affects signal smoothing. A larger window averages more samples, reducing noise but potentially obscuring rapid changes in the underlying signal.
A small window keeps the smoothed signal close to the original, preserving rapid changes and fine detail but doing little to suppress noise. At n = 1, the output is the raw signal itself.
A large window aggressively suppresses noise, revealing the broad trend, but introduces lag and may smooth away meaningful features. The first n − 1 points are zero-padded, pulling the average toward zero before a full window is available.