The interview problem
A pure tone appears in several FFT bins. Explain why and how windowing changes the result.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
A finite observation multiplies the signal by a window. If the tone does not align with the observation’s frequency grid, energy spreads across bins. Tapered windows reduce sidelobes while broadening the main lobe; choose based on the analysis goal.
2. Trace the design or derivation
Finite segment → chosen window → FFT → calibrated spectrum
Longer observation can improve frequency discrimination when the signal remains sufficiently stationary. For rapidly changing audio, that creates a time-frequency trade-off. State whether the product needs transient timing or stable pitch before choosing a window length.
3. Calculate the example
At fs=1000 Hz and N=100 samples, bin spacing is 10 Hz. A 55 Hz tone lies between bins. Zero-padding displays a finer frequency grid but does not add the missing observation time.
4. Failure cases and trade-offs
A smoother spectrum is not automatically better resolution. Window amplitude corrections depend on the quantity being estimated, such as tone amplitude versus power density.
5. Validation, follow-ups and self-review
Compare aligned and half-bin tones under rectangular and tapered windows. Follow-up: what resolves two nearby tones? Self-review: distinguish spacing, leakage and information.
Sources and related practice
Technical reference: docs.scipy.org — Discrete Fourier transforms, frequency grids and windowing.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Explain aliasing in sampled signals; Detect acoustic events in continuous audio.
Continue your preparation
Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.