I've been learning idioms related to body parts, when some like these struck me:
1 A lot of young vandals who go looking for trouble are not right in the head.
2 Can you do this calculation in your head?
The in the head in 1 denotes a not-so-correct moral code in "young vandals"'s mind.
The in one's head (as in "in your head") in 2 denotes doing something inside your mind instead of physical acts.
My question is, as a simple difference between "the" and "one's" in an idiom can cause such diversion in meanings, is there any clear sign to tell when to choose the and when using one's instead? Or are the idioms' choice of words like these just as random as its origin and spread?
Thanks!