How can I compute the standard error of the mean for dB values?

39 views (last 30 days)
Hello all,
I have a set of data, which are in dB as signal-to-noise ratio (SNR) for the envelope power of two signals for 21 test participants und a set of conditions. My data is arranged as a matrix in the format 3x3x21 for 3 snr conditions, 3 types of background noise and 21 participants. I would like to create a figure with three subplots. One subplot for each of the three SNR conditions. Each subplot should include three bars corresponding to the 3 types of background noise as average over the 21 participants.
My problem now is to plot the error bars for the dB values on the bars in the subplots. I know that I cannot just compute the standard error of the mean sem = std(data)/sqrt(length(data,3)) and convert the result to dB 10*log10(sem) but also trying the lognpdf function in Matlab shows rather unrealistic results.
Does somebody know what I could to do compute the correct standard error of the mean for data in dB?? Or more general, how to compute the standard error of the mean for a non-linear variable/unit?
Thank you very much in advance!

Accepted Answer

Youssef  Khmou
Youssef Khmou on 23 Jan 2014
Edited: Youssef Khmou on 23 Jan 2014
I think you should do all the computations either in linear or dB system, you can just compute the std of the 21x3x3 data without using 10*log10(std) .
  4 Comments
Youssef  Khmou
Youssef Khmou on 24 Jan 2014
Edited: Youssef Khmou on 24 Jan 2014
it is hard to tell, can't you use the same definition used in errorbar function? like the following :
avgFast = [ 523.4415 214.8238 67.1483; 551.8096 316.6160 69.7664; 599.9940
277.4273 67.2905];
x=avgFast(:);
s=std(x)*ones(size(x));
errorbar(x,s)
If the answers here did not help, you do not have to accept the answer, and look for other contributions.
Youssef  Khmou
Youssef Khmou on 24 Jan 2014
its not really clear, but it is fair to convert to dB.
it is normal for values to appear larger as long as the comparaison is mathematically correct :
if x>y for any(x,y)>=1 then log(x)>log(y)
x=avgFast(:);
s=std(x)*ones(size(x));
X=10*log10(x);
S=10*log10(s);
errorbar(X,S)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!