In probability theory and statistics, the variance is a measure of how far a set of numbers are spread out from each other. It is one of several descriptors of a probability distribution, describing how far the numbers lie from the mean
Recipe for calculating the Variance:
1) Calculate the Mean of your dataset
2) For each point, calculate (X - Mean)^2
3) Add up all those (X - Mean)^2
4) Divide the by the number of points
5) That is it
The Variance gives you an idea of how "equal" your points are. A Variance of zero, means all points are equal, and then increases as the points spread out.
Edit
Here you may find better algorithms (more numerically stable) for calculating the variance.
One has to first define "uniformity". Does it mean lack of variance in the data? Or does it also mean other things like lack of average change across a surface or over time?
If it's simply lack of variance in data, then the variance method already described is the ticket.
If you are also concerned about average "shift" in measurement across the surface, you could do a linear (or in this case a "cylindrical" or "planar") fit of the data to determine whether there's a general trend up or down in the data in either of two dimensions. (If the conductor is cylindrical, then radially and axially. If it's planar, then x/y.)
These three parameters, then, would give a reasonable uniformity measure by the above definition: overall variance (that belisarius described), and "flatness" in each of two dimensions.
发布评论
评论(2)
您正在寻找方差。来自维基百科:
计算方差的方法:
1) 计算数据集的平均值
2) 对于每个点,计算 (X - 平均值)^2
3)将所有这些相加 (X - 平均值)^2
4) 除以点数
5) 就是这样
方差让您了解您的点数有多“相等”。方差为零,意味着所有点都相等,然后随着点的分散而增加。
编辑
在这里你可能会找到更好的算法(更多的数字稳定)用于计算方差。
You are looking for the Variance. From Wikipedia:
Recipe for calculating the Variance:
1) Calculate the Mean of your dataset
2) For each point, calculate (X - Mean)^2
3) Add up all those (X - Mean)^2
4) Divide the by the number of points
5) That is it
The Variance gives you an idea of how "equal" your points are. A Variance of zero, means all points are equal, and then increases as the points spread out.
Edit
Here you may find better algorithms (more numerically stable) for calculating the variance.
首先要定义“一致性”。这是否意味着数据缺乏方差?或者它是否还意味着其他事情,例如整个表面或随着时间的推移缺乏平均变化?
如果只是数据缺乏方差,那么已经描述的方差方法就是问题所在。
如果您还担心整个表面上测量的平均“偏移”,您可以对数据进行线性(或在本例中为“圆柱形”或“平面”)拟合,以确定总体趋势是向上还是向下二维数据。 (如果导体是圆柱形,则径向和轴向。如果是平面,则 x/y。)
这三个参数将根据上述定义给出合理的均匀性测量:总体方差(贝利撒留所描述的)和“平坦度” “在每个二维空间中。
One has to first define "uniformity". Does it mean lack of variance in the data? Or does it also mean other things like lack of average change across a surface or over time?
If it's simply lack of variance in data, then the variance method already described is the ticket.
If you are also concerned about average "shift" in measurement across the surface, you could do a linear (or in this case a "cylindrical" or "planar") fit of the data to determine whether there's a general trend up or down in the data in either of two dimensions. (If the conductor is cylindrical, then radially and axially. If it's planar, then x/y.)
These three parameters, then, would give a reasonable uniformity measure by the above definition: overall variance (that belisarius described), and "flatness" in each of two dimensions.