We reconsider the problem of producing fair and accurate tariffs based on aggregated insurance data giving numbers of claims and total costs for the claims. Jørgensen and de Souza (Scand Actuarial J., 1994) assumed Poisson arrival of claims and gamma distributed costs for individual claims. Jørgensen and de Souza (1994) directly modelled the risk or expected cost of claims per insured unit, μ say. They observed that the dependence of the likelihood function on μ is as for a linear exponential family, so that modelling similar to that of generalized linear models is possible. In this paper we observe that, when modelling the cost of insurance claims, it is generally necessary to model the dispersion of the costs as well as their mean. In order to model the dispersion we use the framework of double generalized linear models. Modelling the dispersion increases the precision of the estimated tariffs. The use of double generalized linear models also allows us to handle the case where only the total cost of claims and not the number of claims has been recorded.