If I could be so bold as to dissect the nuances:
Ninja are viewed as subversive, using the element of surprise, and any tactic or ploy that serves their purpose, and and therefore viewed as somewhat cowardly.
Samurai are viewed as fearless warriors, with honor and a code that is stringently adhered to.
That's what makes the Samurai mightier than the Ninja.
At least that's what I've grasped from the movies.