.
In all, there are 12 + 18 = 30 students in the class.
The question is
What is the probability that two randomly selected students are 1 male and 1 female, in EITHER order.
In all, you can make = = 435 different pairs of students, without looking on their gender.
Under this consideration, the pair (John,Alice) is the same to you, as the pair (Alice,John) - you count these 2 pairs as one.
It is your SPACE OF EVENTS of 435 elements.
From the other side, you can make exactly 12*18 = 216 different pairs of different gender.
It is your space of "favorable" events.
Now, the probability under the question is the ratio of "favorable" to "all space" events = 0.4966 = 49.66%. ANSWER
-----------------
If you want to make your horizon wider and to get a "solid ground under your legs" in elementary probability problems,
you may want to look into the lessons
- Elementary Probability problems related to combinations
- A True/False test
- A shipment containing fair and defective alarm clocks
- People in a room write down integer numbers at random
- A drawer contains a mixture of socks
- Students studying foreign languages
- Probability for a computer to be damaged by viruses
- Typical probability problems from the archive
- Geometric probability problems
- Advanced probability problems from the archive
- Challenging probability problems
- Selected probability problems from the archive
- OVERVIEW of lessons on Probability
in this site.
A good place to oversee all these lessons from the "bird flight height" is the last lesson in the list.
Also, you have this free of charge online textbook in ALGEBRA-II in this site
- ALGEBRA-II - YOUR ONLINE TEXTBOOK.
The referred lessons are the part of this online textbook under the topic "Solved problems on Probability".
Save the link to this textbook together with its description
Free of charge online textbook in ALGEBRA-II
https://www.algebra.com/algebra/homework/complex/ALGEBRA-II-YOUR-ONLINE-TEXTBOOK.lesson
into your archive and use when it is needed.