To improve the accuracy of conventional white light endoscopy in detecting the small lesion and identifying the margin of observable tumors, in vivo, the potential of light-induced fluorescence (LIF) spectroscopic imaging, using a general multivariate spectral classification algorithm, was evaluated. A conventional endoscopic system with a multiple channel spectrometer was used to measure the autofluorescence of nasopharyngeal tissue in vivo. Classification was based on the spectral difference between the carcinoma and normal tissue. A sophisticated algorithm based on Principal Component Analysis (PCA) was developed to differentiate between the nasopharyngeal carcinoma (NPC) from the normal tissue. Firstly, preprocessing was done to reduce noise and to calibrate the different measurement distances and geometry. Secondly, processing by PCA was done to effectively reduce the variable dimensions while maintaining useful information for analysis. Thirdly, various post-processing techniques were investigated and the classification performance was compared. Algorithms based on ratio of autofluorescence at two-wavelength and three-wavelength bands were used for comparison. The PCA based method shows a significant improvement over the two-wavelength and three-wavelength algorithm. Based on the entire spectra, the sensitivity of 92% and specificity of 96% were achieved using the PCA based algorithm for the detection of nasopharyngeal carcinomas. In conclusion, the PCA based statistical algorithm is efficient to achieve high spectral classification performance of NPC.