You can test the purity using either XRD analysis or EDS (Energy Dispersive spectroscopy) or XPS (X-ray Photoelectron spectroscopy).
XRD peaks will tell you whether any oxides of Ti is present (which you can deduce from the intensity peaks) and EDS will tell you any oxides or carbides or any other metal is present (though you cannot rely on their weight percentages of carbon and oxygen as they are mostly tentative). However, XPS will give you the accurate weight percentages of the impurities if there are any.