The interview problem

Practice prompt

Why can a sampled signal confuse a high frequency with a lower one?

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

Sampling at fs makes frequencies differing by integer multiples of fs indistinguishable in complex exponentials. Real sinusoids add sign and phase symmetries. A bandlimited signal needs an appropriate sampling rate and anti-alias filtering before conversion.

2. Trace the design or derivation

Analog bandwidth
  → anti-alias filter
  → sampling
  → discrete spectrum

A practical downsampler applies a digital low-pass filter before discarding samples. Simply keeping every second sample halves the sample rate and may fold previously valid high-frequency content into the lower band. Keep units in hertz throughout the explanation.

3. Calculate the example

At fs=1000 Hz, a 700 Hz cosine has the same samples as a 300 Hz cosine because 700=1000−300. Removing high-frequency content after sampling cannot uniquely undo the ambiguity.

4. Failure cases and trade-offs

The Nyquist condition assumes a bandlimit; real hardware filters have transition bands. Confusing sample rate with analysis-window length mixes aliasing and spectral resolution.

5. Validation, follow-ups and self-review

Generate the two cosine sequences and compare samples. Follow-up: what happens when downsampling? Self-review: place the filter before information is lost.

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 Detect acoustic events in continuous audio; Enhance noisy speech for transcription.

Continue your preparation

Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.