MATLAB Answers

How do I fit gaussian function to data whose only information I have is the minimum, maximum and number of data points?

2 ビュー (過去 30 日間)
AAS 2020 年 9 月 8 日
コメント済み: Alan Stevens 2020 年 9 月 9 日
I have the minimum, maximum and number of data points. How can I fit a gaussian to this?

  0 件のコメント



Jeff Miller
Jeff Miller 2020 年 9 月 9 日
Mostly I agree with Alan, but I'd say that your guess for the number of standard deviations should not be a constant of 6 but should depend on the number of data points N. In the following, the upper graph shows the expected value of the sample maximum Z score (vertical axis) as a function of the sample size (horizontal axis). On that basis, I'd say you should guess a range of just under +/- 3 sigma for a sample of N=400, because this is the average maximum Z score you would get for a sample of that size. But then drop that down to around +/- 2.5 sigma for N in the vicinity of 100, etc.
But keep in mind that the sample extremes are random variables and so subject to some error, again depending on sample size as shown in the lower graph (variance of the sample maximum as a function of N).
Everything is symmetric of course so the analogous Zmin will have corresponding properties.
Here is the code to do the relevant computations with Cupid, in case you want to check some other N's, prefer looking at median Z's rather than mean Z's, etc.
sampleNs = 10:10:400;
E_max = nan(numel(sampleNs),1);
SD_max = nan(numel(sampleNs),1);
for i=1:numel(sampleNs)
% Make the distribution of the maximum Z score in a sample of the indicated size
thisDist = OrderIID(sampleNs(i),sampleNs(i),Normal(0,1));
E_max(i) = thisDist.Mean;
SD_max(i) = thisDist.SD;
plot(sampleNs, E_max)
plot(sampleNs, SD_max)

その他の回答 (1 件)

Alan Stevens
Alan Stevens 2020 年 9 月 8 日
All you can reasonably do is assume the maximum and minimum are a certain number of standard deviations ( say 6 sigma) away from the mean ( mu = the average of the minimum and maximum).

  0 件のコメント



Community Treasure Hunt

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

Start Hunting!

Translated by