Extract samples with normal distribution from dataset

6 ビュー (過去 30 日間)
Sebastien
Sebastien 2011 年 12 月 13 日
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 Center および File ExchangeHypothesis Tests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by