Click on a test for an interactive explication and music-related application
Warning: I'm not an authority on stats! Treat this page as a basic introduction to t-tests, ANOVAs, and two-way ANOVAs.
There are two kinds of t-tests: independent-samples t-tests and paired-samples t-tests. This page covers independent samples t-tests. The independent-samples t-test is also referred to as an independent-measures t-test, between-subjects t-test, unpaired t-test, and Student's t-test.
The independent-samples t-test is an inferential statistical test that is used to determine if a difference exists between the means of two independent groups on a single continuous dependent variable.
Suppose you have a friend who teaches an orchestra class and a wind ensemble class at a local high school. Your friend wants to see which group, the orchestra or the wind ensemble, is better at sight-reading. So, the teacher designed and administered a sight-reading test to all the students in both ensembles. Your friend knows to use a t-test to analyze the data, but is having trouble figuring out what the dependent and independent variables are. Help your friend figure out the variables by clicking and dragging the words above to the appropriate box below.
Levene's Test for Equality of Variances | t-test for Equality of Means | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
F | Sig | t | df | Sig. (2-tailed) | Mean Difference | Std. Error Difference | 95% Confidence Interval of the Difference | |||
Lower | Upper | |||||||||
engagement | Equal variances assumed | 1.922 | .174 | 2.365 | 38 | .023 | .25900 | .10954 | .03726 | .48074 |
Equal variances not assumed | 2.365 | 35.055 | .024 | .25900 | .10954 | .03664 | .48136 |
"t" signifies that you're reporting a t-statistic (the results of a t-test).
This number is the degrees of freedom.
This number undicates the obtained value of the t-statistic (obtained t-value).
Remember: with a t-test the larger the number, the more likely the populations represented by the indepented variables are different. The smaller the number, the more likely the two populations are similar/the same.
This indicates the probability of obtaining the observed t-value if the null hypothesis is correct.
AKA: between-subjects ANOVA or one-factor ANOVA.
If you want to determine whether there are any statistically significant differences between the means of two or more independent groups, you can use a one-way analysis of variance (ANOVA).
Imagine that you have a friend that teaches three ensembles at a high school: an orchestra, a wind ensemble, and a jazz band. In order to figure out which group sight-reads better, your friend administers a sight-reading test and wants to find out if there is a statistically significant difference between the three ensembles. Help your friend figure what the independent and dependent variables are by dragging them to the appropriate box below.
Sum of Squares | df | Mean Square | F | Sig. | |
---|---|---|---|---|---|
Between Groups | 49.033 | 3 | 16.344 | 8.136 | .000 |
Within Groups | 53.066 | 37 | 1.965 | ||
Total | 102.099 | 30 |
F
Indicates that you are comparing to an F-distribution (F-test).
(3, 27)
3: Indicates the Between Groups degrees of freedom ("df1")
27: Indicates the Within Groups [Error] degrees of freedom ("df2")
8.316
Indicates the obtained value of the F-statistic (obtained F-value)
p < .0005
Indicates the probability of obtaining the observed F-value if the null hypothesis is true.
The two-way ANOVA is used to determine whether there is an interaction effect between two independent variables on a continuous dependent variable (i.e., if a two-way interaction effect exists).
This time, suppose your friend teaches a total of six ensembles split up between two schools (three at each school): an orchestra at both schools, a wind ensemble at both schools, and a jazz band at both schools. The first school is called "School A" and the second school is called "School B." The teacher wants to see if there's an interaction effect between the ensemble type and the school on sight-reading scores. So, at the end of the year the teacher administers a sight-reading test to all the students to determine which group as a whole did better, the orchestra, the wind ensemble, or the jazz band. Help your friend correctly categorize all the variables by draging them to the correct box below.
The primary power of the two-way ANOVA is its ability to determine if there is an interaction between two independent variables on a dependent variable. While substantial calculations must be conducted to determine if an interaction is significant, the process of determining the presence an interaction is not. An interaction effect can be seen by simply graphing a “profile plot” (https://statistics.laerd.com/premium/spss/twa/two-way-anova-in-spss-12.php). Profile plots can be calculated by hand by calculating the means for each combination of independent variable group. For example, if the two-way ANOVA has one independent variable with three categories (band, orchestra, and jazz band) and another independent variable with two categories (School A and School B), and the dependent variable of sight-reading scores, then the means for the following categories need to be calculated to create a profile pot: 1) all band students in School A, 2) all orchestra students in School A, 3) all jazz band students in School B, 4) all band students in School B, 5) all orchestra students in School A, and 6) all jazz band students in School B. Graph the means along two plots, School A and School B. If the resulting lines are parallel then there is no interaction, if the lines are not parallel then there is interaction.
Raw Data Yes, each ensemble has only four people! |
Independent Variable #1 (ensemble type) | |||
---|---|---|---|---|
Orchestra | Wind Ensemble | Jazz Band | ||
Independent Variable #2 (school) |
School A |
School A's orchestra sight-reading scores
|
School A's wind ensemble sight-reading scores
|
School A's jazz band sight-reading scores
|
School B |
School B's orchestra sight-reading scores
|
School B's wind ensemble sight-reading scores
|
School A's jazz band sight-reading scores
|
means | Independent Variable #2 | ||||||
---|---|---|---|---|---|---|---|
Orchestra Members | Wind Ensemlbe Members | Jazz Band | rows | ||||
Independent Variable #1 | School A | Mean for all of school A: row 1 mean |
|||||
School B | Mean for all of school B: row 2 mean |
||||||
Means for the columns | Mean for all orchestra members: column 1 mean |
Mean for all wind ensemble members: column 2 mean |
Mean for all jazz ensemble members: column 3 mean |
Mean for everyone |
Source | Degrees of Freedom | Sum of Square | Mean Square | F |
---|---|---|---|---|
A | a-1 | SSa | MSa | MSa/MSwithin |
B | b-1 | SSb | MSb | MSb/MSwithin |
AxB | (a-1)(b-1) | SS aXb | MSaxb | MSaxb/MSwithin |
Within | ab(r-1) | SS within | MSwithin | |
Total | abr-1 | SStotal |
Below is an adapted two-way ANOVA output from https://statistics.laerd.com/premium/spss/twa/two-way-anova-in-spss-12.php
Source | Type III Sum of Squares | df | Mean Square | F | Sig. | Partial Eta |
---|---|---|---|---|---|---|
Corrected Model | 5645.998 | 5 | 1129.200 | 78.538 | .000 | .883 |
Intercept | 132091.906 | 1 | 132091.906 | 9187.227 | .000 | .994 |
gender | 8.420 | 1 | 8.420 | .586 | .448 | .011 |
education_level | 5446.697 | 2 | 2723.348 | 189.414 | .000 | .879 |
gender * education_level | 210.338 | 2 | 105.169 | 7.315 | .002 | .220 |
Error | 52 | 52 | 14.378 | |||
Total | 58 | 58 | ||||
Corrected Total | 57 | 57 |
Indicates that we are comparing to an F-distribution (F-test).
2: Indicates the degrees of freedom for the interaction term.
h2: Indicates the degrees of freedom for the error term.
Indicates the obtained value of the F-statistic (obtained F-value).
Indicates the probability of obtaining the observed F-value given the null hypothesis is true.
Indicates the probability of obtaining the observed F-value if the null hypothesis is true.
A measure of effect size.