In: Math
A professor surveyed a simple random sample of undergraduates at his large university. As part of this survey he asked about part time jobs the students had and the amount the students were paid per hour. The resulting data is given in the file “pay_survey.txt” This data is linked from the Moodle.
This data file contains the following variables.
Gender: Male or Female
Year: Year in school as Freshman, Sophomore, Junior or Senior
Pay: hourly rate of pay in dollars
We would like to determine if there is a significant difference between males and females in the hourly pay.
The post:
For this post you should
1. Use SAS to conduct a 2 sample t-test to determine if there is a significant difference between the genders in hourly pay.
Present the output from your SAS program. (You do not need to include the program or data for this post.)
Give an interpretation of the results in practical terms. Clearly explain the p-value and its meaning.
Present the assumptions of the tests you used with an explanation of their meaning in this situation. Also, present your conclusions about the assumptions.
Male Senior 16.82
Female Freshman 3.5
Female Sophomor 12
Female Junior 8
Female Sophomor 9.75
Female Junior 9.25
Female Sophomor 8
Female Junior 9.25
Male Junior 10
Female Junior 8.5
Female Junior 7.5
Female Sophomor 7.25
Female Senior 10
Female Sophomor 7.5
Male Sophomor 10
Female Freshman 8
Female Junior 8.75
Male Sophomor 12
Male Sophomor 7.25
Female Sophomor 15
Male Sophomor 8.25
Male Sophomor 8.5
Female Sophomor 8
Female Sophomor 8.5
Female Sophomor 9
Male Junior 10
Female Sophomor 7.25
Male Sophomor 9
Female Sophomor 7.5
Female Sophomor 8
Female Junior 8
Female Sophomor 8.5
Female Junior 10
Female Junior 9
Male Sophomor 10
Female Junior 8
Male Sophomor 8
Female Senior 9
Female Senior 7.25
Female Sophomor 7.25
Male Sophomor 7.25
Female Freshman 23
Female Sophomor 10
Female Sophomor 9
Female Sophomor 10
Female Sophomor 12
Female Senior 9
Female Junior 7.5
Female Junior 10
Female Junior 9
Female Junior 11
Female Junior 9.5
Female Sophomor 8.1
Female Senior 10
Female Junior 8.5
Female Sophomor 10
Male Freshman 8.5
Female Senior 21
Female Freshman 9
Female Freshman 12
Female Sophomor 10
Male Senior 10
Female Junior 20
Male Sophomor 8.5
Male Senior 8.5
Male Junior 8.25
Female Sophomor 10
Male Junior 9.5
Female Sophomor 9
Male Junior 7.25
Male Senior 9.25
Female Senior 10
Female Senior 11
Female Sophomor 9
Male Senior 10
Female Sophomor 7.5
Female Junior 12
Female Sophomor 12
Male Junior 14.25
Female Sophomor 7.25
Female Freshman 10
Female Junior 10
Female Sophomor 10
Female Junior 20
Female Senior 9
Male Sophomor 11
Female Junior 7.75
Male Sophomor 8
Female Freshman 7.5
Female Senior 8
Female Junior 8.75
Male Freshman 8
Female Sophomor 8.5
Female Sophomor 8.25
Male Junior 9.25
Male Junior 18.5
Female Sophomor 8
Female Sophomor 8
Female Junior 8.78
Male Sophomor 8
Male Junior 10.71
Female Sophomor 7.25
Female Junior 9.25
Male Sophomor 8.5
Female Sophomor 10
Female Senior 15.25
Female Freshman 7.25
Male Junior 8.5
Male Sophomor 8
Female Junior 15
Female Junior 12
Female Sophomor 10
Male Sophomor 14.5
Male Junior 11
Female Sophomor 7.25
Male Junior 10
Female Sophomor 8
Female Sophomor 8.25
Female Senior 14
Female Sophomor 9.25
Male Freshman 7.25
Female Sophomor 4.5
Female Sophomor 8
Male Sophomor 9
Female Sophomor 7.25
Female Sophomor 15
Female Freshman 12
Female Sophomor 10
Female Senior 7.25
Female Senior 10.25
Female Junior 8
Male Junior 10
Male Senior 16
Female Sophomor 7.25
Female Sophomor 10.25
Male Sophomor 18
Male Junior 9.25
Male Junior 15
Female Freshman 7.25
Female Freshman 8
Female Junior 10
Female Freshman 11
Male Senior 9
Male Senior 10.25
Female Senior 10
SAS Code is
data Moodle;
infile cards;
input gender $ year $ pay;
cards;
Male Senior 16.82
Female Freshman 3.5
Female Sophomor 12
Female Junior 8
Female Sophomor 9.75
Female Junior 9.25
Female Sophomor 8
Female Junior 9.25
Male Junior 10
Female Junior 8.5
Female Junior 7.5
Female Sophomor 7.25
Female Senior 10
Female Sophomor 7.5
Male Sophomor 10
Female Freshman 8
Female Junior 8.75
Male Sophomor 12
Male Sophomor 7.25
Female Sophomor 15
Male Sophomor 8.25
Male Sophomor 8.5
Female Sophomor 8
Female Sophomor 8.5
Female Sophomor 9
Male Junior 10
Female Sophomor 7.25
Male Sophomor 9
Female Sophomor 7.5
Female Sophomor 8
Female Junior 8
Female Sophomor 8.5
Female Junior 10
Female Junior 9
Male Sophomor 10
Female Junior 8
Male Sophomor 8
Female Senior 9
Female Senior 7.25
Female Sophomor 7.25
Male Sophomor 7.25
Female Freshman 23
Female Sophomor 10
Female Sophomor 9
Female Sophomor 10
Female Sophomor 12
Female Senior 9
Female Junior 7.5
Female Junior 10
Female Junior 9
Female Junior 11
Female Junior 9.5
Female Sophomor 8.1
Female Senior 10
Female Junior 8.5
Female Sophomor 10
Male Freshman 8.5
Female Senior 21
Female Freshman 9
Female Freshman 12
Female Sophomor 10
Male Senior 10
Female Junior 20
Male Sophomor 8.5
Male Senior 8.5
Male Junior 8.25
Female Sophomor 10
Male Junior 9.5
Female Sophomor 9
Male Junior 7.25
Male Senior 9.25
Female Senior 10
Female Senior 11
Female Sophomor 9
Male Senior 10
Female Sophomor 7.5
Female Junior 12
Female Sophomor 12
Male Junior 14.25
Female Sophomor 7.25
Female Freshman 10
Female Junior 10
Female Sophomor 10
Female Junior 20
Female Senior 9
Male Sophomor 11
Female Junior 7.75
Male Sophomor 8
Female Freshman 7.5
Female Senior 8
Female Junior 8.75
Male Freshman 8
Female Sophomor 8.5
Female Sophomor 8.25
Male Junior 9.25
Male Junior 18.5
Female Sophomor 8
Female Sophomor 8
Female Junior 8.78
Male Sophomor 8
Male Junior 10.71
Female Sophomor 7.25
Female Junior 9.25
Male Sophomor 8.5
Female Sophomor 10
Female Senior 15.25
Female Freshman 7.25
Male Junior 8.5
Male Sophomor 8
Female Junior 15
Female Junior 12
Female Sophomor 10
Male Sophomor 14.5
Male Junior 11
Female Sophomor 7.25
Male Junior 10
Female Sophomor 8
Female Sophomor 8.25
Female Senior 14
Female Sophomor 9.25
Male Freshman 7.25
Female Sophomor 4.5
Female Sophomor 8
Male Sophomor 9
Female Sophomor 7.25
Female Sophomor 15
Female Freshman 12
Female Sophomor 10
Female Senior 7.25
Female Senior 10.25
Female Junior 8
Male Junior 10
Male Senior 16
Female Sophomor 7.25
Female Sophomor 10.25
Male Sophomor 18
Male Junior 9.25
Male Junior 15
Female Freshman 7.25
Female Freshman 8
Female Junior 10
Female Freshman 11
Male Senior 9
Male Senior 10.25
Female Senior 10
;
run;
proc print data=Moodle;
run;
ods graphics on;
proc ttest data=moodle;
class Gender;
var pay;
run;
ods graphics off;
Output:
Assume unequal variance
test statistc=t=-1.02
p=0.3087
p>0.05
Reject null hypothesis.
Accept alternative hypothesis.
Conclusion:
there is no sufficient statistical evidence at 5% level of signifcance to conclude that
there is a significant difference between the genders in hourly pay.
Assumptions:
Distribution is normal
samples are random and independent.