anderkve / FYS3150

https://anderkve.github.io/FYS3150
26 stars 14 forks source link

Variances of the probability distributions #92

Closed nigarabbasova closed 1 year ago

nigarabbasova commented 1 year ago

Hi again, Anders! :)

We are a bit unsure about including the numerical values of the variances for the two probability distributions. We can clearly see that one has a bigger variance than the other.. However, we do not see how presenting an actual value for these variances will offer any additional meaning/physical intuition in terms of understanding MCMC and the physics behind the Ising model. Having said that, we also do not want to be deducted points for not including the variance in case you wanted us to do so. From the project description it seemed like you were mostly interested in us discussing the meaning behind the big difference between the variances, but not necessarily the values themselves.

What is your take on this? Do you still want us to compute the variances and present them in the results section?

Thank you once again! :)

anderkve commented 1 year ago

Hi @nigarabbasova :)

Yes, the statement Comment on your results, in particular on the variance of the two distributions in Problem 6 is meant in the qualitative sense of Notice that one of the distributions is much narrower than the other -- can you comment on why this is so?.

Having said that, I would actually recommend you include the two variance estimates. It's typically a good thing to be precise when you can, and the variance $\mathrm{Var}(\epsilon)$ can of course be very easily estimated by just computing the sample variance $S_\epsilon^2$ using the energy samples $\epsilon_i$ that you have stored:

$\mathrm{Var}(\epsilon) \approx S\epsilon^2 = \frac{1}{N{\mathrm{samples}}-1} \sum\limits{i=1}^{N{\mathrm{samples}}} (\epsilon_i - \bar{\epsilon})^2$

(Or just use one of the built-in functions in numpy or scipy for computing this for a given set of samples.)

Rather than reporting the sample variance itself, it may be more useful to report the estimated standard deviation, $\sqrt{S_\epsilon^2}$, since it more directly describes the width of the distribution, rather than (width)^2.

nigarabbasova commented 1 year ago

Awesome, thank you once again! :)