It isn't as simple as a 1 in some number chance at getting the unique gems. Let's take into account that you have 20 invader items which have a chance to drop and each of those have 6 levels (simple to legendary). You also have 8 gems which have 6 levels. Now you need to add into this bag the fact that each of the simple resources can drop (diamond, glass, etc) with those also having 6 levels. Plus the varied speed-ups and boosts that can drop from an invader. So let's just grab a random number and guess that maybe there are around 1200 individual items of varied levels or time ranges in this bag.
However, they truly aren't all in the same bag. They may very well be in 100 different bags; separated out by low level bags up to the most unique and desired bags. When you hit the invader, the things which might be calculated into the bag which you get to select from could include how much damage you do, how much damage is already done to the invader, what percentage hit bonus you are up to, the level of your hero or shaman etc etc, plus the good ole fashion random number generator.
If you score a low number then you get to pick from the low level bags. The higher number you roll then the higher level the bag is. Even if you get a high level bag, you then have the random calculation generated for the item you get to pull from that higher level bag. So, you might get fortunate and eventually get to pull from the unique gem bag, but ultimately still only get a simple or usual gem.
Basically, what it boils down to is build your hunting gear, do your invader research, level your hero and upgrade the invader skill section, then kill kill kill and then kill some more. Most importantly, just enjoy the game.
Final note: with the things I mentioned I am capable of killing an uber for around 48k energy. So those upgrades and gear truly help a lot.