毫升 |原始和中心时刻
矩是一组统计参数,用于描述频率分布的不同特征和特征,即频率曲线的集中趋势、离散度、对称性和峰度(驼峰)。
对于未分组数据(即离散数据),变量 X 的观测值可通过以下方式获得 , 对于分组数据(即连续数据),获得变量 X 的观测值,并在频率表中按 K 类间隔制表。 Inervals 的中点表示为频率发生分别和 .
Class Intervals | Mid Points () | Absolute Frequency () |
---|---|---|
… | … | … |
… | … | … |
关于任意点 A 的矩
这变量 X 关于观测值上任意点 A 的矩定义为:
For ungrouped data
For grouped data
where
关于Python中任意点的时刻——
考虑给定的数据点。以下是 20 位不同的人每周在 GeeksforGeeks 门户网站上花费的时间(以小时为单位)。
15, 25, 18, 36, 40, 28, 30, 32, 23, 22, 21, 27, 31, 20, 14, 10, 33, 11, 7, 13
# data points
time = [15, 25, 18, 36, 40, 28, 30, 32, 23, 22,
21, 27, 31, 20, 14, 10, 33, 11, 7, 13]
# Arbitrary point
A = 22
# Moment for r = 1
moment = (sum([(item-A) for item in time]))/len(time)
原始时刻 –
这原点 A = 0 周围的矩称为原始矩,定义为:
For ungrouped data,
For grouped data,
where,
笔记:
-> We can find first raw moment () just by replacing r with 1 and second raw moment () just by replacing r with 2 and so on.
-> When r = 0 the moment for both grouped and ungrouped data.
Python中的原始时刻——
# data points
time = [15, 25, 18, 36, 40, 28, 30, 32, 23,
22, 21, 27, 31, 20, 14, 10, 33, 11, 7, 13]
# Moment for r = 1
moment = sum(time)/len(time)
中心时刻——
变量 X 关于算术平均值的矩 ( ) 称为中心矩,定义为:
For ungrouped data,
For grouped data,
where and
笔记:
-> We can find first raw moment () just by replacing r with 1 and second raw moment () just by replacing r with 2 and so on.
-> When r = 0 the moment , and when r = 1 the moment for both grouped and ungrouped data.
# data points
time = [15, 25, 18, 36, 40, 28, 30, 32, 23, 22,
21, 27, 31, 20, 14, 10, 33, 11, 7, 13]
# Mean
A = sum(time)/len(time)
# Moment for r = 1
moment = (sum([(item-A) for item in time]))/len(time)
原始时刻和中心时刻之间的关系 –