Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to recover the weights used to compute a Laspeyres quantity index. The index number's formula is:

$$ Q=\frac{\sum_{i=1}^{N}{p_i^0 q_i^t}}{\sum_{i=1}^{N}{p_i^0 q_i^0}} $$

where in this case $i$ indicates product, $t$ indicates observation date, $p$ is price and $q$ is quantity. In the particular case I'm working on, I have a quantity index of three products. The products and the index all use the sabe period as the base (ie are normalized to 1 in that period). I have the time series for the three products and the resulting index. I want to recover the weights in order to reproduce the index from the product's quantity data.

(I'm trying to check if the a published aggregated index is true to the product quantities that are published elsewhere. There were no doubts formerly about the index's exactitude, so I'm using "old" data to recover the weights and check if the more recent and questioned observations of the index are or are't based on the underlying product quantities. The index is monthly and there are 36-48 "safe" observations and about 60 doubtful observations thereafter. There is little to no doubt about the product quantities obtained from other sources with which I intend to verify the published index.)

It should be as simple as solving the system of equations:

$$ \substack{{\begin{bmatrix} resulting index \end{bmatrix}\\3\times1}} = \substack{{\begin{bmatrix} data \end{bmatrix}\\3\times3}}\times \substack{{\begin{bmatrix} weights \end{bmatrix}\\3\times1}} \\ [data]^{-1}\times[resultingindex]=[weights] $$

Where $[data]$ has products in columns and observations in rows.

I tried this and the result is that the $[weights]$ vector has both positive and negative values, which doesn't make any sense. The resulting recalculated index is equal to the published one during the safe period and shows the expected anomalies in the unsafed period, which are common to other indexes; it fits nicely (actually there are some minor differences which I attribute to the use of not exactly the same sources; on average the indexes differ on about 1% during the safe period). However, if one product with a negative weight increases its quantities, then the aggregated index falls...

I've clearly done something wrong with the math (I don't doubt my Excel implementation but if anyone wishes to check it out I can provide the spreadsheet.)

What is the proper way to do this?


edit: this post should be tagged index-number, I think, but I can't do it because of my rep.

additional clarifications: Just to make it clear. The quantities are units of cars, trucks and bigger trucks. The aggregate index is "vehicles production". Negative weights don't make sense.

share|cite|improve this question
I tried using OLS for computing the weights regressing the resulting index on the quantities indexes and I get almost the same exact result as the one I got with the algebraic method above, which suggests that I have an interpretation problem rather than a math problem. – s_a Nov 29 '12 at 19:20
I don't quite understand your problem, but at first glance, I don't think there is anything wrong. That there are negative weights simply means the resulting index vector cannot be represented by a nonnegative weighted sum of the data vectors. Imagine that the three columns of the data matrix represent three vectors in the 3D space. The region surrounded by these three vectors is a cone. Now, if your resulting index vector does not lie inside this cone, there is no way to get all weights nonnegative. – user1551 Nov 29 '12 at 19:44
The problem is that an increase in the quantities of one of the products that have a negative weight that compose the aggregate index causes the aggregate index to decrease. The weights should all be positive for the solution to make sense. – s_a Nov 29 '12 at 20:20
I understand that only nonnegative weights make sense, but what I mean is: shxt happens. If you data don't allow you to back out positive weights, you have to accept this fact. – user1551 Nov 29 '12 at 22:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.