I need to be corrected if i have something wrong :
the elasticity of the demand is calculated : dq/dp if q is the quantity and p the price
so to calculate it i take two prices p1 and p2, if i have an f function of the demand over the price i will have q1=f(p1) and q2=f(p2)
the elasticity will be
e=((p1 + p2) * (q2 - q1)) / ((q2 + q1) * (p2 - p1))
If i have a constant model:
to fit the curve i use log(Q) and log (P)
so i will have:
log(Q)=log(A)-B*log(P)
If i fit the curve with a linear model i will have a constant b=log(A)
and a slope a=-B
log(Q)=b+a*log(P)
and -B is the elasticity .
but if I take and example from my data i found constant b= 74.90 and a slope a=-11.78
so the elasticity is supposed to be equal to -11.78.
but if I take two points and want to apply the first formula of the elasticity
e=((p1 + p2) * (q2 - q1)) / ((q2 + q1) * (p2 - p1))
let's say p1=1 and p2=2
if i want to calculate the demand
Q= exp(b+a*log(P))
Q= exp(b)* pow(p,a)
( is it correct?) so if i replace by p1 and p2: q1=3.39 and q2=9.60 and e=-2.99 which is different from -11.78 and i dont get where am i wrong