In this study we compare nearly 5 years of solar wind proton speed and temperature measurements from the Solar Wind Electron Proton Alpha Monitor (SWEPAM) on the Advanced Composition Explorer (ACE) to derive an improved expected temperature formula to identify interplanetary coronal mass ejections (ICMEs). Anomalously low proton temperatures have long been associated with ICMEs. When transient ICMEs are not present, the solar wind speed and temperature are highly correlated, and previous studies have derived fits to these measurements. Using these fits, an expected temperature is determined from the solar wind speed. Anomalously low temperatures have been identified as times when the ratio of the measured to expected temperature is below 0.5. In this study we remove ICMEs before fitting the remaining data. Fast and slow parcels in the solar wind interact and cause compressions and rarefactions as the solar wind moves away from the Sun. Since such interaction causes the speed and temperature of these parcels to change, we separately fit compression and rarefactions. We find that the expected temperature formula derived in this way provides a better way of identifying ICMEs than previous formulas, particularly in compression regions.