Extract samples with normal distribution from dataset

2 次查看(过去 30 天)
I have a dataset, of let's say, 86 samples caracterised by 1 value each (and other data, not important here). Plotting a barplot shows me that the 86 values do not follow a normal distribution. I'd like to find some code to extract from these 86 values a number n of values that follow as close as possible a normal distribution. If possible, I'd also like to be able to spectify the parameter n. Thank you for your help.

回答(1 个)

Paul Peeling
Paul Peeling 2011-12-13
You could use NCHOOSEK to generate subsets from your dataset with the desired number of samples, and then for each subset run a normality hypothesis test from the Statistics toolbox, and choose any subsets which meet your chosen level of significance
If your dataset is much larger, you could use outlier detection if you expect your dataset to have a mostly normal distribution. If the data is skewed or heavy-tailed, you should consider modeling and fitting the actual distribution.
  2 个评论
Sebastien
Sebastien 2011-12-13
Indeed, but what about if I do not have the statistics toolbox ?
I was more thinking about some code that automatically checks and calculate the best fit to a normal distribution....That would be great !!!!!
Paul Peeling
Paul Peeling 2011-12-14
If you don't have the Statistics toolbox, many normality tests are available on the File Exchange. Here is one for the chi-squared test: http://www.mathworks.com/matlabcentral/fileexchange/4779-chi-square-test

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Hypothesis Tests 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by