Probability is a branch of mathematics that deals with the likelihood of an event occurring. It is important to understand…