To find the mode you go through the set of data. Say we have 1, 2, 4, 1, 6, The mode would be 1 because there are two ones in the set and nothing else has two of something.
There are 10 female students and 20 male students. If we were to divide each number by 10, we would get 1 and 2, respectively. That means for every 1 female student, there are 2 male students. The ratio would then be 1:2.