The work consists of two overlapping generations models of three periods each, one containing a pay-as-you-go pension system and the other a capitalisation pension system. In the first period agents don't work and have to decide how much to invest in training, borrowing from the generation working at that time. Training is risky and its result is known in the following period, when the accumulated human capital becomes productive and enters the production function. In the final third period agents are retired. Human capital deriving from investments in training follows a simple stochastic process. The two models are analytically solved in the two endogenous variables: the rate of growth of investments in human capital and the stock of real capital per unit of efficient work. What kind of effects can the structure of pensions have on decisions of agents to have or not to have risky training when young? Contrarily to commonly accepted theoretical position, many scenarios come out in which a pay-as-you-go system conducted in financial equilibrium can generate higher rate of growth, never violating compatibility between incomes belonging to the young and the old generation.