The variable transformation method generates a random variate of interest based on its known statistical relationship with other random variables the variates of which can be produced easily. For example, one is interested in generating chi-square random variates with n degrees of freedom. The CDF — inverse method is not appropriate in this case because the chi-square CDF is not analytically expressible. However, knowing the fact that the sum of n squared independent standard normal random variables gives a chi-square random variable with n degrees of freedom (see Sec. 2.6.6), one could generate chi-square random variates from first producing n standard normal random variates, then squaring them, and finally adding them together. Therefore, the variable transformation method is sometimes effective for generating random variates from a complicated distribution based on variates produced from simple distributions. In fact, many algorithms described in the next section are based on the idea of variable transformation.