define dim for univariate distributions and for mixtures