Fundamental proof of signal averaging noise reduction

4 views (last 30 days)
I am trying to experimentally show the mathematical proof of averaging n samples for a reduction of noise of sqrt(n)
my code is very simple, but the ratio of improvement does not converge towards a fixed ratio. I get random improvements even with very large numbers of averaging
In this example I am using a 16x sampling improvment, I was expecting a 4x reduction in noise according to the theory.
clear all
close all
clc
L1 = 1000
L2 = round(L1*16);
Noise = randn(1,L2);
PNoise_1 = mean(Noise(1:L1))
PNoise_2 = mean(Noise(1:L2))
Noisereduction = PNoise_1/PNoise_2

Accepted Answer

Jeff Miller
Jeff Miller on 1 Sep 2022
Your code doesn't really measure noise reduction in the right way. Noise reduction refers to variability across many repeated means, something like this (untested):
nIterations = 100;
sampleMns = zeros(nIterations,2);
for iIter=1:nIterations
Noise = randn(1,L2);
sampleMns(iIter,1) = mean(Noise(1:L1));
sampleMns(iIter,2) = mean(Noise(1:L2));
end
sd1 = std(sampleMns(:,1));
sd2 = std(sampleMns(:,2));
Noisereduction = sd1/sd2;

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!