The compound inequality that represents the sentence "A quantity \( x \) is either less than four or greater than 27" can be expressed as:
\[ x < 4 \quad \text{or} \quad x > 27 \]
This indicates that \( x \) can either be less than 4 or greater than 27.