Rigorous statistical thermodynamical model for lattice dynamics in alloys