Imagine that Lucy hears Pete say “My dad usually wears a shirt and a die.” Maybe Pete’s dad wore a very special die, but maybe Lucy did not understand Pete properly or he mispronounced and actually wanted to say “tie”. When interpreting Pete’s statement, Lucy has to integrate her expectations about usual combinations of words with perceptual information from Pete’s speech. Already in 1948, Shannon has shown that people use linguistic expectations to correct perceptual errors. More recent research supports these findings; when faced with a noisy communicative channel, adult listeners make use of their expectations about the speaker to correct perceived errors in speech (e.g. Gibson, Bergen, & Piantadosi, 2013). While adults consistently make use of their expectations in noisy communicative channels, it is not as clear cut with children. Previous studies have shown that children use social, pragmatic and acoustic cues to determine, for instance, a speaker’s intended referent (Clark, 2009; Creel, 2012); however, children have only been shown to be successful in using these cues when top-down and bottom-up cues point to the same meaning, with hardly any research focusing on what happens when these cues conflict. A study conducted by Snedeker and Trueswell in 2004 suggests that preschoolers tend to over-weigh lower-level cues, however more research is needed to fully understand how children use bottom-up and top-down cues to interpret linguistic input in a noisy Channel.
In 2016, Daniel Yurovsky, Sarah Case, and Michael C. Frank conducted a study to find out whether pre-schoolers privilege either bottom-up cues from perceptual input or top-down expectations based on a speaker’s previous statement when presented with ambiguous sentences that could be interpreted in both ways or whether they flexibly adapt how much they rely on the different cues when the cues’ reliability changes. In their study, Yurovsky, Case and Frank conducted three separate experiments. The second experiment will be described in more detail as it will be replicated in the following replication project.
In the first experiment, 43 children aged 4 to 6 and 50 adults were asked to listen to a speaker who described one of two pictures. These picture pairs always included one semantically plausible and one semantically implausible picture. The spoken utterances were convolved with Brown noise of amplitude ~0.6 to increase the utterances’ ambiguity. Participants completed an exposure trial in which the referential expression accompanying the picture was unambiguous and a test trial in which the referential expression phonologically only differed in one sound and was therefore very ambiguous.
In the second experiment, Yurovsky, Case and Frank replicated the first experiment in a larger and developmentally broader sample. The participants were 140 children that were recruited from the floor of the Children’s Discovery Museum of San Jose, California aged 3 to 5 who had to complete the same tasks as the children in experiment one. 48 of the children were 3 years old (24 boys, 24 girls), 49 children were 4 years old (19 boys, 30 girls) and 43 children were 5 years old (12 boys, 31 girls). When analysing the data, Yurovsky, Case and Frank first fitted a separate mixed-effects logistic regression for each age group. They found that, in all age groups, children were more likely to choose the plausible referent when they were exposed to the speaker selecting the plausible referent in the exposure trials. To find out whether children’s behaviour changes with age, they then fitted a mixed-effects model to all the children’s data. The analysis showed that the older the children are, the more sensitive they react to the speaker’s choices in the exposure trial. Looking at the test trials, Yurovsky, Case and Frank found that while 4- and 5-year-olds used their previous experience with the speaker during the exposure trial to their advantage when interpreting ambiguous sentences, 3-year-olds did not; hence, they concluded that 3-year-olds do not yet use top-down expectations about a speaker’s intended meaning to process ambiguous sentences. To determine whether older children relied more on their expectations because they had built stronger expectations during exposure trial, Yurovsky, Case and Frank fitted an additional model that included the number of exposure trials on which individual children had selected the plausible picture. They found that older children did, in fact, form stronger expectations during exposure trials. Yurovsky, Case and Frank concluded that children aged 3 to 6 rely to a similar extent on expectations about a speaker’s intended meaning, but, across development, their ability to build these expectations gradually improves.
Figure 3: Results of test trial (experiment 2)
Overall, the results of the three experiments showed that, while children generally relied more on top-down expectations, they still, just like adults, flexibly adapted how much they relied on the different cues when the cues’ reliability changed.
Since significant results are much more likely to get published, a p-curve analysis was conducted to control whether there was publication bias in previous studies on noisy-channel processing in children.
Studies included in the p-curve all had to investigate flexible expectation-based language processing from speaker related cues in children aged 3 to 7 and had to be published after 2000.
This p-curve only has a very low percentage of p-values near p = 0.05, the conventional level of statistical significance. This suggests that researchers did not push p-vales to the threshold for statistical significant to get their paper published; hence, this indicates that there is a real effect.
This study is a replication of experiment two of Daniel Yurovsky’s, Sarah Case’s, and Michael C. Frank’s study on pre-schoolers’ adaptability to linguistic input in a noisy Channel. This project was approved by the Psychology Research Ethics Committee of the University of Edinburgh.
This section will give a detailed overview of the methods used in the replication of experiment two of Yurovsky’s, Case’s and Frank’s study.
The participants of the pilot study were 2 children aged 7 and 10 (both girls), and, as a control group, 8 adults, aged between 21 and 26 (6 female, 2 male). Before participants could take part in the experiment, they had to give consent or assent. For the child group, parents had to consent before the child was asked to assent.
To find out how many participants are needed to find a statistically significant result if there is, in fact, a true difference in when children choose the plausible or the implausible picture due to expectations about the speaker, data was simulated based on Yurovsky’s, Case’s and Frank’s results. Subsequently, statistical power of the simulated data was calculated.
n_test_trials = 8 # Each child took part in 8 test trials
#n_exposure_trials = 7 # Each child took part in 7 exposure trials
n_children = 24 # There were 48 3-year-old, 49 4-year-old, and 43 5-year-old children, 24 childrne per condition
#create dataframe with number of trials, number of participants prer condion, speaker condition and age group
noisy_channel_original = expand.grid(
n_test_trials = n_test_trials,
N = n_children,
Age = c("3years", "4years", "5years"),
Condition = c("plausible", "implausible"), #the experiment had two conditions
Simulations = 1 #1 simulation as the experiment ran only once
)
#MEANS and STANDARD DEVIATIONS for all conditions
mean3yearplaus = 0.51
mean3yearimplaus = 0.49
mean4yearplaus = 0.60
mean4yearimplaus = 0.40
mean5yearplaus = 0.54
mean5yearimplaus = 0.25
sd3yearplaus = 0.10
sd3yearimplaus = 0.12
sd4yearplaus = 0.11
sd4yearimplaus = 0.10
sd5yearplaus = 0.12
sd5yearimplaus = 0.11
noisy_channel_original =
noisy_channel_original %>%
mutate(mean = ifelse(Age == "3years",
ifelse(Condition == "plausible", 0.51,0.49),
ifelse(Age == "4years",
ifelse(Condition == "plausible", 0.60,0.40),
ifelse(Age == "5years",
ifelse(Condition == "plausible", 0.54, 0.25),NA))))%>% #assigns corresponding means for age groups and conditions
mutate(sd = ifelse(Age == "3years",
ifelse(Condition == "plausible", 0.10,0.12),
ifelse(Age == "4years",
ifelse(Condition == "plausible", 0.11,0.10),
ifelse(Age == "5years",
ifelse(Condition == "plausible", 0.12, 0.11),NA)))) #assigns corresponding standard deviations for age groups and conditions
noisy_channel_original =
noisy_channel_original %>%
group_by(Age, Condition,n_test_trials,N,Simulations) %>% #group participants
do(subject_prob = rnorm(.$N,.$mean,.$sd)) %>% #generating gubject probabilities based on above means and standard deviations
unnest(subject_prob)%>%
mutate(subject_prob = replace(subject_prob ,subject_prob <0,0.01),
subject_prob = replace(subject_prob ,subject_prob >1,0.99))%>% #replacing impossible probabilities (<0 with 0.01, >1 with 0.99)
group_by(Age,Condition,n_test_trials,N,Simulations,subject_prob) %>%
do(data = rbinom(n = 1, size = .$n_test_trials, prob = .$subject_prob)/.$n_test_trials) %>% #simulating childrne's choices in experiment (binom = two choices: plausible, implausible)
unnest(data)
noisy_channel_means_original = noisy_channel_original %>%
group_by(Condition, Age) %>%
summarize(Mean = mean(data), SE = sd(data)/sqrt(n())) #calculating Means and Standard Error from Simulated data to be able to graph it
print(noisy_channel_original)## # A tibble: 144 x 7
## Age Condition n_test_trials N Simulations subject_prob data
## <fctr> <fctr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 3years plausible 8 24 1 0.2180555 0.125
## 2 3years plausible 8 24 1 0.3558924 0.500
## 3 3years plausible 8 24 1 0.3928885 0.125
## 4 3years plausible 8 24 1 0.4079217 0.625
## 5 3years plausible 8 24 1 0.4174131 0.250
## 6 3years plausible 8 24 1 0.4335078 0.500
## 7 3years plausible 8 24 1 0.4525080 0.500
## 8 3years plausible 8 24 1 0.4619765 0.750
## 9 3years plausible 8 24 1 0.4658073 0.500
## 10 3years plausible 8 24 1 0.4659059 0.375
## # ... with 134 more rows
ggplot(noisy_channel_means_original, aes(Condition, Mean, fill=Condition))+
geom_bar(stat="identity")+
ylim(0.0, 1.00)+
facet_grid(.~Age)+
geom_errorbar(aes(ymin=Mean-SE, ymax=Mean+SE)) #graphing Means and SE seperately for each age group#Multiple Simulations for Condition by Age
#How many participants are needed to get a statistically significant result if there is a true effect?
n_test_trials = 8 # Each child took part in 8 test trials
#n_exposure_trials = 7 # Each child took part in 7 exposure trials
n_children = seq(10, 100, by=3) # There were 48 3-year-old, 49 4-year-old, and 43 5-year-old children, simulation with 10 to 100 children (seq by 3)
#generate dataframe
noisy_channel = expand.grid(
n_test_trials = n_test_trials,
N = n_children,
Age = c("3years", "4years", "5years"),
Condition = c("plausible", "implausible"),
Simulations = 1:100 #should be done with at least 100
)
#MEANS and STANDARD Deviations for all conditions
mean3yearplaus = 0.51
mean3yearimplaus = 0.49
mean4yearplaus = 0.60
mean4yearimplaus = 0.40
mean5yearplaus = 0.54
mean5yearimplaus = 0.25
sd3yearplaus = 0.10
sd3yearimplaus = 0.12
sd4yearplaus = 0.11
sd4yearimplaus = 0.10
sd5yearplaus = 0.12
sd5yearimplaus = 0.11
noisy_channel =
noisy_channel %>%
mutate(mean = ifelse(Age == "3years",
ifelse(Condition == "plausible", 0.51,0.49),
ifelse(Age == "4years",
ifelse(Condition == "plausible", 0.60,0.40),
ifelse(Age == "5years",
ifelse(Condition == "plausible", 0.54, 0.25),NA))))%>% #assigns corresponding means for age groups and conditions
mutate(sd = ifelse(Age == "3years",
ifelse(Condition == "plausible", 0.10,0.12),
ifelse(Age == "4years",
ifelse(Condition == "plausible", 0.11,0.10),
ifelse(Age == "5years",
ifelse(Condition == "plausible", 0.12, 0.11),NA)))) #assigns corresponding SDs for age groups and conditions
noisy_channel =
noisy_channel %>%
group_by(Age, Condition,n_test_trials,N,Simulations) %>%
do(subject_prob = rnorm(.$N,.$mean,.$sd)) %>% #calculating subject probabilities
unnest(subject_prob)%>%
mutate(subject_prob = replace(subject_prob ,subject_prob <0,0.01),
subject_prob = replace(subject_prob ,subject_prob >1,0.99))%>% #replacing impossible probabilities (<0 with 0.01, >1 with 0.99)
group_by(Age,Condition,n_test_trials,N,Simulations,subject_prob) %>%
do(data = rbinom(n = 1, size = .$n_test_trials, prob = .$subject_prob)/.$n_test_trials) %>% #simulating childrne's choices in experiment (binom = two choices: plausible, implausible)
unnest(data)
noisy_channel_means = noisy_channel %>%
group_by(Condition, Age) %>%
summarize(Mean = mean(data), SE = sd(data)/sqrt(n())) #calculating Means and Standard Error from multiple imulated data to be able to graph it
print(noisy_channel)## # A tibble: 1,023,000 x 7
## Age Condition n_test_trials N Simulations subject_prob data
## <fctr> <fctr> <dbl> <dbl> <int> <dbl> <dbl>
## 1 3years plausible 8 10 1 0.2654600 0.125
## 2 3years plausible 8 10 1 0.3945258 0.500
## 3 3years plausible 8 10 1 0.3982728 0.375
## 4 3years plausible 8 10 1 0.4384409 0.375
## 5 3years plausible 8 10 1 0.4992169 0.375
## 6 3years plausible 8 10 1 0.5002496 0.500
## 7 3years plausible 8 10 1 0.5371170 0.250
## 8 3years plausible 8 10 1 0.5851995 0.250
## 9 3years plausible 8 10 1 0.6183343 0.750
## 10 3years plausible 8 10 1 0.7892240 0.750
## # ... with 1,022,990 more rows
summary_noisy_channel = noisy_channel%>%
select(Condition,n_test_trials, Simulations, N, data, Age) %>%
group_by(Simulations, N, Age) %>%
do(p_value = summary(lm(data ~ Condition, data = .))$coefficient[2,4]) %>% #run linear regression and select p-value for each simualtion (choices predicted by condition)
unnest(p_value) %>%
mutate(significant = ifelse(p_value < 0.05, 1, 0)) %>% #assign 1 to significant p-values, 0 to insignificant p-values
group_by(N, Age) %>%
summarise(
n_sims = length(p_value),
proportion_significant = sum(significant)/n_sims) #calculate proportion of significant p-values
#Simulation for Interaction
summary_noisy_channel_interaction = noisy_channel%>%
select(Condition,n_test_trials, Simulations, N, data, Age) %>%
group_by(Simulations, N) %>%
do(p_value = summary(lm(data ~ Condition * Age, data = .))$coefficient[4,4]) %>% #run linear regression and select p-value for each simualtion (choices predicted by INTERACTION between condition and age)
unnest(p_value) %>%
mutate(significant = ifelse(p_value < 0.05, 1, 0)) %>%#assign 1 to significant p-values, 0 to insignificant p-values
group_by(N) %>%
summarise(
n_sims = length(p_value),
proportion_significant = sum(significant)/n_sims) #calculate proportion of significant p-valuesggplot(summary_noisy_channel, aes(x= N, y=proportion_significant, colour=Age))+
geom_line() #plot proportion of significant results of condition for different numbers of participants by Ageggplot(summary_noisy_channel_interaction, aes(x= N, y=proportion_significant))+
geom_line() #plot proportion of significant results of Interaction bewteen condition and age for different numbers of participants #Multiple Simulations with 75% smaller differences between conditions
#How many participants are needed to get a statistically significant result if there is a true effect?
n_test_trials = 8 # Each child took part in 8 test trials
#n_exposure_trials = 7 # Each child took part in 7 exposure trials
n_children = seq(10, 100, by=3) # There were 48 3-year-old, 49 4-year-old, and 43 5-year-old children, simulation with 10 to 50 children (seq by 3)
#MEANS and STANDARD DEVIATIONS for all conditions with 75% smaller differences between conditions than in original experience
mean3yearplaus75 = 0.51
mean3yearimplaus75 = 0.505
mean4yearplaus75 = 0.60
mean4yearimplaus75 = 0.55
mean5yearplaus75 = 0.54
mean5yearimplaus75 = 0.4675
sd3yearplaus75 = 0.10
s3yearimplaus75 = 0.105
sd4yearplaus75 = 0.11
sd4yearimplaus75 = 0.1075
sd5yearplaus75 = 0.12
sd5yearimplaus75 = 0.1175
#generate dataframe
noisy_channel_75 = expand.grid(
n_test_trials = n_test_trials,
N = n_children,
Age = c("3years", "4years", "5years"),
Condition = c("plausible", "implausible"),
Simulations = 1:100) #do with 100
noisy_channel_75 =
noisy_channel_75 %>%
mutate(mean = ifelse(Age == "3years",
ifelse(Condition == "plausible", 0.51,0.505),
ifelse(Age == "4years",
ifelse(Condition == "plausible", 0.60,0.55),
ifelse(Age == "5years",
ifelse(Condition == "plausible", 0.54, 0.4675),NA))))%>%#assigns corresponding means for age groups and conditions
mutate(sd = ifelse(Age == "3years",
ifelse(Condition == "plausible", 0.10,0.105),
ifelse(Age == "4years",
ifelse(Condition == "plausible", 0.11,0.1075),
ifelse(Age == "5years",
ifelse(Condition == "plausible", 0.12, 0.1175),NA))))#assigns corresponding SDs for age groups and conditions
noisy_channel_75 =
noisy_channel_75 %>%
group_by(Age, Condition,n_test_trials,N,Simulations) %>%
do(subject_prob = rnorm(.$N,.$mean,.$sd)) %>% #calculating subject probabilities
unnest(subject_prob)%>%
mutate(subject_prob = replace(subject_prob ,subject_prob <0,0.01),
subject_prob = replace(subject_prob ,subject_prob >1,0.99))%>%#replacing impossible probabilities (<0 with 0.01, >1 with 0.99)
group_by(Age,Condition,n_test_trials,N,Simulations,subject_prob) %>%
do(data = rbinom(n = 1, size = .$n_test_trials, prob = .$subject_prob)/.$n_test_trials) %>%#simulating childrne's choices in experiment (binom = two choices: plausible, implausible)
unnest(data)
noisy_channel_75_means = noisy_channel_75 %>%
group_by(Condition, Age) %>%
summarize(Mean = mean(data), SE = sd(data)/sqrt(n()))#calculating Means and Standard Error from mutliple simulated data to be able to graph it
print(noisy_channel_75)## # A tibble: 1,023,000 x 7
## Age Condition n_test_trials N Simulations subject_prob data
## <fctr> <fctr> <dbl> <dbl> <int> <dbl> <dbl>
## 1 3years plausible 8 10 1 0.4177257 0.000
## 2 3years plausible 8 10 1 0.4409565 0.375
## 3 3years plausible 8 10 1 0.4929135 0.250
## 4 3years plausible 8 10 1 0.4931999 0.500
## 5 3years plausible 8 10 1 0.4945494 0.625
## 6 3years plausible 8 10 1 0.5223466 0.125
## 7 3years plausible 8 10 1 0.5238894 0.375
## 8 3years plausible 8 10 1 0.5643513 0.500
## 9 3years plausible 8 10 1 0.5937699 0.625
## 10 3years plausible 8 10 1 0.6023947 0.625
## # ... with 1,022,990 more rows
#Simulation for Condition by Age
summary_noisy_channel_75 = noisy_channel_75%>%
select(Condition,n_test_trials, Simulations, N, data, Age) %>%
group_by(Simulations, N, Age) %>%
do(p_value = summary(lm(data ~ Condition, data = .))$coefficient[2,4]) %>%#run linear regression and select p-value for each simualtion (choices predicted by condition)
unnest(p_value) %>%
mutate(significant = ifelse(p_value < 0.05, 1, 0)) %>%#assign 1 to significant p-values, 0 to insignificant p-values
group_by(N, Age) %>%
summarise(
n_sims = length(p_value),
proportion_significant = sum(significant)/n_sims)#calculate proportion of significant p-values
#Simulation for Interaction
summary_noisy_channel_interaction_75 = noisy_channel_75%>%
select(Condition,n_test_trials, Simulations, N, data, Age) %>%
group_by(Simulations, N) %>%
do(p_value = summary(lm(data ~ Condition * Age, data = .))$coefficient[4,4]) %>%#run linear regression and select p-value for each simualtion (choices predicted by INTERACTION between condition and age)
unnest(p_value) %>%
mutate(significant = ifelse(p_value < 0.05, 1, 0)) %>% #assign 1 to significant p-values, 0 to insignificant p-values
group_by(N) %>%
summarise(
n_sims = length(p_value),
proportion_significant = sum(significant)/n_sims)#calculate proportion of significant p-valuesggplot(summary_noisy_channel_75, aes(x= N, y=proportion_significant, colour=Age))+
geom_line() #plot proportion of significant results of condition for different numbers of participants by Ageggplot(summary_noisy_channel_interaction_75, aes(x= N, y=proportion_significant))+
geom_line() #plot proportion of significant results of Interaction bewteen condition and age for different numbers of participants The simulation has shown that, to have a 80% probability of detecting a true difference, approximately 25 participants for each, the 4- and the 5-year-olds groups, are needed. For the 3-year-old group, 80% probability of detecting a true difference was never detected, even with a participant size of a hundred children. This suggests that there is no true difference in this group which is in line with Yurovsky’s, Case’s and Frank’s findings. To detect an interaction between age and condition with a probability of only 25%, already at least 100 participants are needed, which indicates that the power to detect an interaction effect with 100 participants is very low. Therefore, this project aims to have at least 25 participants for each age group and will focus on separate effects and not on interaction effects.
The stimuli for the noisy channel experiment were several pairs of pictures that each were accompanied by a spoken utterance. Each picture pair consisted of one semantically plausible picture and of one semantically implausible picture. The sentence accompanying the picture pairs described either the semantically plausible or the semantically implausible picture. All participants completed a block of eight exposure trials followed by a block of seven test trials. The order of trials was randomised across participants. In the exposure trial, the referential expressions for the two pictures were extremely distinct; hence the speaker’s reference was unambiguous. In the test trial, the referential expressions only differed phonetically in one sound, which made the accompanying utterances highly ambiguous. To further increase the ambiguity of the spoken utterances, the audio recordings were convolved with Brown noise of amplitude ~ 0.6 in the Audacity audio editor. The audio was transmitted through external computer speakers that were located approximately 2.5 feet away from the children. The pictures were created from freely available clip-art.
Figure 1: Sample picture pair (exposure trial)
Figure 2: Sample picture pair (test trial)
Before starting the actual experiment, participants were informed of the rights they had as research participants and asked to give consent or assent. After giving their consent or assent, the task was explained, and participants were introduced to the speaker - Allison. After seeing a picture of Allison, participants started with the experiment. In each trial, participants had to select the picture that they thought best matched the speaker’s description by touching one of the two pictures on an iPad. Participants were randomly divided into two groups: One group was exposed to a speaker that always selected the plausible picture in the exposure trials whereas the other group’s speaker always selected the implausible picture. In the test trials, the speaker referred to the implausible picture in both conditions.
This replication project used the exact same pictures as the original experiment (freely available online: https://github.com/dyurovsky/noisy-kids/tree/master/stimuli/images) but it used the recordings of a British English speaker instead of an American English speaker as it is targeted towards British children and not towards American children.
The Ipad game was programmed in R using JavaScript.
Link to version for implausible condition: http://hrexp.ppls.ed.ac.uk/class/Lydia/Replication/RepProImplausible.html
<html>
<head>
<title>Implausible_Game</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="jspsych-5.0.3/jspsych.js"></script>
<script src="jspsych-5.0.3/plugins/jspsych-survey-text.js"></script>
<script src="jspsych-5.0.3/plugins/jspsych-text.js"></script>
<link href="jspsych-5.0.3/css/jspsych.css" rel="stylesheet" type="text/css"></link>
<script src="jspsych-5.0.3/plugins/jspsych-button-response.js"></script>/
</head>
<body>
</body>
<script>
//make sure plugins etc, are specified
//function for saving Data
function saveData(filename, filedata){
$.ajax({
type:'post',
cache: false,
url: 'save_data.php', // this is the path to the PHP script that specifies where to save the data
data: {filename: filename, filedata: filedata}
});
}
//Participant ID
var id = prompt('Please enter the subject number');
//Consent Form with two options: decline or consent
var consent_block = {
stimulus: "<p>This research is being conducted by the students of PSYL11087 as part"+
" of their MSc degree. You have been asked to participate because you are"+
" a student on a PPLS MSc degree. The Instructor for this class, and supervisor"+
" for this project is Dr Hugh Rabagliati (hugh.rabagliati@ed.ac.uk)."+
" You can contact him by email at any time if you have questions.</p>" +
"<p> In this study, you will be asked to complete one of three tasks:</p>"+
"<ol>"+
"<li> You will listen to a set of spoken sentences embedded in background noise,"+
" and choose which of two pictures the sentence refers to.</li>"+
"<li> You will listen to a set of stories about children, and decide if they"+
" are smart or nice. Then, you will see some pictures of people and decide whether"+
" they look smart or nice.</li>" +
"<li> You will see pictures of people, and match those pictures up to either other pictures"+
" of objects or to specific words.</li></ol></p>"+
"<p></p>"+
"<p></p>"+
"<p>The only information collected will be your responses on this task, and your gender."+
" No identifying infomation about you will be collected. Participating in this study does "+
"not confer either benefits or risks. The study will take less than 10 minutes and "+
" there is no monetary compensation. You may stop participation at any time. This data will"+
" be analyzed and used as a coursework submission for the class PSYL11087.</p>"+
"<p> If you consent to participate, press the Consent button below. If you do not consent"+
" you may end the study or press the decline button.</p>",
is_html: true,
choices:['consent','decline'],
type: "button-response",
timing_post_trial: 2000
};
//Collecting Demographic Information
var survey_trial = {
type: 'survey-text',
preamble: 'Subject number is ' + id,
questions: ["How old is the participant?", "What language does the participant speak at home?", "What is the gender of the participant?"],
};
//Create array to which other variables can be pushed (added) so that timeline only needs to take one argument instead of all different trials
var trial_structure = [];
//Explaining/Introducing the Experiment
var instructions_block = {
type: 'button-response',
choices: ['Katie'],
button_html: ['<img src="Stimuli/katie_face2.jpg" height="250px" width="350px"/></img>'],
prompt: "<p>Hello! Welcome to this experiment.<p>" +
"<p>This is Alison. <p>" +
"<p> In this game, you will hear Alison describe her things. She will say a sentence and show you two pictures. Touch the picture that best matches what Alison said.</p>" +
"<p>Press on Allison to begin.</p>"
};
trial_structure.push(instructions_block); //adds instruction block to the trial structure array
//Function that makes it possible to play sound
function PlaySound() {
document.getElementById(play_stim);
play_stim.play();
}
//Exposure Trials (8 trials)
var button_choices_exposure = [
{
choices: ['plausible','implausible'], //two choices (plausible or implausible picture) and relative position on the screen (left or right)
button_html: ['<img src="Stimuli/Exposure Trial/book_table.jpg" height="250px" width="250px"/>','<img src="Stimuli/Exposure Trial/book_plane.jpg"height="250px" width="250px"/>'], //adds images which can be selected as answer (button)
stimulus: '<audio src="Stimuli/Recordings/book_plane.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>', //adds sound + a button that can be pressed to play the sound
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'implausible', trial_condition: 'exposure', items: 'plane_table'
}, //choices_0= picture on left, choices_1=picture on right, group_condition= implausible meaning that the speaker always selects the implausible picture in the exposure trial, trial_condition: exposure (test in test trial), items: implausible condition is always first, in the exposure trial, items are unambigous; this information will be saved in the data file to make analysis easier
},
{ //add other trials in same format
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Exposure Trial/bread_ketchup.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/bread_peanutbutter.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/bread_ketchupbutter.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'implausible', trial_condition: 'exposure', items: 'ketchup_peanutbutter'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Exposure Trial/cat_hammers.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/cat_kittens.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/cat_hammers.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'implausible', trial_condition: 'exposure', items: 'hammers_kittens'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Exposure Trial/flowers_basket.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/flowers_donut.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/flowers_donut.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'implausible', trial_condition: 'exposure', items: 'donut_basket'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Exposure Trial/house_door.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/house_nose.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/house_nose.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'implausible', trial_condition: 'exposure', items: 'nose_door'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Exposure Trial/shark_fish.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/shark_racecar.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/shark_racecar.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'implausible', trial_condition: 'exposure', items: 'racecar_fish'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Exposure Trial/wooden_apples.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/wooden_blocks.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/wooden_apples.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'implausible', trial_condition: 'exposure', items: 'apples_blocks'
},
},
];
//randomise exposure trials to control for order effects
var button_choices_exposure_timeline = jsPsych.randomization.repeat(button_choices_exposure, 1);
//Test trials (7 trials)
var button_choices_test = [
{
choices: ['implausible', 'plausible'], //again participants can select either the plausible or the implausible picture
button_html: ['<img src="Stimuli/Test Trial/airport_fan.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/airport_van.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/fan_airport.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'implausible', trial_condition: 'test', items: 'fan_van'
}, //In contrast to the exposure trial, items are ambiguous in the test condition
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Test Trial/beach_ball.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/beach_bowl.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/beach_bowl.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'implausible', trial_condition: 'test', items: 'bowl_ball'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Test Trial/carrots_bees.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/carrots_peas.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/carrots_bees.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'implausible', trial_condition: 'test', items: 'bees_peas'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Test Trial/horses_coats.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/horses_goats.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/coats_horses.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'implausible', trial_condition: 'test', items: 'coats_goats'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Test Trial/marker_cap.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/marker_cup.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/marker_cup.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'implausible', trial_condition: 'test', items: 'cup_cap'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Test Trial/paper_pan.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/paper_pen.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/paper_pan.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'implausible', trial_condition: 'test', items: 'pan_pen'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Test Trial/shirt_tie.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/shirt_die.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/shirt_die.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'implausible', trial_condition: 'test', items: 'die_tie'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Test Trial/worms_bugs.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/worms_bags.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/worms_bags.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'implausible', trial_condition: 'test', items: 'bags_bugs'
},
},
];
//randomise test trials to control for order effects
var button_choices_test_timeline = jsPsych.randomization.repeat(button_choices_test, 1);
//Specify that exposure trials take a button response
var exposure_trial = {
type: 'button-response',
timeline: button_choices_exposure_timeline,
is_html: true,
}
//Specify that test trials take a button response
var test_trial = {
type: 'button-response',
timeline: button_choices_test_timeline,
is_html: true,
}
//Thank you
var thank_you_block = {
type: 'button-response',
choices: ['end'],
button_html: ['<img src="Stimuli/thumbs_up.png" height="250px" width="250px"/></img>'],
prompt: "<p>That's it! Well done! Thank you for participating.<p>" +
"<p>Press on the smiley face to finish.</p>"
};
//Specify that whenever a trial is saved, the participant ID is saved with it
jsPsych.data.addProperties({subject: id});
jsPsych.init({
timeline: [consent_block, survey_trial, instructions_block, exposure_trial, test_trial, thank_you_block], //specifies the order in which different variables are to be presented
on_finish: function() {
saveData(id + ".csv", jsPsych.data.dataAsCSV()); //specifies the name and in which form (comma seperated) the data should be saved
}
})
</script>
</html>Link to version for plausible condition: http://hrexp.ppls.ed.ac.uk/class/Lydia/Replication/RepProPlausible.html
<html>
<head>
<title>Plausible_Game</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="jspsych-5.0.3/jspsych.js"></script>
<script src="jspsych-5.0.3/plugins/jspsych-survey-text.js"></script>
<script src="jspsych-5.0.3/plugins/jspsych-text.js"></script>
<link href="jspsych-5.0.3/css/jspsych.css" rel="stylesheet" type="text/css"></link>
<script src="jspsych-5.0.3/plugins/jspsych-button-response.js"></script>/
</head>
<body>
</body>
<script>
//make sure plugins etc, are specified
//function for saving Data
function saveData(filename, filedata){
$.ajax({
type:'post',
cache: false,
url: 'save_data.php', // this is the path to the PHP script that specifies where to save the data
data: {filename: filename, filedata: filedata}
});
}
//Participant ID
var id = prompt('Please enter the subject number');
//Consent Form with two options: decline or consent
var consent_block = {
stimulus: "<p>This research is being conducted by the students of PSYL11087 as part"+
" of their MSc degree. You have been asked to participate because you are"+
" a student on a PPLS MSc degree. The Instructor for this class, and supervisor"+
" for this project is Dr Hugh Rabagliati (hugh.rabagliati@ed.ac.uk)."+
" You can contact him by email at any time if you have questions.</p>" +
"<p> In this study, you will be asked to complete one of three tasks:</p>"+
"<ol>"+
"<li> You will listen to a set of spoken sentences embedded in background noise,"+
" and choose which of two pictures the sentence refers to.</li>"+
"<li> You will listen to a set of stories about children, and decide if they"+
" are smart or nice. Then, you will see some pictures of people and decide whether"+
" they look smart or nice.</li>" +
"<li> You will see pictures of people, and match those pictures up to either other pictures"+
" of objects or to specific words.</li></ol></p>"+
"<p></p>"+
"<p></p>"+
"<p>The only information collected will be your responses on this task, and your gender."+
" No identifying infomation about you will be collected. Participating in this study does "+
"not confer either benefits or risks. The study will take less than 10 minutes and "+
" there is no monetary compensation. You may stop participation at any time. This data will"+
" be analyzed and used as a coursework submission for the class PSYL11087.</p>"+
"<p> If you consent to participate, press the Consent button below. If you do not consent"+
" you may end the study or press the decline button.</p>",
is_html: true,
choices:['consent','decline'],
type: "button-response",
timing_post_trial: 2000
};
//Collecting Demographic Information
var survey_trial = {
type: 'survey-text',
preamble: 'Subject number is ' + id,
questions: ["How old is the participant?", "What language does the participant speak at home?", "What is the gender of the participant?"],
};
//Create array to which other variables can be pushed (added) so that timeline only needs to take one argument instead of all different trials
var trial_structure = [];
//Explaining/Introducing the Experiment
var instructions_block = {
type: 'button-response',
choices: ['Katie'],
button_html: ['<img src="Stimuli/katie_face2.jpg" height="250px" width="350px"/></img>'],
prompt: "<p>Hello! Welcome to this experiment.<p>" +
"<p>This is Alison. <p>" +
"<p> In this game, you will hear Alison describe her things. She will say a sentence and show you two pictures. Touch the picture that best matches what Alison said.</p>" +
"<p>Press on Allison to begin.</p>"
};
//adds instruction block to the trial structure array
trial_structure.push(instructions_block);
//Function that makes it possible to play sound, plugged into trials
function PlaySound() {
document.getElementById(play_stim);
play_stim.play();
}
//Exposure Trials (8 trials)
var button_choices_exposure = [
{
choices: ['plausible','implausible'], //two choices (plausible or implausible picture), and relative position on the screen (left or right)
button_html: ['<img src="Stimuli/Exposure Trial/book_table.jpg" height="250px" width="250px"/>','<img src="Stimuli/Exposure Trial/book_plane.jpg"height="250px" width="250px"/>'], //adds images which can be selected as answer (button)
stimulus: '<audio src="Stimuli/Recordings/book_table.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>', //adds sound + a button that can be pressed to play the sound
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'plausible', trial_condition: 'exposure', items: 'plane_table'
}, //choices_0= picture on left, choices_1=picture on right, group_condition= plausible meaning that the speaker always selects the plausible picture in the exposure trial, trial_condition: exposure (test in test trial), items: implausible condition is always first, in the exposure trial, items are unambigous; this information will be saved in the data file to make analysis easier
},
{ //add other trials in same format
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Exposure Trial/bread_ketchup.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/bread_peanutbutter.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/bread_peanutbutter.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible',group_condition: 'plausible', trial_condition: 'exposure', items: 'ketchup_peanutbutter'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Exposure Trial/cat_hammers.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/cat_kittens.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/cat_kittens.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'plausible', trial_condition: 'exposure', items: 'hammers_kittens'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Exposure Trial/flowers_basket.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/flowers_donut.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/flowers_basket.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'plausible', trial_condition: 'exposure', items: 'donut_basket'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Exposure Trial/house_door.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/house_nose.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/house_door.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'plausible', trial_condition: 'exposure', items: 'nose_door'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Exposure Trial/shark_fish.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/shark_racecar.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/shark_fish.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'plausible', trial_condition: 'exposure', items: 'racecar_fish'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Exposure Trial/wooden_apples.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Exposure Trial/wooden_blocks.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/wooden_blocks.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'plausible', trial_condition: 'exposure', items: 'apples_blocks'
},
},
];
//randomise exposure trials to control for order effects
var button_choices_exposure_timeline = jsPsych.randomization.repeat(button_choices_exposure, 1);
//Test trials (7 trials)
var button_choices_test = [
{
choices: ['implausible', 'plausible'],//again participants can select either the plausible or the implausible picture
button_html: ['<img src="Stimuli/Test Trial/airport_fan.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/airport_van.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/fan_airport.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'plausible', trial_condition: 'test', items: 'fan_van'
},//In contrast to the exposure trial, items are ambiguous in the test condition
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Test Trial/beach_ball.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/beach_bowl.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/beach_bowl.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'plausible', trial_condition: 'test', items: 'bowl_ball'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Test Trial/carrots_bees.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/carrots_peas.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/carrots_bees.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { group_condition: 'plausible', trial_condition: 'test', items: 'bees_peas'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Test Trial/horses_coats.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/horses_goats.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/coats_horses.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: {choices_0: 'implausible', choices_1: 'plausible', group_condition: 'plausible', trial_condition: 'test', items: 'coats_goats'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Test Trial/marker_cap.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/marker_cup.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/marker_cup.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'plausible', trial_condition: 'test', items: 'cup_cap'
},
},
{
choices: ['implausible', 'plausible'],
button_html: ['<img src="Stimuli/Test Trial/paper_pan.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/paper_pen.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/paper_pan.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'implausible', choices_1: 'plausible', group_condition: 'plausible', trial_condition: 'test', items: 'pan_pen'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Test Trial/shirt_tie.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/shirt_die.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/shirt_die.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'plausible', trial_condition: 'test', items: 'die_tie'
},
},
{
choices: ['plausible', 'implausible'],
button_html: ['<img src="Stimuli/Test Trial/worms_bugs.jpg" height="250px" width="250px"/>', '<img src="Stimuli/Test Trial/worms_bags.jpg" height="250px" width="250px"/>'],
stimulus: '<audio src="Stimuli/Recordings/worms_bags.wav" id="play_stim"></audio>'+
' <center><button id="audio_button" onclick="PlaySound()" class="jspsych-btn" style="height:150px;width:150px">Play!</button></center>',
data: { choices_0: 'plausible', choices_1: 'implausible', group_condition: 'plausible', trial_condition: 'test', items: 'bags_bugs'
},
},
];
//randomise test trials to control for order effects
var button_choices_test_timeline = jsPsych.randomization.repeat(button_choices_test, 1);
//Specify that exposure trials take a button response
var exposure_trial = {
type: 'button-response',
timeline: button_choices_exposure_timeline,
is_html: true,
}
//Specify that test trials take a button response
var test_trial = {
type: 'button-response',
timeline: button_choices_test_timeline,
is_html: true,
}
//Thank you
var thank_you_block = {
type: 'button-response',
choices: ['end'],
button_html: ['<img src="Stimuli/thumbs_up.png" height="250px" width="250px"/></img>'],
prompt: "<p>That's it! Well done! Thank you for participating.<p>" +
"<p>Press on the smiley face to finish.</p>"
};
//Specify that whenever a trial is saved, the participant ID is saved with it
jsPsych.data.addProperties({subject: id});
jsPsych.init({
timeline: [consent_block, survey_trial, instructions_block, exposure_trial, test_trial, thank_you_block], //specifies the order in which different variables are to be presented
on_finish: function() {
saveData(id + ".csv", jsPsych.data.dataAsCSV()); //specifies the name and in which form (comma seperated) the data should be saved
}
})
</script>
</html>The replication project expects to find the same results as Yurovsky’s, Case’s and Frank’s study. This would provide further evidence that the noisy-channel principles are valid for both adults and children. As a first step, responses to exposure trials will be analysed to make sure that all participants understood the task; a separate mixed-effects logistic regression for each age group will be fitted. Also, a mixed-effects model which includes age, condition and interaction between age and condition will be fitted to all the children’s data. As a second step, test trials will be analysed. Again, separate mixed-effects logistic regressions for each age group and a mixed-effects regression to all the children’s data will be fitted. An additional mixed-effects model that includes the number of exposure trials on which individual children selected the plausible picture will be fitted to determine whether older children build stronger expectations during exposure trial than younger children.
For the pilot study, data was collected from 2 children and 8 adults. Since data from 2 children is not sufficient for fitting mixed-effects models, the analysis of the pilot data will concentrate on using descriptive statistics for the children data. For the adult group a logistic regression will be run to compare the mean proportion of plausible referent choices on test trials between speaker conditions.
Child data was collected from two girls, aged 7 and 10. Both children responded appropriately in the exposure trial with the girl in the plausible condition speaker picking the plausible picture in 7 out of 7 trials and the girl in the implausible speaker condition picking the implausible picture in 7 out of 7 trials. Looking at the test trials, the child in the implausible condition picked implausible in 6 and plausible in 2 out of 8 trials, whereas the child in the plausible condition picked implausible in 7 and plausible in 1 out of 8 trials. The proportion of pictures chosen in each condition are displayed in Figure 3. Interestingly, the results of the child pilot-study contradict the findings of Yurovsky’s, Case’s and Frank’s study as children did not seem to integrate expectations of what a speaker should say with the perceptual information from the auditory stimuli they were exposed to. However, since the participant number is too small to draw any conclusions, further testing is needed to find out whether Yurovsky’s, Case’s and Frank’s findings might be inaccurate.
c1i<- read.csv("1-implaus-child.csv", header = T) #load child data
c2p<- read.csv("2-plaus-child.csv", header = T)
data <- rbind(c1i, c2p) #combine data files
require(plyr)
##seperate responses into columns
data$responses <- gsub('[}{"]', "", data$responses)
out <- strsplit(as.character(data$responses),',')
out <- as.data.frame(do.call(rbind, out))
out$subject <- levels(data$subject)
data <- merge(data, out, by = "subject")
data$V1 <- gsub('Q0:', "", data$V1)
data$V2 <- gsub('Q1:', "", data$V2)
data$V3 <- gsub('Q2:', "", data$V3)
data <- plyr::rename(data, c("V1" = "Q0", "V2" = "Q1", "V3" = "Q2"))
data$choices[data$choices != "implausible" & data$choices != "plausible"] <- NA # change choices other than implausible or plausible to NA
data$choices <- droplevels(data$choices) #drop unused levels
#check absolute numbers that pictures were picked in each condition
#summary(data$choices[data$group_condition == "plausible" & data$trial_condition == "exposure"])
#summary(data$choices[data$group_condition == "implausible" & data$trial_condition == "exposure"])
#summary(data$choices[data$group_condition == "plausible" & data$trial_condition == "test"])
#summary(data$choices[data$group_condition == "implausible" & data$trial_condition == "test"])
datatest <- subset(data, data$trial_condition == "test") #subset test trials for plotting#graph results
ggplot(datatest,aes(x = group_condition, fill = factor(choices, labels = c("implausible picture", "plausible picture")))) +
geom_bar(position = "fill")+
labs(x = "Speaker Condition", y= "Proportion Chosen", title = "Figure-3: Proportion of pictures chosen in each condition - Children", fill= "Picture Choices")+
geom_hline(yintercept = 0.50, linetype=3)+
theme(panel.border = element_rect(colour = "black", fill=NA),
panel.background = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank())Adult data was collected from 6 people who were between 18- and 26-years-old. 2 of the participants were male and 6 were female. Again, responses to exposure trials were accurate with the 4 adult participants in the implausible condition picking the implausible speaker picture in and the 4 adults in the plausible speaker condition picking the plausible picture in all trials. Looking at the test trials, participants in the implausible condition picked the implausible pictures on average in 3.25 trials and the plausible picture in 0.75 trials, while participants in the plausible speaker condition picked the implausible pictures on average in 0.75 trials and the plausible picture in 3.25 trials. The proportion of pictures chosen in each condition are displayed in Figure 4. A logistic regression furthermore showed that adult participants in the plausible speaker condition chose the plausible picture significantly more often than those in the implausible speaker condition. These results indicate that adults integrated their expectations of what a speaker should say with the perceptual information from the auditory stimuli they were exposed to. Hence, the results of the adult pilot study correspond with previous findings that adults flexibly adapt how much they rely on the different cues when the cues’ reliability changes.
a1i<- read.csv("1-implaus-adult.csv", header = T) #load adult data
a2i<- read.csv("2-implaus-adult.csv", header = T)
a3i<- read.csv("3-implaus-adult.csv", header = T)
a4i<- read.csv("4-implaus-adult.csv", header = T)
a1p<- read.csv("1-plaus-adult.csv", header = T)
a2p<- read.csv("2-plaus-adult.csv", header = T)
a3p<- read.csv("3-plaus-adult.csv", header = T)
a4p<- read.csv("4-plaus-adult.csv", header = T)
#combine data files
dataadult <- rbind(a1i, a1p, a2i, a2p, a3i, a3p, a4i, a4p)
#seperate responses into columns
dataadult$responses <- gsub('[}{"]', "", dataadult$responses)
outadult <- strsplit(as.character(dataadult$responses),',')
outadult <- as.data.frame(do.call(rbind, outadult))
outadult$subject <- levels(dataadult$subject)
dataadult <- merge(dataadult, outadult, by="subject")
dataadult$V1 <- gsub('Q0:', "", dataadult$V1)
dataadult$V2 <- gsub('Q1:', "", dataadult$V2)
dataadult$V3 <- gsub('Q2:', "", dataadult$V3)
dataadult <- plyr::rename(dataadult, c("V1" = "Q0", "V2" = "Q1", "V3" = "Q2"))
dataadult$choices[dataadult$choices != "implausible" & dataadult$choices != "plausible"] <- NA # change choices other than implausible or plausible to NA
dataadult$choices <- droplevels(dataadult$choices) #drop unused levels
#check absolute numbers
#summary(dataadult$choices[dataadult$group_condition == "plausible" & dataadult$trial_condition == "exposure"])
#summary(dataadult$choices[dataadult$group_condition == "implausible" & dataadult$trial_condition == "exposure"])
#summary(dataadult$choices[dataadult$group_condition == "plausible" & dataadult$trial_condition == "test"])
#summary(dataadult$choices[dataadult$group_condition == "implausible" & dataadult$trial_condition == "test"])
datatestadult <- subset(dataadult, dataadult$trial_condition == "test")#subset test trials for plotting
#logistic regression adult data
model <- (glm(datatestadult$choices ~ datatestadult$group_condition, family = "binomial"))
summary(model)##
## Call:
## glm(formula = datatestadult$choices ~ datatestadult$group_condition,
## family = "binomial")
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.8297 -0.6444 0.0000 0.6444 1.8297
##
## Coefficients:
## Estimate Std. Error z value
## (Intercept) -1.4663 0.4529 -3.238
## datatestadult$group_conditionplausible 2.9327 0.6405 4.579
## Pr(>|z|)
## (Intercept) 0.00121 **
## datatestadult$group_conditionplausible 4.68e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 88.723 on 63 degrees of freedom
## Residual deviance: 61.770 on 62 degrees of freedom
## AIC: 65.77
##
## Number of Fisher Scoring iterations: 4
anova(model, test = "Chisq")## Analysis of Deviance Table
##
## Model: binomial, link: logit
##
## Response: datatestadult$choices
##
## Terms added sequentially (first to last)
##
##
## Df Deviance Resid. Df Resid. Dev Pr(>Chi)
## NULL 63 88.723
## datatestadult$group_condition 1 26.953 62 61.770 2.085e-07
##
## NULL
## datatestadult$group_condition ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#graph results
ggplot(datatestadult,aes(x = group_condition, fill = factor(choices, labels = c("implausible picture", "plausible picture")))) +
geom_bar(position = "fill")+
labs(x = "Speaker Condition", y= "Proportion Chosen", title = "Figure-4: Proportion of pictures chosen in each condition - Adults", fill= "Picture Choices")+
geom_hline(yintercept = 0.50, linetype=3)+
theme(panel.border = element_rect(colour = "black", fill=NA),
panel.background = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank())This replication project used more or less exactly the same methods as Yurovsky’s, Case’s and Frank’s study. However, while the participants in Yurovsky’s, Case’s and Frank’s study were mostly exposed to American English, this replication was conducted in the United Kingdom; hence, this study tried to recruit native British children. Consequently, the soundtracks that accompanied each picture pair were re-recorded with a British English speaker.
Since this replication, apart from the recordings, had the exact same design as the original study, it should be as sensitive as Yurovsky’s, Case’s and Frank’s study to capture the expected phenomena.
One limitation of the pilot study is obviously the small participant number, but additionally the child testing might have been influenced by the presence of the mother in the test room. One child always waited for the mother’s confirmation before picking a picture which could have distorted the results. For future testing, it would be better if the mother was not in the same room as the child while testing, or is explicitly briefed that she should not provide any feedback to the child during the experiment.
Another limitation of this project as well as of the original study is the fact that the speaker in the test trials always refers to the implausible picture, hence, auditory and expectation cues are congruent in the implausible speaker condition, but incongruent in the plausible speaker condition, This is also problematic, considering that there is, in fact, a ‘correct answer’ in the test trials, which is in this case always the implausible picture. Also, participants might pick the plausible picture sometimes, solely because they think that the plausible picture has to be correct in some instances. Consequently, future testing should try to either have plausible and implausible statements in the test trials or make the test trial statements truly ambiguous, for instance by leaving out the sound that distinguishes the two words altogether, i.e. in the sentence “I road to the airport on a van”, the speaker could say “an” instead of “van”.
Future replications of Yurovsky’s, Case’s and Frank’s study might also want to look at the phonological distances between the referents in the ambigious test trials. While “ball” and “bowl” are for instance phonologically very similar in British English, “bees” and “peas” are more distinct. It would be interesting to see whether participants relied more or less on auditory cues based on different degrees of phonetic similarity. Also, it could be interesting to see whether the position of the ambiguous sound in a word influences perceptual ambiguity.
In conclusion, replicating Yurovsky’s, Case’s and Frank’s study with a larger sample and, possibly, with an adjusted experimental design could offer valuable insights on whether noisy-channel principles are valid for both adults and children.
Clark, E. V. (2009). First language acquisition (2nd ed.). Cambridge, England: Cambridge University Press.
Trueswell, J. C., Sekerina, I., Hill, N. M., & Logrip, M. L. (1999). The kindergarten-path effect: Studying on-line sentence processing in young children. Cognition, 73, 89-134.
Creel, S. C. (2012). Preschoolers’ use of talker information in on-line comprehension. Child Development, 83, 2042-2056.
Gibson, E., Bergen, L., & Piantadosi, S. T. (2013). Rational integration of noisy evidence and prior semantic expectations in sentence interpretation. Proceedings of the National Academy of Sciences 110, 8051-8056.
Shannon, C. E. (1948). A mathematical theory of communication. The Bell Systems Technical Journal, XXVII, 379-423.
Yurovsky, D., Case, S., & Frank, M. (2016). Preschoolers Flexibly Adapt to Linguistic Input in a Noisy Channel. Psychological Science, 28(1), 132-140. http://dx.doi.org/10.1177/0956797616668557
Yurovsky, D. (2017). dyurovsky/noisy-kids. GitHub. Retrieved 2 October 2017, from https://github.com/dyurovsky/noisy-kids/tree/master/stimuli/images