statistics problem

#1
I am stumped on how to go about making the test statistic for this problem. Any help would be appreciated. Thank you.

Suppose that you would like to use a multiple regression model to predict salary (Yi) based on three explanatory variables: number of years of education (X1,i), gender (X2,i) and number of prior years of employment (X3,i). Suppose further that X2,i is an indicator variable that only takes two values: X2,i is 1 if the ith person is female, otherwise X2,i is 0.
Suppose that you are interested in testing the null hypothesis that there is no difference in the salaries of males and females against the alternative hypothesis that there is a difference. Can you devise an appropriate test statistic that would be useful in testing this hypothesis?
 

Dragan

Super Moderator
#3
I am stumped on how to go about making the test statistic for this problem. Any help would be appreciated. Thank you.

Suppose that you would like to use a multiple regression model to predict salary (Yi) based on three explanatory variables: number of years of education (X1,i), gender (X2,i) and number of prior years of employment (X3,i). Suppose further that X2,i is an indicator variable that only takes two values: X2,i is 1 if the ith person is female, otherwise X2,i is 0.
Suppose that you are interested in testing the null hypothesis that there is no difference in the salaries of males and females against the alternative hypothesis that there is a difference. Can you devise an appropriate test statistic that would be useful in testing this hypothesis?

What you're describing is an Analysis of Covariance (ANCOVA) where you have a regression model containing a mixture of quantitative (2) and qualitative (1) variables.

If you have SPSS, use univariate general linear model, set Y as your dependent variable X2 as your fixed factor and set X1 and X3 as covariates.

Run the analysis and look at the F ratio associated with X2 and that is the statistic associated with your hypothesis of interest.
 
#4
hmm i interpreted this as an application of the point bi-serial correlation, but the ANCOVA makes more sense when you're considering X2 within the context of your other predictors
 
#6
What you're describing is an Analysis of Covariance (ANCOVA) where you have a regression model containing a mixture of quantitative (2) and qualitative (1) variables.

If you have SPSS, use univariate general linear model, set Y as your dependent variable X2 as your fixed factor and set X1 and X3 as covariates.

Run the analysis and look at the F ratio associated with X2 and that is the statistic associated with your hypothesis of interest.
I downloaded SPSS, but I do not have data to put into it to analyze it. What I need is the test statistic that will test the hypothesis.
 

Dragan

Super Moderator
#7
I downloaded SPSS, but I do not have data to put into it to analyze it. What I need is the test statistic that will test the hypothesis.
You can run a usual regression analysis as follows:

Yhat = b0 + b1X1 + b2X2 + b3X3.


Look at the t-statistic associated with b2 and that is also you're statistic of interest.

In this case, t^2 is equal to the F ratio (statistic) that I mentioned above - because it's on 1df.

I'm so used to doing this through the general linear model but it also works with a regular regression.

I double checked myself with some artificial data to make sure that I'm correct:)
 
Last edited: