MATLAB: How to compute the standard error of the mean for dB values

lognpdfstandard deviation for dbstandard error in dbstd

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!

Best Answer

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) .