The value of must be maximized to obtain a suitable threshold value. The optimal threshold value is the one that maximizes the between-classes variance, B or conversely minimizes the within-classes variance, W. This directly deals with the problem of evaluating the goodness of threshold.