Applications#

chisquare#

This is a simple application to explore the fit chisquare as we vary the model parameters.

chisquare application screenshot

The rules are quite simple: at startup the application generates a random dataset (with noise) from a known model, and fit the scatter plot with the same model, showing the residuals, along with the contribution of each data point to the total chi-square. Starting from the best fit parameters, the user can then interactively change the parameters of the model with the sliders, and see how the chi-square changes as a result.

Recommended activities:

  • hit the “regenerate” button repeatedly and look at the residual—you will get a good feel for what a good fit looks like, and how the residuals are distributed when the fit is good;

  • if you are motivated and you do this enough times, taking note of the chisquare values you get, you should be able to make a histogram of the latter, and fit it with a chisquare distribution with the appropriate number of degrees of freedom;

  • change the amplitude parameter and create a plot of the chisquare as a function of the parameter itself—how does that look like?

  • start from best fit parameters and move the omega to around twice the best fit values, leaving the amplitude and phase fixed, then refit. Oh mine, what just happened?