  We introduce two new tools to assess the validity of statistical
distributions. These tools are based on components derived from a new
statistical quantity, the $comparison$ $curve$. The first tool is a graphical
representation of these components on a $bar$ $plot$ (B plot), which can
provide a detailed appraisal of the validity of the statistical model, in
particular when supplemented by acceptance regions related to the model. The
knowledge gained from this representation can sometimes suggest an existing
$goodness$-$of$-$fit$ test to supplement this visual assessment with a control
of the type I error. Otherwise, an adaptive test may be preferable and the
second tool is the combination of these components to produce a powerful
$\chi^2$-type goodness-of-fit test. Because the number of these components can
be large, we introduce a new selection rule to decide, in a data driven
fashion, on their proper number to take into consideration. In a simulation,
our goodness-of-fit tests are seen to be powerwise competitive with the best
solutions that have been recommended in the context of a fully specified model
as well as when some parameters must be estimated. Practical examples show how
to use these tools to derive principled information about where the model
departs from the data.
