Chapter 6 Lab 6: t-Test (one-sample, paired sample)
Any experiment may be regarded as forming an individual of a ‘population’ of experiments which might be performed under the same conditions. A series of experiments is a sample drawn from this population. —William Sealy Gossett
This lab is modified and extended from Open Stats Labs. Thanks to Open Stats Labs (Dr. Kevin P. McIntyre) for their fantastic work.
6.2 Lab skills learned
- Conducting a one-sample t-test
- Conducting a paired-sample t-test
- Discussing inferences and limitations
6.3 Important Stuff
- citation: Mehr, S. A., Song. L. A., & Spelke, E. S. (2016). For 5-month-old infants, melodies are social. Psychological Science, 27, 486-501.
- Link to .pdf of article
- Data in .csv format
- Data in SPSS format
6.4 JAMOVI
In this lab, we will use jamovi to:
- Perform a one-sample t-test
- Perform a paired-samples t-test
First, download the .csv formatted data file, using the link above, or just click here. The data contains all of the measurements from all five experiments in the paper. We are only going to analyze the data from experiment 1 in this example (feel free to try out analyses on the other experiments for practice).
6.4.1 Baseline phase: Conduct a one sample t-test
You first want to show that infants’ looking behavior did not differ from chance during the baseline trial. The baseline trial was 16 seconds long. During the baseline, infants watched a video of two unfamilar people, one on the left and one on the right. There was no sound during the basline. Both of the actors in the video smiled directly at the infant. The important question was to determine whether the infant looked more or less to either person. If they showed no preference, the infant should look at both people about 50% of the time.
In Experiment 1, values in the Baseline_Proportion_Gaze_to_Singer
variable show the proportion of time that the infant looked to the person who would later sing the familiar song to them. If the average of these proportion is 0.5 (i.e., 50%) across the infants, then we would have some evidence that the infants were not biased at the beginning of the experiment. However, if the infants on average had a bias toward the singer, then the average proportion of the looking time should be different than 0.5.
Using a one-sample t-test, we can test the hypothesis that our sample mean for the Baseline
was not different from 0.5. To do this in jamovi, follow these steps, and you will see the rght side of the screen update with the chosen analyses and statistics:
Using the APA guidelines, we would report the results of the one-sample t-test as:
During the baseline condition, the mean proportion looking time toward the singer was 0.52, and was not significantly different from 0.5, according to a one-sample test, t(31) = 0.674, p = 0.505.
You should take the time to check this result, and see if it is the same one that was reported in the paper.
6.4.2 Test phase
Remember how the experiment went. Infants watched silent video recordings of two women (Baseline). Then each person sung a song, one was familiar to the infant (their parents sung the song to them many times), and one was unfamiliar (singing phase). After the singing phase, the infants watched the silent video of the two singers argain (test phase). The critical question was whether the infants would look more to the person who sung the familiar song compared to the person who sun the unfamiliar song. If the infants did this, they should look more than 50% of the time to the singer who sang the familiar song.
Test Yourself: Perform a one-sample t-test for the Test_Proportion_Gaze_to_Singer
condition by following the steps outlined above. Hint: The only thing you need to change is which variable you include for the test. Make sure you know how to report the result in APA format.
Question: Why was the test condition important for the experiment? What does performance in this condition tell us?
6.4.3 Paired-samples t-test
The paired samples t-test is easy to do. We’ve already made two variables called Baseline_Proportion_Gaze_to_Singer
, and Test_Proportion_Gaze_to_Singer
. These contain each of the infants looking time proportions to the singer for both parts of the experiment. We can see if the difference between them was likely or unlikely due to chance by running a paired samples t-test. To do this in jamovi, follow these steps, and you will see the rght side of the screen update with the chosen analyses and statistics:
6.4.3.1 Relationship between one-sample and paired sample t-test
Question: Why is it that a paired samples t-test can be the same as the one sample t-test? What do you have to do the data in the paired samples t-test in order to conduct a one-sample t-test that would give you the same result?
The one-sample test whether a sample mean is different from some particular mean. The paired sample t-test, is to determine whether one sample mean is different from another sample mean. If you take the scores for each variable in a paired samples t-test, and subtract them from one another, then you have one list of difference scores. Then, you could use a one sample t-test to test whether these difference scores are different from 0. It turns out you get the same answer from a paired sample t-test testing the difference between two sample means, and the one sample t-test testing whether the mean difference of the difference scores between the samples are different from 0.
Test Yourself: Conduct the same analysis in jamovi using difference scores. What test would you choose?
6.4.3.2 Usefulness of difference scores
Let’s use the difference scores to one more useful thing. Sometime the results of a t-test aren’t intuitively obvious. By the t-test we found out that a small difference between the test phase and baseline was not likely produced by chance. How does this relate to the research question about infants using familiar songs as cues for being social? Let’s ask a very simple question. How many infants actually showed the bias? How many infants out of 32 looked longer at the singer who sang the familiar song during test, compared to during baseline.
Here, 22 out of 32 infants showed the effect. To put that in terms of probability, 68.75% of infants showed the effect. These odds and percentages give us another way to appreciate how strong the effect is. It wasn’t strong enough for all infants to show it.
6.4.4 Practice Problems
Use the data file from this lab tutorial to test whether the number of frames the baby spent gazing at the familiar song is significantly different than the number of frames spent gazing at the unfamiliar song (use alpha = .05). Report your results in proper statistical reporting format.
Compute a new variable representing the difference in number of frames the baby spent gazing between the familiar and unfamiliar song conditions. Test this difference score against a mean of 0 (use alpha=.05). Report your results in proper statistical reporting format.