In: Statistics and Probability
Mean entry-level salaries for college graduates with mechanical engineering degrees and electrical engineering degrees are believed to be approximately the same. A recruiting office thinks that the mean mechanical engineering salary is actually lower than the mean electrical engineering salary. The recruiting office randomly surveys 40 entry level mechanical engineers and 50 entry level electrical engineers. Their mean salaries were $45,200 and $46,300, respectively. Their sample standard deviations were $3,880 and $4,190, respectively. Conduct a hypothesis test to determine if you agree that the mean entry-level mechanical engineering salary is lower than the mean entry-level electrical engineering salary. What is the p-value?
Since we are comparing the mean salaries of two samples and we do not know the population standard deviations, we will use independent-sample t test.
Let and be the average salary for mechanical engineering and electrical engineering
Null hypothesis H0: =
Alternative hypothesis Ha: <
We need to check for homogeneity of variances.
Test statistic, F = s2^2 / s1^2 = 4190^2 / 3880^2 = 1.17
Numerator df = n2 - 1 = 50 - 1 = 49
Denominator df = n1 - 1 = 40 - 1 = 39
Critical value of F at 0.05 significance level and df = 49, 39 is 1.67
Since the observed F (1,67) is less than the critical value, we conclude that there is no significant evidence that the population variance (or standard deviations) of the two groups are not equal.
So, we assume that the population standard deviations of both groups to be equal and we can apply pooled t-test.
Pooled variance Sp2 = [(n1 - 1) s1^2 + (n2 - 1)s2^2 ] / (n1 + n2 - 2)
= [(50 - 1) * 3880^2 + (40 - 1) * 4190^2 ] / (50 + 40 -2)
= 16163108
Standard error of mean difference = sqrt( Sp^2 * ((1/n1) + (1/n2)))
= sqrt( 16163108* ((1/50) + (1/40)))
= 852.8422
Test statistic, t = (x1 - x2) / Std error
= (45200 - 46300) / 852.8422
= -1.29
Degree of freedom = n1 + n2 - 2 = 50 + 40 - 2 = 88
P-value = P(t < -1.29, df = 88) = 0.1002
We assume the level of significance as 0.05.
Since p-value is greater than 0.05 significance level, we fail to reject null hypothesis H0 and conclude that there is no significant evidence that average salary for mechanical engineering is less than average salary for electrical engineering.