Statistical theory for ferroelectricity in tri-glycine sulfate