# Binary depedent variable in linear regression: need your helps!

#### androman

##### New Member
y i =a+bD i +u i ,i=1,…,n (regression equation)

Always thank you for your helps!

I have a question about binary dependent variables in regression. You can see the regression model in the above equation. The y i is the dummy dependent variable which is 1 when the voter wants to vote for candidate A and 0 otherwise. D i is a dummy independent variable which is 1 when the voter's income level belongs to Top 50% and 0 otherwise. (Assumption: The 1/2 of voters' income level belongs to Top 50%, and others' income level belongs to bottom 50%)

How can I calculate the approval ratings of candidate A? (Of course, it would be estimated probability) I already saw many examples dealing with similar problem, but they all dealt with only one dummy variable.

After several tries, I got an answer and I want you to see this: I found that Pr(yi =1｜Di=1) = a + bDi , and Pr(yi =1) is sum of Pr(yi =1｜Di=1) and Pr(yi =1｜Di=0) so I make a formula that Pr(yi = 1) = 1/2 * (a+bDi) + 1/2 * a is this correct calculation?

Last edited:

#### BGM

##### TS Contributor
As you have a binary dependent variable, are you having a logistic regression instead?

#### androman

##### New Member
thank you for your comment. Because I don't learn a logistic regression, I cannot understand what you mean..

You mean that I need logistic regression instead of linear regression?

#### androman

##### New Member
If the probability that voter i will vote for the candidate A is Pr(y i =1 ), Could you breifly explain how to calculate the probability using the logistic regression?