计算一组值看起来有多好(分布有多好)
这组值: 1 2 3 3 4 1 如果你在条形图上想到它,看起来相当不错:
* *
* * * *
=======
1 2 3 4
而这个看起来很糟糕.. 1 2 2 2 2 2 2 2 2 9 8
*
*
*
*
*
*
*
* * * *
=================
1 2 3 4 5 6 7 8 9
这是因为有很多 2 并且 2 和 8 之间有很大的差距...
我需要找到一个公式来计算一组数字看起来有多漂亮.. 我想我需要一些偏差函数..有什么想法吗?
谢谢
this set of values:
1 2 3 3 4 1
looks pretty nice if you think of it on a bar chart:
* *
* * * *
=======
1 2 3 4
while this one looks bad..
1 2 2 2 2 2 2 2 2 9 8
*
*
*
*
*
*
*
* * * *
=================
1 2 3 4 5 6 7 8 9
This is because there are a lot of 2 and a big gap between the 2 and the 8...
I need to find a formula which computes how nice a set of number looks..
I think I'll need some deviation function.. any idea?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
卡方分析可能就是您正在寻找的。如果以正确的方式使用,它将为您提供一个数字,描述您的分布与离散均匀分布的接近程度。离散均匀分布将是平坦的(即每个直方图桶中的元素数量大致相同),这似乎符合您对“好”的定义。
A chi-square analysis is probably what you're looking for. If used in the right way it will give you a number describing how close your distribution is to a discrete uniform distribution. A discrete uniform distribution will be flat (i.e. have approximately the same number of elements in each of the histogram buckets), which seems to fit your definition of 'nice'.
这对我来说似乎很合理,但我对统计学的了解相当有限:
This seems reasonable to me, but I have pretty limited knowledge of statistics:
你对“好”的定义有点宽泛。 含义的解释,我建议采用两种方法
Your definition of "nice" is somewhat broad. I'd suggest two approaches to it based on my interpretation of what you mean by nice