
Let event A be event that students opted for NCC and event B be event that students opted for NSS.
∴ n(A) = 28, n(B) = 30 and n(A ∩ B) = 18
∵ There are 50 students in class.
∴ n(U) = 50
Now, number of students which opted for NCC but not NSS is n(A only) = n(A) - n(A ∩ B)
= 28-18
= 10
∴ Probability = P(A only) \(=\frac{n(A\,only)}{n(U)}\)
= 10/50 = 1/5
Hence, probability that students opted for NCC but not NSS be 1/5.