To find the ratio of the number of students who have vanilla ice cream to the total number of students, we need to divide the number of students who have vanilla ice cream by the total number of students.
The total number of students is the sum of the students who have vanilla ice cream and the students who have chocolate ice cream:
Total number of students = Number of students with vanilla ice cream + Number of students with chocolate ice cream
= 7 + 16
= 23
Therefore, the ratio of the number of students who have vanilla ice cream to the total number of students is:
Ratio = Number of students with vanilla ice cream / Total number of students
= 7 / 23
So, the ratio is 7:23 or simplified as 1:3.29 (approximately).