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!

采纳的回答

Star Strider
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))
x = 1×151
0.2578 -0.2180 0.6520 0.0698 0.5735 0.9295 0.4737 -0.2826 0.2126 0.8254 -0.7138 1.4316 -0.2453 0.1224 1.5273 -1.4869 -0.2666 0.9059 0.6516 1.6866 -1.1261 -0.7402 0.5401 -0.5479 0.0190 0.2516 0.0470 1.8034 0.3905 -0.3171
y = randn(size(t))+0.1
y = 1×151
0.4744 2.1065 -0.9683 -0.0745 0.8046 0.3834 -0.1840 -0.1694 0.5952 -0.9526 1.1424 0.7380 0.6034 -0.2772 -0.7986 0.5767 0.1454 0.0328 0.8433 -0.2866 -2.2497 0.4187 0.2863 1.3744 0.2786 0.8586 -0.9505 -1.0958 0.8295 1.4762
yf = bandpass(y, [0.30 0.31], 1, 'ImpulseResponse','iir');
[h1,p1] = ttest2(x, y) % Unfiltered
h1 = 0
p1 = 0.1913
[h2,p2] = ttest2(x, yf) % Filtered
h2 = 1
p2 = 0.0024
It is certainly possible that the filter removes enough of the signal energy to result in a statistically significant difference.
.
  2 个评论
Luis Jesús Olvera Lazcano
Thank you! I checked and indeed the filter does most of the job to remove the signal of the main time series
As always thanks for your help

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by