Hello!

There is a task: I want to estimate the expectation and variance of my distribution, which I did after a certain task. At the output, I have a file of 2 columns, in the first value in X, in the second in Y.

The distribution is as follows: probability distribution

It is clear that this is a normal distribution, and I need to evaluate it by approximating with the Gauss function. What I am doing through gnuplot:

pi=3.14; sig=0.1; mu=0.1; Gauss(x) = 1./(sig*sqrt(2*pi)) * exp( -(x-mu)**2 / (2*sig**2) ) fit Gauss(x) "fit_aes_encryptText.txt" using 1:2 via sig, mu 

The fit_aes_encryptText.txt file looks like this:

 4 1 5 12 6 63 7 169 8 578 9 1591 10 3680 11 7506 12 13103 13 20269 14 27246 15 32781 16 34885 17 33215 18 27662 19 20135 20 13148 21 7665 22 3811 23 1650 24 570 25 201 26 48 27 11 28 5 

But gnuplot begins to swear:

 iter chisq delta/lim lambda sig mu 0 6.2244369770e+09 0.00e+00 0.00e+00 1.000000e-01 1.000000e-01 Singular matrix in Givens() 

What am I doing wrong?

  • Why did you take a MJ? You have about 16 bad initial conditions. - BuilderC
  • And Sigma should be about 3. You can not take the initial conditions from the ceiling, they should be evaluated correctly. - BuilderC

0