All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
This question reflects taking matters to an extreme depth and investigating them in a dispraised manner.
There is no sane person who says that mathematics is forbidden. Mathematics, in general, is a useful science, and there is no harm in studying it, teaching it, and selling its books.
Many important theories are based on the laws of probability.
We do not know what is the Islamic prohibition that you see in it. If you imagine that this involves indulging in the Unseen, then this is a strange imagination, and it is not worth attempting to prove its falseness.
It is apparent that such questions stem from whispers. Therefore, we advise you to repel them and not pay any attention to them.
Allah knows best.