Pirates should always be outnumbered and outgunned by governments... because historally they always have been.
Err... Pirate ships in the past often outgunned the government ships. In fact it was often the case that when a ship was commondired that the pirates would enhance the firepower and thus out power the same class of ship in a governments Navy.
Typically not. Mostly because pirate ships must not look like military ships. And at a certain point you can't hide a fast hull, heavier armor or construction, and lots of extra gun ports.
Pirates typically claimed to be "merchants" when they went to port. If they had 60 cannons or 100 cannons then they're not merchants.
And ships of the line had that many cannons.
So they are outgunned. I don't think you were contradicting the outnumbered bit...
A good example today is that most pirates disguise themselves as fishing boats. Well, fishing boats don't have fast hulls. They're wider and stouter. Furthermore, how many deck guns can you hide on the deck of a fishing boat? Typically one or two.
These boats are TOO slow to outrun so much as a cruiseship and almost any coast guard ship is more then enough to smash them.
Now perhaps you want to focus on old sail and mast pirates... well... fine they had comparatively more formidable ships but they were still nothing to the ships of the line. The only ones that had really top notch ships were the privateers... and that's because they had access to military shipyards and carried the right paperwork to dock with a military ship.
Merchant ships were typically wider to give them more cargo space, had fewer gun ports, and had less bracing to hold the frame together. You can't hide all that. You might get away with having thicker bracing or a slimmer hull... but the gun ports especially would screw you.
Pirates survived by preying upon the weak and using tricks and guile. That is they picked on merchant ships that were more poorly equipt then themselves... and tended to get near them with some kind of ruse.