In Thomson's cathode-ray experiment,He sucked all of the air out of the tube, so only the ray was inside. He then concluded that the ray was negatively charged because the ray came from the cathode ray and went to the positively charged anode ray, so the cathode had to be negative or else it would have deflected away from the anode.
Hope this helped ! Let me know if you need more information ! :)