Scale-effects on mean and standard deviation of the mechanical properties of condensed matter: an energy-based unified approach