M06 · optional contextual support
Sample a signal without hiding aliasing
Inspect waveform samples, frequency bins, windows and lost high-frequency information.
Start with arithmetic, percentages and basic algebra. Open any section directly. Practice and completion here do not change any AI course requirement or the original five-lesson mathematics pilot.
1. Try a concrete case
At eight samples per second, a 1 Hz cosine and a 9 Hz cosine have identical samples. No later plot can distinguish them without additional assumptions or observations.
2. Predict before changing a value
Choose frequencies on opposite sides of half the sample rate. Inspect exact samples and the spectrum. Change window length to separate frequency resolution from aliasing. Name the quantity you expect to change and one you expect to stay fixed before using the controls.
3. Experiment
Change one quantity, follow every calculation
- Sample rate (Hz)
- 16.00000
- Folded alias frequency (Hz)
- 3.00000
- Window duration (s)
- 1.00000
- DFT bin spacing (Hz)
- 1.00000
Vertical axis: DFT magnitude / n. Fixed scales; 0 points clipped for display. Lines join sampled values to aid reading; they do not create extra observations. Exact numerical values are below.
| Sample index | Time seconds | Amplitude |
|---|---|---|
| 0 | 0.00000 | 0.00000 |
| 1 | 0.06250 | 0.92388 |
| 2 | 0.12500 | 0.70711 |
| 3 | 0.18750 | -0.38268 |
| 4 | 0.25000 | -1.00000 |
| 5 | 0.31250 | -0.38268 |
| 6 | 0.37500 | 0.70711 |
| 7 | 0.43750 | 0.92388 |
| 8 | 0.50000 | 0.00000 |
| 9 | 0.56250 | -0.92388 |
| 10 | 0.62500 | -0.70711 |
| 11 | 0.68750 | 0.38268 |
| 12 | 0.75000 | 1.00000 |
| 13 | 0.81250 | 0.38268 |
| 14 | 0.87500 | -0.70711 |
| 15 | 0.93750 | -0.92388 |
Rectangular window, no microphone. Frequencies separated by integer multiples of the sample rate can agree at every sample. A noninteger number of cycles spreads energy across bins; increasing window length changes resolution, not missing high-frequency information.
Choose frequencies on opposite sides of half the sample rate. Inspect exact samples and the spectrum. Change window length to separate frequency resolution from aliasing.
Controls save locally as practice. No timers, remote services or GPU are required. Maximum numerical work is a bounded small table or 256 bootstrap resamples.
4. Understand the calculation
Start with a calculation you can inspect
At eight samples per second, a 1 Hz cosine and a 9 Hz cosine have identical samples. No later plot can distinguish them without additional assumptions or observations.
Inspect waveform samples, frequency bins, windows and lost high-frequency information. The experiment changes one named quantity at a time and shows the intermediate values, rather than asking you to accept a final score. Before changing a control, write down which value you expect to move and why.
Read the formula in words and symbols
sample[t] = sin(2π f t / fs); bin frequency = k fs / N
f is tone frequency in cycles/second (Hz), fs is samples/second, t is an integer index, N is window length and k is a frequency-bin index. π converts cycles into radians.
A subscript names a coordinate, case or time index; it is not multiplication. A summation sign means add the terms for the stated indices. Parentheses identify which calculation happens first. Carry units through arithmetic: adding incompatible quantities or confusing a rate with a count changes the question.
Connect the visual and the numbers
Choose frequencies on opposite sides of half the sample rate. Inspect exact samples and the spectrum. Change window length to separate frequency resolution from aliasing. The plot uses declared fixed axes, so a new setting does not silently rescale the apparent change. Any clipped values are counted and remain available in the numerical table. Do not infer an exact curve or a new observation from a line drawn between points.
Use it in an AI experiment
These ideas support C04. Use the return link when you entered from an AI lesson; its original section and experiment remain separate. A mathematical support calculation is a way to inspect an assumption, not evidence that a trained model generalizes.
Optional derivation and implementation depth
The DFT projects samples onto sine/cosine components. A finite window multiplies the signal and can spread spectral energy; rectangular windows reveal leakage clearly. A spectrogram repeats this calculation over successive windows, trading time and frequency resolution. More bins cannot recover unobserved frequencies.
Recompute the worked example with a separate piece of arithmetic or a short program. State the domain and test a boundary case before using the formula elsewhere. Guided numerical practice, independent implementation and human review are different outcomes.
Optional implementation and research depth
The DFT projects samples onto sine/cosine components. A finite window multiplies the signal and can spread spectral energy; rectangular windows reveal leakage clearly. A spectrogram repeats this calculation over successive windows, trading time and frequency resolution. More bins cannot recover unobserved frequencies.
Recompute one row independently, then test a boundary case and state which assumption it probes. Passing the supplied practice case does not establish independent implementation proficiency.
5. Apply it to a different case
Practice not yet passed; independent mastery and human review are not claimed.
6. Continue when useful
Completion not recorded. Skipping retains settings and practice; it never awards completion.
Used in C04. Browse every support topic and course connection.