The training data is used to create the model. Recall, that he had split the data into the training and the testing set. He evaluates the performance of the model on both training and test data. If the width of the car increases by 6% then the price of the car increases by 1 %.įernando has now built the log-log regression model.If the horse power increases by 4.62% then the price of the car increases by 10%.If the engine size increases by 4.7% then the price of the car increases by 10%.Adjusted r-squared is 0.8276 => the model explains 82.76% of variation in data.log(width)įollowing is the interpretation of the model: He wants to estimate the change in car price as a function of the change in engine size, horse power, and width.įernando trains the model in his statistical package and gets the following coefficients. Now that we understand the concept, let us see how Fernando build a model. But how does it represent elasticity? Let us take derivative of log(y) wrt x, we get the following:.This equation can be now rewritten as: log(y) = β 0 + β 1. Doesn’t equation #1 look similar to regression model: Y= β 0 + β 1.Let us first express this as a function of log-log: log(y) = log(α) + β.log(x).So does it mean for linear regression models? Can we do mathematical juggling to make use of derivatives, logarithms, and exponents? Can we rewrite the linear model equation to find the rate of change of y wrt change in x?įirst, let us define relationship between y and x as an exponential relationship Imagine a function y expressed as follows: The logarithm of an exponential is exponent multiplied by the base.Their rules of engagement are as follows: Now let us bring these three mathematical characters together. dq/dP is the average change of Q wrt change in P.Say that we have a function: Q = f(P) then the elasticity of Q is defined as: It looks something like this:Įlasticity is the measurement of how responsive an economic variable is to a change in another. If logarithms are applied to both x and y, the relationship between log(x) and log(y) is linear. The diagram below, shows an exponential relationship between y and x: It transforms an exponential relation into a linear relation. It also has interesting transformative capabilities. The logarithm with base e is called as Natural Logarithm. It is called as “Euler’s number (e).” Its approximate value is 2.71828.
There is another common base for logarithms.
Let us only understand its personality applicable for regression models. The logarithm is an interesting character.
An increase in x doesn’t yield a corresponding increase in y.Geometrically, an exponential relationship has following structure: Again Euler’s number (e) is a common base used in statistics. An exponential is a function that has two operators. This character is again a common character in high school math. Here come two more mathematical characters.