How to calculate Beta with Regression Analysis?

Remember that beta is the expected percentage change in a securities return given that there's a 1% change in the market index. So if a company has a beta of 2 in the market index was to go up by 1% you'd expect a 2% increase in that stock's return. Now you can calculate the beta of any stock by saying what's the covariance of that stock return, so that will be the returns for the firm Ri, let's say Walmart, and then you could take the returns of the market index, let's say the returns for SP 500. Take the covariance of that and divide it by the variance of the returns of the market index that will give you the beta for firm Ri and again let's say it's Walmart or something so you'd have the beta for Walmart. But another way of thinking about it is instead of just saying the covariance divided by the variance you can also think about the beta as the coefficient and regression that I'll show you. I'll go through the results of a regression so you could think about it as the slope of the line when you actually plot a securities excess returns against the market's excess returns, and when I say excess returns I mean returns over and above the risk-free rate.


Let me show you an example to point out what I mean by these words. So let's say that we have monthly returns for 6 months, we've got monthly returns for a company called Bubsy, and then we've got a market index to let's say it's the S&P 500 and we've got for six months. We don't have a lot of data points here just six observations but we have different returns say for example at March Bubsy you had a return of 21% and the market index returned 13% and then we're also going to assume that the risk-free rate of return there's 3%. So investors at any point in time without bearing any risk at all they could get a return of 3%.


That's going to become important because again I said we're plotting the excess returns of the security against the excess returns of the market. So we're gonna have to subtract 3% from each of these returns before we perform our regression analysis. Here is actually the model that we're going to be performing for our regression analysis. So we've got the return of the Bubsy that's a stock Ri, in this case (i) could be any company, could be Walmart, could be Costco, but in this case, it's Bubsy.


So the return of Bubsy minus returned the risk-free rate. So we're gonna take 11% minus 3%, so that's gonna be 8% and then 17% minus 3% is gonna be 14% and so forth. We're also gonna do that for the market index here because we've got (Ri - Rf) which is our excess return for Bubsy and then we've got the market return minus the risk-free rate which is (Rm Rf), so we call this is a market premium or the excess return of the market. So we've got the amount the market earns over and above the risk-free rate. So this beta in the formula here if you're familiar with regression analysis, is just a coefficient estimate that says "When this (Rm Rf) goes up by 1 what happens to the dependent variable." This right side of the formula is our independent variable, I don't want to get too much into statistics in case you haven't had it before but this left side of the formula is our dependent variable.

So if you're using Stata or Excel or anything like that if it's asking you for the X variable in Excel, the independent variable will be referred to as the X variable and then the dependent variable on the left-hand side will refer to as the Y variable. So here is our dependent variable on this left-hand side and then we've got our independent variable or independent variable which is the excess returns of the market. So we're trying to say in in laypersons terms how do changes in this variable elite predict changes in this variable how do changes in the excess return of the market predict changes in the excess return of Bubsy.


So when we take this independent variable, we input excess market index values as independent variables, so let's say you were using excel you input these values when you're doing regression, and then you input excess Bubsy return variables as your dependent variable, and then it's gonna give you a coefficient estimate for the beta (βi). This beta is basically a coefficient estimate it's a weight if you think about like if there's a one-unit increase in the independent variable in this what is the predicted increase in the dependent variable. So that's really all beta is.

Then in our formula, we have an alpha (α) that's the intercept, we think about a regression line if we're going to plot a line and where it intersects with the y-axis that's alpha. We'll come back to talk about alpha in another article and then we've also got an epsilon (ε) that's the error term or residual, you don't worry about that for right now let's just focus on the beta. So we have some results I get by using excel but again you can use SPSS something like that and so our beta is 1.85 there's a bunch of other digits and stuff but let's just stick with 1.85.


What does that mean when we say the beta is 1.85, that means if there is a one-unit increase in our independent variable there is a 1.85 increase in our dependent variable. That means that  Bubsy stock returns are very sensitive to the market returns. Let's say that the beta was like 0.1 or something like that, that would say if the markets have really high returns or if they do really well or really poorly Bubsy isn't affected much. But that's not the case we don't have a small beta we have a decent-sized beta here so if there's a 1% increase in the market return we would expect there be a 1.85 increase in Bubsy stock return.


Now we can also think about things like the P-value and that gives us a measure of statistical significance. I actually have very high statistical significance here so it suggests this is a very strong relationship. We also have things called R square which Excel and in any statistical software package will tell you when you run a regression and it's basically saying that there's more than 99% of the variation in the dependent variable which is, in this case, is Bubsy's excess returns is being explained by our independent variable. Here we just have one independent variable so in other words in laypersons terms is saying Bubsy's stock returns are very strongly related to the market's returns and it's such that Bubsy's return is very sensitive so it's almost double when the market goes up, then bubbies Bubsy stock goes up almost by twice. If the market goes down, Bubsy's go down even more. So there's a 1% decrease then I have a 1.85 decrease in Bubsy stock and this relationship is very significant.