Refinement of the Gibbs and Bose-Einstein Distributions