Logistic regression is a statistical model used to predict the probability of an event based on a set of independent…