It is shown that certain conditional distributions, obtained by conditioning on a sufficient statistic, can be used to transform a set of random variables into a smaller set of random variables that are identically and independently distributed with uniform distributions on the interval from zero to one. This result is then used to construct distribution-free tests of fit for composite goodness-of-fit problems. In particular, distribution-free chi-square goodness-of-fit tests are obtained for univariate normal, exponential, and normal linear regression model families of distributions.