If a higher derivative theory arises from a transformation of variables that involves time derivatives, a tailor-made Hamiltonian formulation is shown to exist. The details and advantages of this elegant Hamiltonian formulation, which differs from the usual Ostrogradsky approach to higher derivative theories, are elaborated for mechanical systems and illustrated for simple examples. Both a canonical space and a set of constraints emerge naturally from the transformation rule for the variables. In other words, the setting for quantization and the procedure for eliminating instabilities arise naturally.