a police force doesn't prevent you from being attacked, they only dispense justice after the fact and only sometimes.
welfare, courts and legal systems have a far larger impact than police as a means to prevent violence by having a peaceful way to resolve issues between individuals and ensuring basic needs are met. they also happen to be cheaper.
most violence happens at the edge of society where people cannot avail themselves of the court system. (drugs/prostitution)