Statistics for Ion exchange for the desalination and treatment of wastewater