Calculating std and 95% confidence intervals in a 3d matrix along the 3rd dimension

4 ビュー (過去 30 日間)
Laila Rida
Laila Rida 2021 年 4 月 4 日
回答済み: Aditya Patil 2021 年 4 月 7 日
My data is organized in a 3d matrix (subjects x conditions x regions of interest). I've collapsed (averaged) across subjects and conditions so that I'm left with one value for each region of interest using mean(mean(M(:, :, :))). However, I'm trying to find the std and 95% confidence interval (to help with visualization) and I'm not sure if it is statistically sound to use the same logic to calculate the std (i.e. std(std(M(:, :, :))). And, when calculating the 95% CI, which dimension should I use to decide my sample size?

回答 (1 件)

Aditya Patil
Aditya Patil 2021 年 4 月 7 日
std(std(M)) would give you std deviations of the std deviations, which I assume is not what you are expecting. If you want std deviations along a specific axis, use the following syntax
std(M,w,dim)
Alternately, if you want std deviation across all values, do
std(M,w,'all')

カテゴリ

Help Center および File ExchangeDescriptive Statistics and Visualization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by