# Taking every third value or the mean of three

Referring to Sampling, filters, windowing, FFT. From theory to help on this coding list with the figure, I now have some more questions.

How will taking every third of the 48 kHz vs. taking the mean of three relate to the first anti-aliasing filter F1?

I assume that in both cases I would need filter F2?

It's not quite clear what you are trying to do here.

If you just want to down-sample from 48kHz to 16kHz you should apply a "good" low pass filter, F1, and then simply throw away every 2nd and 4rd sample.

"Good" here is defined by the requirements of your application. It's a tricky tradeoff between residual aliasing, the amount of usable bandwidth, and artifacts in the time and frequency domain. Chances are a single biquad will NOT work here.

How will taking every third of the 48 kHz vs. taking the mean of three relate to the first anti-aliasing filter F1?

Taking the mean of three is a moving average filter with a transfer function of $$H(z) = \frac{1}{3}[1+z^{-1} + z^{-2}]$$. This is half low pass half comb filter and a very poor choice for an anti-aliasing filter.

I assume that in both cases I would need filter F2?

I don't understand what your filter F2 is supposed to be doing. What it is for ?

• Thanks, @Hilmar! Ok, taking every third is ok. How many biquads would you suggest as a rule of the thumb? I can cascade several, I have the time. Now 4.1 kHz is seen damped at 3.9 kHz, but my speakers are also nonlinear, and I haven't made a built-in sweep gen. and I haven't run any Python sim. code. F1 is anti-alias for the 48-16 kHz decimation and F2 is to band-limit in front of the FFT. Since I was not certain about this I did query about it here, and that's what I ended up with. It started at dsp.stackexchange.com/questions/82693/… Commented Jun 11, 2022 at 7:26