필터 지우기
필터 지우기

Extract samples with normal distribution from dataset

조회 수: 1 (최근 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 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