We consider sets of real numbers in [0, 1) with prescribed frequencies of partial quotients in their regular continued fraction expansions. It is shown that the Hausdorff dimensions of these sets, always bounded from below by 1/2, are given by a modified variational principle.