I'm a PhD student in computer science. At the end of the year I will finish my coursework and be awarded a master's degree. Due to the nature of my research (machine learning) I'm considering taking additional classes to get a master's in statistics. The obvious pro is that I will gain a deeper understanding of topics that I will otherwise be generally self studying. The obvious drawback is that coursework takes time away from research. How do I weigh these pros and cons appropriately? Thanks.
You seem (at least in your question) to have skipped over a middle option: as a PHD student in computer science at an American university, it is likely that with no additional paperwork you can enroll in graduate courses in the statistics department.
(As with all things academic, it would be good to run this past your supervisor, but as long as you can explain (i) why you think it will be useful to you and (ii) why it will not significantly impede the progress on whatever else you are supposed to be doing, s/he ought to be supportive of it. If the statistics coursework is directly relevant to your thesis research, s/he ought to be enthusiastic, even.)
You can then take exactly the courses to develop the knowledge and skills you need. I don't know your situation, but it seems very unlikely that what you want to learn will coincide precisely with the set of requirements for a master's degree in statistics. And in terms of your credentials: unless you are looking for a post-PhD position specifically in statistics, given that you already have one master's degree and are going for a PhD, I don't see a second master's degree in statistics as having much value to you. (Even then, unless your career goal is to be some kind of adjunct lecturer in a statistics department, a second master's degree is not guaranteed to be directly helpful: if you have specific career goals then you should ask around as to what credentials best help you achieve these goals.)
As to the value of the coursework itself versus the time for your CS research: Suresh's comment is the best answer that I can think of to that. You're right; there are pros and cons to be weighed against each other. We can't do that for you nearly as well as you can do it for yourself. Your supervisor is the natural person to go to for some additional insight, but in my opinion the final decision is really yours.