필터 지우기
필터 지우기

Distribution Fit with Hole in Histogram: Calculate mean and std

조회 수: 2 (최근 30일)
Konstantin Beckmann
Konstantin Beckmann 2017년 8월 28일
편집: John D'Errico 2017년 8월 31일
Hello,
I have a question concerning the Distribution Fitter Toolbox:
I have a measured data vector and I want to calculate the mean and std. But unfortunately because of measurement noises etc. the histogram has a hole (x-value [3 3.5], see image).
With the Distrubution Fitter I like to "ignore" the non-existent data and want to calculate the mean and the std with simulated values between [3, 3.5].
But the ruesults of the Toolbox are the same as for the mean and std function. With the Distribution Fitter Toolbox (or otherwise) is it possible to calculate values of the hist between [3, 3.5] and then calculate the mean and the std including the non-existent values?
Thank you for your help.
  댓글 수: 1
John D'Errico
John D'Errico 2017년 8월 31일
편집: John D'Errico 2017년 8월 31일
Please don't add an answer just to gain attention to your question. A comment is a comment. Use that. It will make your question active just as a new answer will. But by adding an answer, that actually prevents your question from being seen by many people, due to filters that filter out questions that already have an answer.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jim Joy
Jim Joy 2017년 8월 31일
Hi Konstantin,
One thing that you might try is replacing all of your data in the interval where the hole exists by nan before fitting your distribution. The distribution fitter will then ignore this interval. To do this, use the code snippet below, where 'x' is a vector containing the raw measurements:
toRmv = (x >= 3.0) & (x < 3.5);
x(toRmv) = nan;
newFit = fitdist(x,'Normal');
With regard to the value of the mean and standard deviation, the estimate for the value obtained in your fit will probably be pretty close to the value you want. Remember that the Normal Distribution is characterized completely by its mean and standard deviation. That means that the value you obtain in the fit will more likely than not agree with the value that you observe in the experiment.
I hope this helps.
-Jim

Community Treasure Hunt

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

Start Hunting!

Translated by