How to correctly do a Student Test for atmoshperic data
2 次查看(过去 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 中查找有关 NetCDF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!