Why do elements of the same group have the same chemical properties?

Group of answer choices

they are all the same size

they have the same number of energy levels

they have the same number of valence electrons

they have the same number of protons