Introduction to Statistical Methods for the Life and Health Sciences
Objective:In this lab, you will perform and interpret 1- and 2-sample t-tests (or z-tests).
For todayís lab we will be using the dataset at the following location:
This is the dataset collected from Prof Gouldís course last spring.Students were asked seven questions:
4)Do you smoke? (0=no; 1=yes)
5)Who do you want for President? Bush, Gore, other
6)Rate your math ability: (1,2,3,4,5) 1 is much below average, 3 is average, 5 is much above average
7)Rate your math anxiety: (1,2,3,4,5) 1 is much below average, 3 is average, 5 is much above average
Letís ask the following research questions:
1.Are females shorter than males, on average?
2.Do males and females differ in their weights, on average?
3.Does the proportion of students who currently smoke differ from the previous finding that 15% of students were smokers?
To perform a 2-sample t-test of means with independent samples and unequal variances, type
ttest varname, by(groupvar) unequal
To perform a 1-sample z-test of proportions, type
prtest varname=#[this performs a z-test with p=#]