Mr. Peanut's is the more code efficient method, but the "(count _unitlist)" needs to be : "((count _unitlist) - 1)". Also since you are dealing with a group, the array list can be more easily obtained using: "_unitlist = units group player" (or some other unit name in the group, if it is not the player's group).
So the code should be:
_unitlist = units group player
_n = random ((count _unitlist) - 1)
_n = _n - (_n mod 1)
_speaker = _unitlist select _n
The reason for this is the first element in an array is:
"_this select 0"
NOT:
"_this select 1"
and the last element in the array is:
"_this select ((count array) - 1)"
If you try to get an array element using "_this select (count array)", you will get a division by zero error.