Traditional decision theory describes human behavior and human preferences in terms of utility functions. In the last decades, it was shown that in many economic situations, a reasonable description of the actual decisions can be found if we use a different approach -- of spectral risk measures. In each of these approaches, we first need to empirically find the corresponding function: utility function in the traditional approach and the weighting function for spectral risk measures. Since both approaches provide a reasonable description of the same actual behavior (in particular, of the same actual economic behavior), it is desirable to be able, given utility function, to find an appropriate weighting function (and vice versa). Some empirical rules for such transition have been proposed; these rules are purely heuristic and approximate, they are not theoretically justified. In the present paper, we recall how both the utility and the risk measure approaches can be reformulated in statistical terms, and use these reformulations to provide a statistically justified transition between utility and weighting functions.