I have a data set about 5,699 PhD students. The first column called "Year" is how many years it took for candidate to graduate with a Ph.D (1, 2,...14), the second column "Uni" is which university the student received the PhD, and the third column "Res" is residency of subject (permanent or temporary)
> head(mydata)
Year Uni Res
1 1 Berkeley Permanent
2 1 Berkeley Permanent
3 1 Berkeley Permanent
4 1 Berkeley Permanent
5 1 Berkeley Permanent
6 1 Berkeley Permanent
I wish to see if there is a significant difference in the number of years it took for PhD students to graduate by residency. I'm assuming I must perform a two sample t-test or a two sample z-test. I know that one performs a z-test if the standard deviation of the population is known, and a t-test if it is not known. However, I have no information on whether these 5,699 students form a population or if they are samples from a larger population. Since I am not sure, should I perform the two sample t-test?
One of the assumptions of the two sample t-test and the two sample z-test is that the data must be normally distributed. Does this mean I have check if the number of years to graduate is normal for each group (permanent, temporary) or do I combine the data and check to see if the years to graduation is normal? What kind of tests do I use to check for normality in this case? Are there other assumptions I should be aware about?