True it depends on number of vacancies at the time of booking. It works better for trains like Humsafar.
One more suggestion I can say is if sr. Citizen (I mean women above 45 and men above 60yrs) are booking in general RAC/WL also have good chances of confirmation. As cancelled tickets booked under lower berth quota will be used as first preference for waitlist sr citizens.