An epidemic is defined as a disease that can affect a large number of people in a given population and…