A Weighted Analysis to Improve the X-Ray Polarization Sensitivity of the Imaging X-ray Polarimetry Explorer