Quantum and classical probability distributions for arbitrary Hamiltonians