lecture 10 experiment 2
DESCRIPTION
Lecture 10 Experiment 2. Martin Giese. What you should remember. Function of the middle ear Traveling wave theory Audibility function Loudness perception Masking. What you should learn today. Programming of stimuli in MATLAB Data analysis Details about the experiments. - PowerPoint PPT PresentationTRANSCRIPT
Lecture 10
Experiment 2
Martin Giese
What you should remember
1. Function of the middle ear
2. Traveling wave theory
3. Audibility function
4. Loudness perception
5. Masking
What you should learn today
1. Programming of stimuli in MATLAB
2. Data analysis
3. Details about the experiments
Programming the Experiments
Playsound
“High-level” function that plays a sinusoidal sound :
Playsound(f, A, t) plays sinusoidal tone with
frequency with frequency f and amplitude A for t seconds
Playsound(f, A, t, An, fn, Bn) plays sinusoidal tone with band pass background noise with mid frequency fn and band width +/-Bn
Randomization
Example: Randomize conditions for 3 different frequencies (f1, f2, f3) and 2 different amplitudes Aij per frequency
Systematic proceeding:
1. Design matrix: 2 x 3
f1 f2 f3
A11
A12
A21
A22
A31
A32
Randomization
2. Build equally shaped matrices for A and f
f1 f2 f3
Mf = f1 f2 f3
MA = A31
A32
A21
A22
A12
A12
Randomization
3. Cast matrices into vectors:
Mf = Mf(:); MA = MA(:);
4. Build a random integer vector with # of conditions:
cond_index = randperm(length(Mf));
Randomization
5. Address MA and Mf through this index: MA(cond_index(n)) (Amplitude of trial n)
Mf(cond_index(n)) (Frequency of trial n)
6. Loop over all trials:
for n=1:length(cond_index), ….. some function dependent on MA(cond_index(n)) and Mf(cond_index(n)) …..end;
Reading In Key Presses
Example:
Check whether the key “a” or “l” has been pressed. If yes, print the letter, otherwise
ignore the key press.
Reading In Key Presses
function key_demo(); % initializationret_strg = ‘‘;
% wait for a valid key presswhile strcmp(ret_strg, {'a', 'l'}) == 0, disp('Enter String.‘); ret_strg = getchar;end; % actions for admissible letters a and l if strcmp(ret_strg, 'a') == 1, disp('A');elseif strcmp(ret_strg, 'l') == 1, disp('L');end;
Simple example function
Data Analysis
Data Analysis
• Thresholds from probability data: – 50% threshold – Cool (optional): fit logistic threshold function
• Thresholds directly from adjustment methods / stair case
• Statistics for comparing thresholds: – t-test (pairwise comparisons) if enough items;
watch for (de)pendent measures !– non-parametric test for few items– ANOVA (next lecture)
• Extremely cool (idea for final project):run 2AFC experiment and estimate d’
Data Analysis
Correction of the level
• Problem: test difference between 2 AFs • Given: N threshold values for K values
of the frequency {Akn} and {Akn}• Possibilities:
– t-test (pairwise comparisons) K independent tests
– Better: ANOVA (next lecture !)
How can we combine the results from K independent tests?
Data Analysis
P(single test significant even though H0 true) <
P(single test non-significant if H0 true) >= 1-
Tests independent
P(all K tests non-significant if H0 true) >= (1- K
P(at least one out of the K tests significant if H0 true)
< 1 - (1- K = eq
Data Analysis
Equivalent significance level for K independent tests:
eq = 1 - (1- K
= 1 - (1- eq1/K
For large K:
eqK (“Bonferoni correction”)
Example:
K = 4eq = 5 % = 1.27 %
Experiments
Method of Constant Stimuli
• Frequencies: 30, 500, 2k, 10k, 18k Hz
• Pilot: for each frequency regime find out approximately the threshold and set up 5 amplitudes around this value
• 20 repetitions
Method of Limits
• Frequencies: 30, 500, 2k, 10k, 18k Hz
• Pilot: for each frequency regime find out approximately the threshold
• Ascending block: Start always with a stimulus that Ss don’t hear; increase by factor 1.2 until they hear; store result and start next trialDescending block: start with stimulus that Ss hear a decrease by factor 1.2 until they don’t hear stimulus any more
• 10 repetitions
Staircase Method
• Frequencies: 30, 100, 200, 500, 1k, 2k, 5k, 10k, 15k, 18k Hz
• Pilot: for each frequency regime find out approximately the threshold
• Steps; multiply / divide by 1.2
• Cross threshold 8 times before next trial starts
• 5 repetitions
Equal Loudness Contours
• Frequency of reference stimuli: 1000 Hz
• Test frequencies: 50, 100, 200, 500, 1k, 3k, 5k, 10k Hz
• 3 different amplitudes of the reference: low / medium / high
• Adjust amplitude of the test stimulus as to match loudness of reference
• 5 repetitions
Difference Thresholds
• Frequency of reference stimulus: 200 Hz
• Test 5 different amplitudes of the reference in the regime between very low and (conveniently) high amplitudes
• Measure for each amplitude difference thresholds using a method of constant stimuli
• 15 repetitions for the method of constant stimuli
Masking I
• Mask: narrowband noise with frequency 400 +/- 45 Hz
• Test frequencies: 100, 250, 400, 1k, 2k Hz
• Method of constant stimuli
• Trials with and without mask
• No time delay !
• 15 repetitions per condition
Masking II
• Mid frequency of mask and test tone 400 Hz; bandwidth +/- 45 Hz
• 5 different time delays: 0, 50, 100, 200 ad 500 ms
• Method of constant stimuli
• Trials with and without mask
• 15 repetitions per trial