This paper discusses a method to apply the science of logic to prtobability. First this paper discusses the relations between probability and sciences. Next, this paper forcuses mathematics which is similar to the science of logic, and compares the methods to apply them to sciences. Lastly, this paper shows the formalisation and the analisys of probability in a problem of cryptography by the science of logic.