# How to estimate parameters in a utility function?

Utility function is $U = X^aY^b$.

It is a Cobb-Douglas function, and there are data for $X$ and $Y$.

I would like to know how to estimate $a$ and $b$.

• What kind of data do you have exactly? If I say I ate two apples and an orange you have no idea about my utility. Yet this was data for X and Y. Aug 14 '16 at 12:17
• There is no data for U and a and b must be positive. If there is data for U, then I can use the natural logarithm. But in this case, a or b might be a negative value. I would like to know how to estimate the positive values of a and b without data for U.
– Marx
Aug 15 '16 at 3:26
• In addition to stable preferences, you need to know $P_X$ and $P_Y$ to estimate these parameters. These preferences imply a constant expenditure share of X and Y and you can solve for $a$ and $b$ using those expenditure shares, but only if you know the quantities and prices of the goods consumed.
– BKay
Aug 16 '16 at 13:21
• Thank you very much for your comments. U = (1/a)*(CMGS^bEQ^c)^a
– Marx
Aug 17 '16 at 7:15

as @ts_highbury mentioned above you can take the natural logarithm on both sides of Cobb-Douglas equation $$\ln(U) =a\ln(X)+b\ln(Y)$$ after that "obviously" you can notice the equation became linear in parameters (i.e linear equation), so you can use a various types of estimation methods but most famous also easy one is the Least squares method.

P.S: be careful in interpreting the results after taking the natural logarithm or you can just take the exponentiation on both side of the linear Cobb-Douglas equation (after taking natural logarithm) and you will have the original form of Cobb-Douglas equation.

• Thank you very much for your answer. If there are data for U, such as Cobb-Douglas production function, then we can use the natural log to estimate a and b. But in this case, there are no data for U. Also, I would like to know how to get the positive values for a and b. Sometime, a or b show the negative values.
– Marx
Aug 15 '16 at 3:30
• Dear @Marx ,you are welcome ! sorry for giving you a wrong answer. the coefficients a and b of the model represent the rate of change of output variable U as a function of changes in the input variables X and Y respectively, to estimate these coefficients you need the data of U or at least the estimated data of U.
– user10113
Aug 15 '16 at 7:57
• Now, regarding to get positive values for a and b you can use a constrained least squares which can be solved by a convex optimization problem (Quadratic programming) so called Non-negative least squares, this method only allows the coefficients to be positive and can be done easily using R package (nnls) or Matlab (lsqnonneg).. hope this will help you
– user10113
Aug 15 '16 at 7:59
• Thank you very much for your comments. It is very helpful. I would like to extend these problem with some specific example. Let's U = (1/a)*(CMGS^bEQ^c)^a, U=utility function, C = consumption, MGS = foreign imported goods, EQ = Environmental quality, and a, b, c = parameters. b,c>0; -infinity<a<1; a(b+c)<1; a(1+b+c)<1. In this case, I would like to know how to estimate the parameter values (a, b, and c). If you have any idea, please let me know.
– Marx
Aug 17 '16 at 7:35
• Dear @Marx By little math the model can be transformed into linear form as follows: lnU=-ln(a)+ ab(ln(C)+ln(MGS))+acln(EQ) then you can rewrite it as: y=bo+b1*x1+b2*x2. where y=ln(U), x1=(ln(C)+ln(MGS)), x2=ln(EQ), bo=-ln(a), b1=ab, b2=ac and the constrained will be as follows: b1/e^(-bo), b2/e^(-bo)>0 ; -infinity< e^(-bo)<1; (b1+b2)<1; (e^(-bo)+b1+b2)<1. see most of the constrained are no more linear (make sure they can't be transformed into linear or at least not all of them), then you can use one of constrained nonlinear optimization methods like nonlinear programming for this problem.
– user10113
Aug 18 '16 at 7:29

If you transform $X$ and $Y$ into their natural logarithms, then $a$ will be given by the coefficient on $x$ and $b$ will be given the coefficient on $y$

• Thank you very much for your answer. Please see my comment above.
– Marx
Aug 15 '16 at 3:32
• In that case, I would look into principal component analysis and/or dynamic factor models. Aug 15 '16 at 4:56
• Thank you very much for your comments. I would like to extend these problem with some specific example. Let's U = (1/a)*(CMGS^bEQ^c)‌​^a, U=utility function, C = consumption, MGS = foreign imported goods, EQ = Environmental quality, and a, b, c = parameters. b,c>0; -infinity<a<1; a(b+c)<1; a(1+b+c)<1. In this case, I would like to know how to estimate the parameter values (a, b, and c). If you have any idea, please let me know. Thank you very much in advance.
– Marx
Aug 17 '16 at 8:09