Which of the following yields a stratified sample?


All students in a class are divided into groups of 30. One student is randomly chosen from the first group, the remaining observations are every 30th student thereafter.


The best 30 students, according to the opinion of the instructor, in a class are selected.


All students in a class are grouped according to their gender. A random sample of 15 is selected from the males and a separate random sample of 15 is drawn from the females.


The first 30 students in a class are selected without replacement.

All students in a class are grouped according to their gender. A random sample of 15 is selected from the males and a separate random sample of 15 is drawn from the females.