Statistics for Star Formation and Quenching in Galaxies: Groups, Clusters, and Mergers