Automating statistics