Are ordinal data treated the same as continuous data when calculating standardized z-scores?
No, they are not: When dealing with data on different measurement scales it is important that your analysis should not use mathematical operations that are not meaningful within that measurement scale. For ordinal data, only the ranking of the values in the scale is meaningful, and so you should only use operations that are invariant to all changes in the numbering of values that preserve rank-order. This counts out any operation that uses the arithmetic operations $+$, $-$, $\times$ and $\div$.
For ordinal data, the sample mean and sample standard deviation are not invariant to all changes in the numbering of values that preserve rank-order. This means that the sample mean and sample standard deviation are meaningless for ordinal data. Consequently, the z-score is also meaningless.
(Note: In some cases researchers treat apparently ordinal data as if it were interval or ratio data, which amounts to asserting that the differences/ratios in the ordered categories are meaningful. In this case there is often some argument over whether it is justifiable to treat data on a higher measurement level.)
How do I approach nominal variables when calculating standardized z-scores?
Nominal and ordinal variables do not allow use of the arithmetic operations $+$, $-$, $\times$ and $\div$, so the z-score for these variables is meaningless. For a nominal variable the only meaningful measures are those that count frequencies/relative frequencies of the categories and use the operations $=$ and $\neq$. For ordinal variables you also have meaningful measures for cumulative frequencies/relative frequencies using the operations $<$ and $>$ (taken in the order for the ordinal variable).
Best Answer
You could color-code the balls without fundamentally changing the game. Instead of 6-12-11, we get red-blue-pink.
You could go with letters without fundamentally changing the game. Instead of 6-12-11, we get Y-Q-X.
You could use animal drawings without fundamentally changing the game. Instead of 6-12-11, we get dog-fish-horse.
The 6-ball isn’t worth half as much as the 12-ball. It doesn’t even represent a lesser value. The number is just on the ball as a link to lottery tickets.
It could be different if the number represented some kind of quantity, like rolling dice and advancing a game piece that many spots, but there’s nothing quantitative going on. The numbers on lottery balls just serve as links back to the tickets.
You probably can accept this for something like towns having zip codes or people having phone numbers. It’s the same idea.