Writing for Significance magazine, Matthew Brasalou has applied a Bayesian statistical analysis to the most important question in the original Star Trek universe: is wearing a red shirt a harbinger of an untimely death? Through several graphs and detailed breakdown of percentages, the research ultimately yields this: red shirts in general do seem to die more in terms of numbers of casualties, though his only seems to apply to those in the security department. Folks in Engineering or Operations seem relatively safe, and when isolated from their security counterparts and then compared against other colors, the gold color of Command gets a little more dangerous.
Brasalou based this data on the classic Star Trek series only, which is fair enough, as at a certain point in Trek history the color red becomes the only color everyone wears. And naturally, by the time of The Next Generation, Command wears red, which I bet would likely throw everything off.
But, the real question I have is this: what is the statistical mortality rate of the beige shirts of the Star Trek: The Motion Picture uniform era?