1. An apparatus for estimating a fraction of carbon dioxide present in a downhole fluid, the apparatus comprising: a carrier configured to be conveyed through a borehole penetrating the earth; a pressure sensor disposed at the carrier and configured to measure an ambient pressure of the downhole fluid; a temperature sensor disposed at the carrier and configured to measure an ambient temperature of the downhole fluid; and a processor configured to receive the ambient pressure and the ambient temperature measurements and solve for the fraction of carbon dioxide in the downhole fluid using a correlation function with the ambient pressure and the ambient temperature as inputs to the correlation function.