Statistics for Classification of stars using optical spectra