Statistical moments of quantum-walk dynamics reveal topological quantum transitions