Analysing materials by measuring the density or specific gravity, e.g. determining quantity of moisture