The consumer price index (CPI) is an index that measures the average level of prices of goods and services in an economy relative to a base year. To track only what happens to prices, the quantities of goods purchased is assumed to remain fixed from year to year. This is accomplished by determining—with survey methods—the average quantities of all goods and services purchased by a typical household during some period. The quantities of all of these goods together are referred to as the average market basket. For example, the survey might find that the average household in one month purchases 10 gallons of gas, 15 cans of beer, 3.2 gallons of milk, 2.6 pounds of butter, and so on. The basket of goods would also contain items like health and auto insurance, housing services, utility services, and many other items. We can describe the market basket easily as a collection or set of quantities (Q_{1}, Q_{2}, Q_{3},…, Q_{n}). Here Q_{1} may be the quantity of gasoline, Q_{2} the quantity of beer, and so on. The set has n different quantity entries, implying that there are n different items in the market basket.
The cost of the market basket is found by surveying the average prices for each of the n products in the market in question. This survey would yield a collection or set of prices (P_{1}, P_{2}, P_{3},…, P_{n}). The cost of the market basket is then found by summing the product of the price and quantity for each item. That is, CB = P_{1}Q_{1} + P_{2}Q_{2} + P_{3}Q_{3} +…+ P_{n}Q_{n}, or
$$CB={\displaystyle \sum _{i-1}^{n}{P}_{i}{Q}_{i}}\text{.}$$The first year in which the index is constructed is called the base year. Suppose 1982 is the base year for the United States. Let CB_{YY} represent the cost of the market basket evaluated at the prices that prevail in the year (YY) (e.g., CB_{09} is the cost of a market basket evaluated in 2009 prices). The CPI is derived according to the following formula:
$$CP{I}_{YY}=\frac{C{B}_{YY}}{C{B}_{82}}\times 100\text{,}$$where CPI_{YY} is the CPI in the year (YY). The term is multiplied by 100 by convention, probably because it reduces the need to use digits after a decimal point. Notice that the CPI in the base year is equal to 100—that is, CPI_{82} = 100—because CB_{82}/CB_{82} = 1. This is true for all indices—they are by convention set to 100 in the base year.
The CPI in a different year (either earlier or later) represents the ratio of the cost of the market basket in that year relative to the cost of the same basket in the base year. If in 1982 the cost of the market basket rises, then the CPI will rise above 100. If the cost of the market basket falls, then the CPI would fall below 100.
If the CPI rises, it does not mean that the prices of all the goods in the market basket have risen. Some prices may rise more or less. Some prices may even fall. The CPI measures the average price change of goods and services in the basket.
The inflation rate for an economy is the percentage change in the CPI during a year. Thus if CPI_{08} on January 1, 2008, and CPI_{09} on January 1, 2009, are the price indices, then the inflation rate during 2008 is given by
$${\pi}_{08}=\frac{CP{I}_{09}-CP{I}_{08}}{CP{I}_{08}}\times 100.$$The purchasing power parity relationship can be written using the CPI with some small adjustments. First, consider the following ratio of 2009 consumer price indices between Mexico and the United States:
$$\frac{CP{I}_{\text{p}}^{09}}{CP{I}_{\text{\$}}^{09}}=\frac{\raisebox{1ex}{$C{B}_{\text{p}}^{09}$}\!\left/ \!\raisebox{-1ex}{$C{B}_{\text{p}}^{08}$}\right.}{\raisebox{1ex}{$C{B}_{\text{\$}}^{09}$}\!\left/ \!\raisebox{-1ex}{$C{B}_{\text{\$}}^{08}$}\right.}=\frac{C{B}_{\text{p}}^{09}}{C{B}_{\text{\$}}^{09}}\frac{C{B}_{\text{\$}}^{08}}{C{B}_{\text{p}}^{08}}=\frac{\raisebox{1ex}{$C{B}_{\text{p}}^{09}$}\!\left/ \!\raisebox{-1ex}{$C{B}_{\text{\$}}^{09}$}\right.}{\raisebox{1ex}{$C{B}_{\text{p}}^{08}$}\!\left/ \!\raisebox{-1ex}{$C{B}_{\text{\$}}^{08}$}\right.}\text{.}$$Given that the base year is 2008, the ratio is written in terms of the market basket costs on the right-hand side and then rewritten into another form. The far right-hand side expression now reflects the purchasing power parity exchange rates in 2009 divided by the PPP exchange rate in 2008, the base year. In other words,
$$\frac{CP{I}_{\text{p}}^{09}}{CP{I}_{\text{\$}}^{08}}=\frac{\raisebox{1ex}{$C{B}_{\text{p}}^{09}$}\!\left/ \!\raisebox{-1ex}{$C{B}_{\text{\$}}^{09}$}\right.}{\raisebox{1ex}{$C{B}_{\text{p}}^{08}$}\!\left/ \!\raisebox{-1ex}{$C{B}_{\text{\$}}^{09}$}\right.}=\frac{{}^{09}E{}_{\text{p/\$}}^{\text{PPP}}}{{}^{08}E{}_{\text{p/\$}}^{\text{PPP}}}\text{.}$$So, in general, if you want to use the consumer price indices for two countries to derive the PPP exchange rate for 2009, you must apply the following formula, derived by rewriting the above as
$${}^{09}E{}_{\text{p/\$}}^{\text{PPP}}={}^{\text{base}}E{}_{\text{p/\$}}^{\text{PPP}}x\frac{CP{I}_{\text{p}}^{09}}{CP{I}_{\text{\$}}^{09}}\text{,}$$where ${}^{\text{base}}E{}_{\text{p/\$}}^{\text{PPP}}$ represents the PPP exchange rate that prevails in the base year between the two countries. Note that in order for this formula to work correctly, the CPIs in both countries must share the same base year. If they did not, a more complex formula would need to be derived.
Suppose a consumer purchases the following products each week: ten gallons of gas, fifteen cans of beer, three gallons of milk, and two pounds of butter. Suppose in the initial week the prices of the products are $3 per gallon of gas, $2 per can of beer, $4 per gallon of milk, and $4 per pound of butter. Suppose one year later the prices of the same products are $2 per gallon of gas, $3 per can of beer, $5 per gallon of milk, and $5 per pound of butter.