the regression line is designated as a signal to be used for determination the signal representing the distance contains an intensity component this makes it hard to lower the threshold to be used for the determination fig7 shows the waveform of a component dy in a signal intensity direction of a distance between a regression line and each of signal points compared with the waveform shown in fig5 and used to sample the component dt in the time base direction of the distance from the regression line the waveform shown in fig7 demonstrates that a large amount of noise is contained in the signal moreover another crest is observed at the trailing end of the waveform the crest is observed because the waveform of a light signal has fallen when the luminous intensity signal component is employed the crest component cannot be removed for detection of an endpoint determination may be performed late using for example the trailing part of a waveform for example at a step of detecting an endpoint in the course of etching even when a residue or the like remains if the etching should be continuously performed it is effective to perform endpoint determination late in this case there is a fear that erroneous determination may be invited due to.