在 MATLAB 中测试数据分布是否服从高斯分布
我有一些数据点及其平均值。我需要找出这些数据点(具有该平均值)是否遵循高斯分布。 MATLAB 中有可以进行此类测试的函数吗?或者我需要自己编写测试吗?
我尝试查看 MATLAB 提供的不同统计函数。我对 MATLAB 很陌生,所以我可能忽略了正确的函数。
干杯
I have some data points and their mean point. I need to find whether those data points (with that mean) follows a Gaussian distribution. Is there a function in MATLAB which can do that kind of a test? Or do I need to write a test of my own?
I tried looking at different statistical functions provided by MATLAB. I am very new to MATLAB so I might have overlooked the right function.
cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
检查所有 可用的假设检验。
根据您的目的,您可以使用:
... 其中其他
您还可以使用一些视觉测试,例如:
Check this documentation page on all available hypothesis tests.
From those, for your purpose you can use:
... among others
You can also use some visual tests like:
我喜欢 Spiegelhalter 的测试(DJ Spiegelhalter,“分布形状的诊断测试”,Biometrika,1983):
每当进行统计测试时,总是在零下测试它们!这是一个简单的例子:
我得到结果:
同样
我得到
I like Spiegelhalter's test (D. J. Spiegelhalter, 'Diagnostic tests of distributional shape,' Biometrika, 1983):
whenever hacking statistical tests, alway test them under the null! here's a simple example:
I get the results:
Similarly
I get
对于一般测试,请在统计工具箱中查找 Kolmogorov-Smirnov 测试,如 kstest 和两个示例版本:
For testing in general, look up the Kolmogorov-Smirnov Test, also in the Stats Toolbox, as kstest and the two-sample version: kstest2 . You feed it your empirical data, (and the data from a possible function, like the gaussian, etc...) then it tests the likelihood that your sample was pulled from the normal distribution (or the one you supplied for the two-sample version)... The nicety is that it'll work for any possible distributions...