Generalized entropies in quantum and classical statistical theories