Just to clarify, there's a difference between the variance of the data and the estimated variance of the population. To get the variance of the data (just as a collection of numbers), you divide the sum square (value-mean) by N, the number of datapoints. To get the unbiased estimate of the variance of the population you divide by N-1 instead.I am not sure about the one-sided business. However, usually to get a best fit Gaussian, compute the mean and variance of the data and use a Gaussian with those quantities.
That doesn't strike as a particularly "Gaussian" distribution. Honestly, fitting something like a Weibull distribution seems like a better bet to me for a few reasons, not the least of which because it's strictly positive. The stat toolbox in matlab should let you fit the distribution using maximum likelihood estimation.Hello, yes when I said one sided I meant that my data only covers the positive side of the distribution. While usually yes all you have to do is get the mean and the variance, my data already follows the shape of a Gaussian and I'm trying to find the best fit for the general case, its a little bit like trying to find the line of best fit using the least mean square error but instead its the Gaussian of best fit.
I have tried using the least mean square error approach but the differential equations of the Gaussian get a bit messy.
here is an example of the data I'm trying to get the Gaussian of best fit to