What are important pure mathematics courses for a prospective statistics PhD student? I know that linear algebra and analysis (especially measure theory) are important. Is it helpful to take graduate level courses in real and complex analysis? Should I take courses in abstract algebra beyond the introductory courses, e.g., commutative algebra and algebraic geometry? 
 A: In my opinion, some options to investigate at the graduate level could be: functional analysis (a natural framework for statistical formulations), stochastic processes, stochastic control (sequential analysis is optimal stopping), various flavors of PDE (many probabilistic problems are formulated as parabolic and nonlinear PDE's).  Pretty much all of these require real analysis at an undergrad level.  If you're interested in theoretical stuff, then taking measure theory is also pretty important as a prerequisite for the full treatment of these topics.  Complex analysis will have some use, but less than the above; there are connections to probability (i.e. harmonic functions), but it could very well be not worth it
Commutative algebra and algebraic geometry will be not be very useful (one connection I can think of is algebraic statistics, which isn't widely taught).  These topics will also be very challenging without a solid background in mathematics.  
A: If you want to understand measure theory you have no choice but to take real analysis and advanced analysis (i.e. point set topology). Abstract algebra is definitely more grade-friendly than analysis, however I think it is far less useful.
A: Get real analysis, but not in the way I see people do it. When we interview math undergrads they don't seem to master the tools of real analysis, simple things like taking integrals are out of reach for most of them. I still don't understand why. So, my advice: pay attention to applications first and foremost.
Also get ODE and PDE course, and functional analysis and differential geometry. Linear algebra and tensors, of course, too. All with focus on applications.
A: With regards to commutative algebra and algebraic geometry, the subjects which are least addressed in the other answers, my impression is that as long as you avoid algebraic statistics, you can get by entirely without them. Avoiding algebraic statistics may be more and more difficult in the future though, since it has a lot of applications and intersections with machine/statistical learning, which is very prominent in present-day research, as well as applications in other areas. Commutative algebra and algebraic geometry are the subjects you want to learn the most specifically for algebraic statistics, see for example the answers to this question: Algebraic Geometry for Statistics
In contrast, all subfields of statistics use analysis. (Not so much complex analysis though, although that may be useful for understanding characteristic functions, a point which seems not to have been raised yet.) I think undergraduate level measure theory would probably be sufficient, since I have met professional statisticians (e.g. professors at top departments) who look down on measure theory, but if you really want to understand measure theory, a graduate level course in real analysis is a great help. Undergraduate measure theory tends to focus exclusively on Lebesgue measure on the real line, which has a lot of nice properties which general measures may not necessarily have, and moreover is an infinite measure. In contrast, a graduate level real analysis course will tend to have more emphasis on abstract measures, which make probability measures in general easier to understand, and also make the relationship clearer between continuous and discrete probability measures -- in other words, you will be able to see both subjects come together within one framework in your mind for the first time. Likewise, one might prove the Kolmogorov extension theorem in such a course. And an understanding of abstract measures is really indispensable for a rigorous understanding of stochastic processes in continuous time. It is even useful for understanding stochastic processes in discrete time, although less important than in the continuous case.
