How to correctly do a Student Test for atmoshperic data
조회 수: 1 (최근 30일)
이전 댓글 표시
I've been having some troubles to understand how to do a ttest over my data.
I have an OLR netcdf with dimensions 180 x 51 x 14245, i.e., lon x lat x time. I filtered this data with a bandpass of 20 to 70 days. After that, I select an specified number of times to analyze my phenomena. That way, I select 30 events with that phenomena, with 31 times each event, having dimensions 180 x 51 x 31 x 30. Finally, I calculated the mean over the number of events to obtain only 180 x 51 x 30.
I want to see which data has significative differences compared with the original OLR file (unfiltered), to plot only the statistically significant values with pcolor.
My code was this one:
for i=1:180
for j=1:51
k = olr_event(i,j,:); % olr_event is the composite olr data I mentioned before
l = olr_orig(i,j,:); % olr_orig is the original olr data with 14245 times
prueba = ttest2(k,l);
end
end
The problem is that the whole area rejects the null hypothesis, meaning that each grid point has statistical differences, which I dont really expect.
Am I doing it correctly?
Thank you!
댓글 수: 0
채택된 답변
Star Strider
2023년 9월 27일
I’m not certain what you’re doing. I would use ttest2 on the filtered and unfiltered events themselves (since that is how ttest2 works), not test one event against the mean of the other.
Testing the effect of filtering on the signals themselves —
t = (0 : 150);
x = randn(size(t))
y = randn(size(t))+0.1
yf = bandpass(y, [0.30 0.31], 1, 'ImpulseResponse','iir');
[h1,p1] = ttest2(x, y) % Unfiltered
[h2,p2] = ttest2(x, yf) % Filtered
It is certainly possible that the filter removes enough of the signal energy to result in a statistically significant difference.
.
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!