Lecture LAB3 T-Tests
Lecture LAB3 T-Tests
The main purpose of this lab is to learn when/why and how to perform t-tests and
their non-parametric counterparts, and how to correctly interpret the results
There are 3 types of t-tests:
One- sample t-test
Two-sample t-test
Paired t-test (two dependent samples t-test)
And there non-parametric counterparts are:
One-Sample Wilcoxon Signed Rank Test
Mann-Whitney U Test
Wilcoxon Signed Rank Test
Evidence or Proof
P-value (Sig.)
• If p-value > 0.05, we fail to reject the null hypothesis
Step2:
Enter a numeric test value
The numeric test
value
95% CI of the
Mean Difference
N Mean ± SD P-value
Difference
Lower Upper
Interpretation:
“The average age is significantly higher than 45 yrs., t(405) = 11.81, p <0.001”
If the assumption not met
roughly equal.
Scenarios when you would use Two-tailed Independent Samples t-Test:
• Does baseline cholesterol differ between those who have history of breast cancer and
Hypothesis: H :
o 1 2 H :
a 1 2
Analyze Compare Means Independent-Samples T Test Select baseline Cholesterol as the quantitative
variable to be tested Select a single grouping variable (smoking at baseline) Click Define Groups to specify two
codes for the groups you want to compare (codes of 1 and 2 in this case)
Note: The grouping variable is always the nominal variable while the test variable is always the scale (quantitative) variable
SPSS Output
95% CI of the
P-value Difference
Std. Mean
Group N Mean t-value (Sig. [2-
Deviation Difference
tailed]) Lower Upper
Since P-value greater than alpha = 0.05, we fail to reject the null hypothesis.
Conclusion (Interpretation):
There is no significant difference in cholesterol level between smokers and non-smokers at baseline
If the assumptions not met
Gender
Factor Males Females P-value*
n=161 n=246
Baseline Glucose Level, mg/dl [Median (Min. - Max.)] 97.20 ( 75.60 - 311.40) 93.60 (34.20- 250.20) 0.001
* Mann-Whitney Test
Interpretation:
There was a significant difference between males and females in the median
glucose level at baseline, Mann-Whitney U =14648.5, p=0.001
Paired t-test
Paired t-Test (Two-tailed)
Used when comparing the means of two measurements on the same (related)
sample of subjects
The two samples have to be dependents
Involves two related quantitative variables (pre and post)
Usually used in a “before and after” research design
The null hypothesis (Two-tailed t-Test):
The population mean of the differences is zero H : or 0
o d
H o : pre post
Samples t-Test:
• Is there a statistically significant change in BMI after 6 weeks
Data exploration:
Assumptions:
o Normality:
option in SPSS
Assessing the Assumption of Normality:
Descriptive statistics for the mean difference Since the p-value for t-test is significant,
between the two quantitative variables. The mean we conclude that the mean cholesterol
BMI levels are lower after 6 weeks when compared levels after 6 weeks is significantly
to baseline lower than the baseline.
Reporting the Results for a Paired-Samples t test
Time
Factor N P-value*
Baseline Week 6
Body Mass Index, Kg/m2 [mean +/- SD] 407 28.67 ± 5.40 27.66 ± 5.13 <0.001
Interpretation:
“There was a significant reduction in body mass index after 6 weeks of
follow-up, t(406)= - 34.06, p< 0.001.”
If the assumption not met
Time
Characteristics N P-value*
At baseline At week 6
Glucose , mg/dl.[Median (Min. - Max.)] 407 95.40 ( 34.20- 311.40) 90 (68.40 - 246.60) <0.001
* Wilcoxon Signed Rank Test
Interpretation:
BMI= (weight(lb)*703)/(height(in))** 2
Assumption(s)
SPSS output:
Summary table:
Decision/Conclusion/interpretation:
Is the mean baseline cholesterol level different for the
males versus the females?
Hypothesis
Assumption(s)
SPSS output:
Summary table:
Decision/Conclusion/interpretation:
Is there a statistically significant change in pulse rate
after 6 weeks?
Hypothesis
Assumption(s)
SPSS output:
Summary table:
Time
Factor N P-value*
Baseline Week 6
Decision/Conclusion/interpretation:
Thank you