时间序列数据:如何找到值的平均重复率?

问题描述 投票:0回答:1

我用Matlab分析了全球表面温度的时间序列数据。在分析了全球表面温度的时间序列数据后,我发现某些温度值在一定时间内重新出现,我将其分组,然后使用gscatter函数绘制散点图!

我想要一些帮助来找出地球温度达到5.6度的速率是多少?我的目的是找到这个事件发生的速度,这样我就可以统计地说明在不久的将来下一个预期的事件发生的时间!

结果:

scatter plot showing temperature range in groups

数据:

years that had a temperature of 5.6 degrees

Data = [ 1750 5.6
         1765 5.6
         1774 5.6
         1777 5.6
         1786 5.6
         1800 5.6
         1818 5.6
         1821 5.6
         1847 5.6
         1870 5.6
         1887 5.6
         1897 5.6
         1916 5.6
         1920 5.6
         1961 5.6
         1978 5.6
         1991 5.6 ];
python python-3.x matlab statistics
1个回答
0
投票

使用MATLAB的解决方案可以是以下(代码片段)。您可以确定5.6度之间的间隔。然后,您只需计算这些间隔的平均值和标准差。我不知道这是否是一个有意义的(统计)测量,但你可以计算前面提到的间隔的任何其他测量。箱形图只是可视化,间隔的分布有点广泛。

% Input.
Data = [ 1750 5.6
         1765 5.6
         1774 5.6
         1777 5.6
         1786 5.6
         1800 5.6
         1818 5.6
         1821 5.6
         1847 5.6
         1870 5.6
         1887 5.6
         1897 5.6
         1916 5.6
         1920 5.6
         1961 5.6
         1978 5.6
         1991 5.6 ];

% Calculate intervals between years.
intYear = diff(Data(:, 1));

% Boxplot (requires Statistics and Machine Learning Toolbox).
% Mean and standard deviation of intervals in title.
figure(1);
boxplot(intYear);
xlim([0 2]);
title(['Mean: ' num2str(mean(intYear)) ' years, Standard deviation: ' num2str(std(intYear)) ' years']);

输出:

Output

© www.soinside.com 2019 - 2024. All rights reserved.