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

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!

 採用された回答

Youssef  Khmou
Youssef Khmou 2014 年 1 月 23 日
編集済み: Youssef Khmou 2014 年 1 月 23 日

0 投票

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 件のコメント

Barbara
Barbara 2014 年 1 月 23 日
Thank you for the answer but I believe this is a bit more tricky.
So, I load my linear data, average over the 21 participants and convert to the dB domain to get the bar plots in dB. Now I would like to have error bars for the bar graphs in dB. I believe it would not be correct to use the dB values also they are already averaged and for the standard error I would need to devide by sqrt(number of samples). The error bars seem very wrong if I compute the sem from the dB values as well as when computed in the linear domain and afterwards converted to dB. I believe I miss something in this computation.
Youssef  Khmou
Youssef Khmou 2014 年 1 月 24 日
Barbara , in this case we need to look at some examples, you realize that bars are out of normal range in both Lin and dB, that means maybe the data are highly dispersed, in the mean while, take a look at this page : http://astro.u-strasbg.fr/~koppen/10GHz/errors.html
Can you load a simple signal as example.
Youssef  Khmou
Youssef Khmou 2014 年 1 月 24 日
編集済み: Youssef Khmou 2014 年 1 月 24 日
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 2014 年 1 月 24 日
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)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by