Returns chi squared. Used for fitting (minimize this).