How much noise gets through my raised cosine filter? I want to figure out how much of my total noise is getting through my filter. To see this, I generated a noise vector, applied the filter, and measured the output variance. However, the output variance changes if I scale my filter (as would be expected). I suspected that I needed to normalize the DC gain to be one, but I'm not sure if that is the right approach. Here's my code:

noiseVector = randn(1,1e6);
varOrig=var(noiseVector)

filterCoeff = rcosdesign(0.2,10,12);

filteredNoise1 = conv(noiseVector,filterCoeff);
var1=var(filteredNoise1)

filteredNoise2 = conv(noiseVector, filterCoeff/sum(filterCoeff));
var2=var(filteredNoise2)


There's a big difference between var1 ($\approx 1.00$) and var2 ($\approx 0.08$). Var1 would indicate that essentially all of the noise power was getting through the filter, but var2 would say that most of the noise is filtered out.

I also plotted the response of the unnormalized filter

 and of the normalized filter.

As expected, the DC gain of the normalized filter is 1 (0 dB). 

For my purpose of characterizing how much noise is getting through the filter, should I be using the normalized one (and is that normalization factor the right one)?
For my purpose, the correct method should normalize the filter so that the sum of the filter coefficients is 1. The DC value is normalized because this is a low-pass filter. It would be different if the filter were something else, like pass-band.

Here's the code and plots that convinced me.

noiseVector = randn(1,1e5);
[Pxx_noiseOrig, W]=pwelch(noiseVector,hamming(100),[],[],60e6,'centered'); 

filterCoeff = rcosdesign(0.2,10,12);

filteredNoise1 = conv(noiseVector,filterCoeff);
[Pxx_noise1, ~]=pwelch(filteredNoise1,hamming(100),[],[],60e6,'centered'); 


filteredNoise2 = conv(noiseVector, filterCoeff/sum(filterCoeff));
[Pxx_noise2, ~]=pwelch(filteredNoise2,hamming(100),[],[],60e6,'centered'); 

figure('Units','inches')
plot(W/1e6,10*log10([Pxx_noiseOrig, Pxx_noise1, Pxx_noise2]),'Linewidth',2)
grid on
set(gca,'FontSize',12)
legend({'Unfiltered','No scaling','Scaled'},'FontSize',12,'Location','SouthEast')
xlabel('Frequency (MHz)','FontSize',12)
ylabel('Power (dBW)','FontSize',12)
title('Comparison of ouput PSDs','FontSize',14)
get(gcf,'Position');
set(gcf,'Position',[pos(1) pos(2) 5 3])
print('~/Downloads/filteredNoiseComparison','-dpng','-r400')




The plot shows that the original filter had a gain in the passband. After scaling, the noise power in the passband stays the same. My goal was to see how much noise was getting through the filter, so scaled version was the one to use.