We find the distribution function of a ratio of dependent random variables which can represent a generalised mortality rate in a demographic or life insurance context. Each death in the numerator and each unit of exposure in the denominator are weighted by a random sum at risk, which is assumed to follow a gamma distribution. General results on the existence of moments of ratios of random variables are established, and applied to show that the moments of the rates considered here depend in a simple way on the minimum number of entrants into the mortality investigation.