  For positive $q\neq1$, the $q$-exchangeability of an infinite random word is
introduced as quasi-invariance under permutations of letters, with a special
cocycle which accounts for inversions in the word. This framework allows us to
extend the $q$-analog of de Finetti's theorem for binary sequences---see Gnedin
and Olshanski [Electron. J. Combin. 16 (2009) R78]---to general real-valued
sequences. In contrast to the classical case of exchangeability ($q=1$), the
order on $\mathbb{R}$ plays a significant role for the $q$-analogs. An explicit
construction of ergodic $q$-exchangeable measures involves random shuffling of
$\mathbb{N}=\{1,2,...\}$ by iteration of the geometric choice. Connections are
established with transient Markov chains on $q$-Pascal pyramids and invariant
random flags over the Galois fields.
