# Probability and probability amplitude [duplicate]

What made scientists believe that we should calculate probability $P$ as the $P = \left|\psi\right|^2$ in quantum mechanics? Was it the double slit experiment? How? Is there anywhere in the statistical mathematics a similar equation where we calculate probability like $P=\left|x\right|^2$ where $x$ is whatever?