Wednesday, July 31, 2013

Stats: Correlations


Last time we looked at how to do a paired t-test analysis, today we look at correlations. This examines whether 2 variables are related. An example might be the time to complete an exam and the person's grade on the exam. Our research question is – are the two variables related? Our null hypothesis is that there will be no difference. Remember that a correlation tells you 3 things about the relationship: (1) the direction of the relationship. In a positive correlation as one variable increases the other increases. In a negative correlation, the 2 variables go in opposite directions – as one increases the other decreases. 2) The form of the relationship. The most common type of correlation is the Pearson correlation, which measures a linear (straight-line) relationship. However, there are other types of correlations. 3) The degree of the relationship. In a Pearson correlation, it looks at how well the data fit a straight line. A perfect correlation, which is absolutely on the line, would be a 1.0. At the other extreme, data with no relationship would be a 0, and have no relationship to a straight line. 

Let's do an example of a Pearson correlation together. So open SPSS and enter the following data for your sample: 

Under Variable view (see tab at bottom of page), It should look like: 

Name
Type
Width
Decimals
Label
Values
Ignore the rest
Examtime
numeric
8
0
Time to complete exam
None
Ignore the rest
Grade
numeric
8
0
Exam grade
None
Ignore the rest

 Go back to Data View and enter the following: 

Examtime
Grade
20
63
45
89
36
75
59
92
56
96
27
66
39
70
52
89
43
82
55
99

Go to Analyze/ Correlate/ Bivariate. Move both of your variables into Variables. Click options and include means and standard deviations. Press Continue. Make sure Pearson, two-tailed, and Flag significant correlations are checked. Press ok. 

Your results should look like the following: 

Descriptive Statistics
 
Mean
Std. Deviation
N
Time to complete exam
43.20
12.925
10
Exam grade
82.10
12.879
10

 
Correlations
 
Time to complete exam
Exam grade
Time to complete exam
Pearson Correlation
1
.943**
Sig. (2-tailed)
 
.000
N
10
10
Exam grade
Pearson Correlation
.943**
1
Sig. (2-tailed)
.000
 
N
10
10
**. Correlation is significant at the 0.01 level (2-tailed).

To really understand what is going on, we need to do a scatterplot. To do this, go to Graphs /Chart Builder /Scatter/Dot. Move the top left example to the box on top right. Move Time to complete on Y axis and Exam grade to X axis. Press ok.
 

It should look like this:

 

What does this mean? Time to complete the exam is significantly related to the exam grade. So let's write it up as you would in your paper: 

A Pearson correlation was conducted comparing the time to complete the exam (M = 43.2; SD = 12.93) to the exam grade (M = 82.1; SD = 12.88). The result (r(10) = .943, p= .0001) indicates that there is a significant positive relationship between the two variables and the null hypothesis is rejected. 

What happens if the results were NOT significantly different, as in this example? 

Go back to Data View and enter the following: 

Examtime
Grade
20
88
45
45
36
26
59
95
56
73
27
89
39
56
52
78
43
79
55
90

 A Pearson correlation was conducted comparing the time to complete the exam (M = 43.2; SD = 12.93) to the exam grade (M = 71.9; SD = 22.57). The result (r(10) = .131, p= .131) indicates that there is not a significant relationship between the two variables and the null hypothesis is retained.

A great resource for SPSS is
Pallant, J. (2013). The SPSS Survival Manual, 5th edition. Open University Press.


Next time, we will look at ANOVAs. Do you have an issue or a question that you would like me to discuss in a future post? Send me an email with your ideas. leann.stadtlander@waldenu.edu 

Monday, July 29, 2013

Stats: Paired T-tests


Last time we looked at how to do an independent t-test analysis, today we look at the paired sample t-test. This examines whether the means of one sample tested at 2 different times are significantly different. An example might be a pre-study survey and post-study survey. The independent variable is time (pre or post), the dependent variable is the scores on a test. Our research question is – is the mean for the pre-study survey significantly different from the post-study survey's mean? Our null hypothesis is that there will be no difference between the two times. Let's do an example together. So open SPSS and enter the following data for your samples:

Under Variable view (see tab at bottom of page), It should look like: 

Name
Type
Width
Decimals
Label
Values
Ignore the rest
prescore
numeric
8
0
Prestudy score
None
Ignore the rest
postscore
numeric
8
0
Poststudy score
None
Ignore the rest

 Go back to Data View and enter the following: 

prescore
postscore
5
9
8
11
4
5
7
10
2
6
6
9
9
15
1
6
3
8
8
13

 Go to Analyze/ Compare Means/ paired samples t-test. Move both of your score variables into Paired Variables. Press ok. 

Your results should look like the following:

Paired Samples Statistics
 
Mean
N
Std. Deviation
Std. Error Mean
Pair 1
prestudy score
5.30
10
2.751
.870
poststudy score
9.20
10
3.190
1.009

 
Paired Samples Test
 
Paired Differences
t
df
Sig. (2-tailed)
Mean
Std. Deviation
Std. Error Mean
95% Confidence Interval of the Difference
Lower
Upper
Pair 1
prestudy score - poststudy score
-3.900
1.449
.458
-4.937
-2.863
-8.510
9
.000
What does this mean? Your two test times are significantly different from each other. So let's write it up as you would in your paper: 

A paired sample t-test was conducted comparing the pretest survey (M = 5.3; SD = 2.75) to the posttest survey (M = 9.2; SD = 3.19). The result (t(9) = -8.51, p= .0001) indicates that there is a significant difference between the test times and the null hypothesis is rejected. 

What happens if the results were NOT significantly different, as in this example: 

prescore
postscore
8
9
12
11
4
5
10
10
5
6
10
9
14
15
5
6
8
8
12
13

 
A paired sample t-test was conducted comparing the pretest survey (M = 8.8; SD = 3.39) to the experimental group (M = 9.2; SD = 3.19). The result (t(9) = -1.5, p= .168) indicates that there is not a significant difference between the test times and the null hypothesis is retained. 

A great resource for SPSS is
Pallant, J. (2013). The SPSS Survival Manual, 5th edition. Open University Press. 

Next time, we will look at correlations. Do you have an issue or a question that you would like me to discuss in a future post? Send me an email with your ideas. leann.stadtlander@waldenu.edu