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

조회 수: 2 (최근 30일)
I have the minimum, maximum and number of data points. How can I fit a gaussian to this?

채택된 답변

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;
end
figure;
subplot(2,1,1);
plot(sampleNs, E_max)
ylabel('E[Zmax]');
subplot(2,1,2)
plot(sampleNs, SD_max)
xlabel('N')
ylabel('\sigma_{Zmax}')

추가 답변 (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).

태그

Community Treasure Hunt

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

Start Hunting!

Translated by