How to tell whether a line coding scheme has DC component or not
How to tell if a signal has a DC component or not?

Every symbol used in the communication should have a signal average of 0 for the duration of the symbol.  A single symbol may code multiple bits.  In 4-PSK a single symbol codes two bits for example.

In the Polar NZ encoding scheme it is obvious that the symbol for 0 has a negative value and the symbol for 1 has a positive value.  Therefore it has a DC Component.

Statistically, if there are as many 0s as 1s over a given time period, the overall DC component for Polar RZ can be close to 0, but you can not guarantee it unless you have control of the higher level protocol and ensure that it has as many 0s as 1s.

Polar NZ and your textbook statement.

As said, Polar NZ has a DC component, but why does the textbook suggest otherwise?

I found a very similar image on reserach gate, without the colors:
https://www.researchgate.net/figure/Polar-RZ-type-coding-Manchester-and-Differential-Manchester-The-awareness-of-RZ_fig30_288180515



I can read in that publication:


  Return to Zero (RZ) The main problem with NRZ encoding occurs when the
  sender and receiver clocks are not synchronized. The receiver does not
  know when one bit has ended and the next bit is starting. One solution
  is the return-to-zero (RZ) scheme, which uses three values: positive,
  negative, and zero. In RZ, the signal changes not between bits but
  during the bit. In Figure 48 we can see that the signal goes to 0 in
  the middle of each bit. It remains there until the beginning of the
  next bit. The main disadvantage of RZ encoding is that it requires two
  signal changes to encode a bit and therefore occupies greater
  bandwidth. The same problem we mentioned, a sudden change of polarity
  resulting in all as interpreted as 1s and all 1s interpreted as 0,
  still exist here, but there is no DC component problem.


I agree that the explication could be improved, but the exact phrase there is "... there is no DC component *problem*" .

What is a DC component problem?  If you decouple a signal towards an input stage, and you would be encoding 1 as a high level and 0 as a low level (classic digital encoding), you would not be able to know whether the signal is a zero or a one in the middle of a communication.

However, with the Polar NRZ encoding, there is a DC Component, but not a DC Component Problem.  From the variations in the signal you can determine if you are reading a 0 or a 1.

However there is still an issue.  Suppose that the emitter is sending a very long sequence of ones while the receiver is off.  And then you switch on the receiver.  You will not be able to determine if you are receiving ones or zeros when you switch the device on.  You need at least a 1 and a 0 to be sure, only then there is no DC component problem.

The text is not carefully phrased and the sentence "The same problem we mentioned, a sudden change of polarity resulting in all as interpreted as 1s and all 1s interpreted as 0, still exist here, but there is no DC component problem." seems to be wrong they might have meant "The same problem we mentioned, a sudden change of polarity resulting in all *0s* interpreted as 1s and all 1s interpreted as 0, still exist here, but there is no DC component problem." to refer to the issue I just mentionned, but we can agree that this is not very clear.

So I argue that the text does not mean to say that there is no DC Component, but only that there is no DC Component Problem.  In other words, the absence or presence of the DC Component is not important (except for long sequences of 0s or 1s at the start of the communication).