Academics have one job, to advance knowledge within their field. The two ways they do this are by teaching and researching. Both are obviously important because teaching communicates what is already known within the field, while research creates new knowledge. Economic research involves quite a bit of quantitative measurement and seeing if one thing is statistically related to another.

The problem with this is the mere mention of maths or stats tends to send students running for the hills, so for today’s post I thought I would explain how to calculate the slope parameter of a regression line. Doing this can basically show us how much one thing effects another, or more specifically; the expected change in one variable if another variable were to increase by one unit.

For this example I thought I would calculate how much practice can effect performance. My first variable (Y) will be how good someone is at playing guitar, the second variable (X) will be how many hours of practice someone does. The variable will be measured by giving someone a score between 1-5 depending on how good they are at playing guitar, 1 being the worst and 5 being the best. The variable then will be measured by whatever number of hours the person spent practicing guitar.

I would expect a positive linear relationship between these two variables i.e. the more you practice guitar, the better you would be at guitar. To calculate this I need data on these two variables and I need to then use the formula to calculate the slope parameter. The data can be seen in the below table:

 Person ID: Performance (Y): Hours Practiced (X): Person 1 5 10 Person 2 5 10 Person 3 4 10 Person 4 3 6 Person 5 3 4 Person 6 3 4 Person 7 1 1 Person 8 1 1 Person 9 1 1 Σ (Total) 26 47

Now that we have the data we just need to fill it in to the formula, which can be seen below: In the above formula β1 just represents the coefficient for the X variable and it’s statistical relationship to the variable. So if we got a value of +2 for this we would know that for every unit increase in hours practiced, you get an additional 2 scores better at playing guitar.

n just represents the sample size, so in our case, we have data about 9 people so n=9. Σ just means the sum of, so when we see Σx, this means the sum (total) of all the values for X. The first bit of the formula which says nΣxy just means 9 multiplied by the sum of all the X and variables multiplied by each other, if we see x and y together like this xy it means their values have to be multiplied by each other. These calculations are worked out in the below table:

 N: Y: X: YX: X^2: 1 5 10 50 100 2 5 10 50 100 3 4 10 40 100 4 3 6 18 36 5 3 4 12 16 6 3 4 12 16 7 1 1 1 1 8 1 1 1 1 9 1 1 1 1 Σ (Total) 26 47 185 371

Now that we have these calculations worked out we can fill them into the formula, which can be seen below:    So in this case we calculated that the slope parameter or coefficient value was 0.39. This means that for every one additional hour spent practicing guitar, your performance score increases by roughly +0.39 scores. It is worth noting as well that this score can also be negative, if this were the case and we got a score -0.39 it would mean that every additional hour spent practicing guitar decreases your performance score by -0.39 scores.

However, since our score is positive we know practice actually helps your ability to perform; and that’s how you calculate whether practice really does make perfect.

By Daragh O’Leary