I thought hashing power is an expression of the probability of being the one to solve the cryptographic puzzle and placing a new block on the network.
If that's true, owning 51% of the hashing power should just give a slightly higher chance of mining a new block than 49% hashing power. However when I read articles explaining Bitcoin and mining, owning 51% of the hashing power in the network is presented as a guarantee to be able to outpace the rest of the network, to the point where an alternate chain can be created and funds double spent.
Given what I assume (could be wrong) is a marginally higher probability of solving the puzzle first at 51%, how does that make sense? Couldn't someone who got a little lucky do that with 40% of the hashing power? How does 51% of the hashing power guarantee that one will be able to carry out an attack on the network?