Extract samples with normal distribution from dataset

6 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Paul Peeling
Paul Peeling il 13 Dic 2011
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 Commenti
Sebastien
Sebastien il 13 Dic 2011
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 il 14 Dic 2011
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

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by