The male mandarins have much longer dorsal fins than the females when sexually mature.
I don't understand the question though, if the fish was killed by an aggressive trigger why should it matter what sex the goby is? You can keep a male and female mandarin together or two females. Two males will probably fight unless the tank is large enough but they're all just food as far as the trigger is concerned.