For example, given the probability distribution between two similar weapons:
D&D 5E Weapons - Basic Rules pg.48:

Damage Discrete Distribution - AnyDice:

Its evident that Greatsword is more reliable and has a higher mean damage roll.
But how does this change if we factor in an attack roll with some chance to hit? Do critical hits make the Greataxe preferential?