This is a very serious issue that I feel needs a bit of scrutiny.
It is commonly believed that if ever there was an epic battle between ninjas and pirates, the ninjas would win. But, I think I have come up with fairly conclusive evidence to the contrary, using some good, old fashioned, common sense.
Ninja skills consist of good fighting technique, agility and fast reflexes. They will probably have trained for combat on level ground and streets. Can they swim? Probably not, why would they be fighting in water, after all?
Pirates, on the other hand, have no such fighting technique. However, they do have guns, swords and a ship that can do a lot of damage to big things.
Pirates hardly ever go on land except to collect buried treasure. They much prefer the sea and therefore like to spend the least amount of time on a deserted island as possible.
Since ninjas come at you from the shadows, they will not be found waiting to ambush the pirates at the desert island, if indeed they knew there would be treasure there in the first place, given that the pirates would have a map. Therefore we can assume that the Ninjas would be forced to stow away on board the pirate ship when they dock near enough to their training camp (probably near a city, as they have lots of dark spaces).
The pirates naturally have the advantage in their boat, but would not win in combat. They would have to sink their beloved ship to drown the ninjas and then commandeer another one, thus leaving them to set off into the sunset on their heroic quest for gold once again.
However, if the pirates are not so quick to do this, they will still win in the long run as the ninjas will not have had the training required to work the ship. They will probably either run it aground or sink it by steering into rocks (please see previous paragraph for details on ninjas drowning and sunsets for pirates).
So you see, ninjas are really nothing compared to a hook, a wooden leg and bloodthirsty parrot or two.