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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了时间序列数据:如何找到值的平均重复率?相关的知识,希望对你有一定的参考价值。

我用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 ];
答案

使用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

以上是关于时间序列数据:如何找到值的平均重复率?的主要内容,如果未能解决你的问题,请参考以下文章

神经网络优化 - 滑动平均

如何在Pig中找到一列的平均值和两列的减法平均值?

如何找到一组轴承的平均值[重复]

R - 如何制作 n 个先前值的平均值/平均值,不包括当前观察值(滚动平均值)

如何找到经度和纬度位置的平均值?

如何在 MASM 中找到浮点数组的平均值?