Download - Lecture 10 Experiment 2

Transcript
Page 1: Lecture 10 Experiment 2

Lecture 10

Experiment 2

Martin Giese

Page 2: Lecture 10 Experiment 2

What you should remember

1. Function of the middle ear

2. Traveling wave theory

3. Audibility function

4. Loudness perception

5. Masking

Page 3: Lecture 10 Experiment 2

What you should learn today

1. Programming of stimuli in MATLAB

2. Data analysis

3. Details about the experiments

Page 4: Lecture 10 Experiment 2

Programming the Experiments

Page 5: Lecture 10 Experiment 2

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

Page 6: Lecture 10 Experiment 2

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

Page 7: Lecture 10 Experiment 2

Randomization

2. Build equally shaped matrices for A and f

f1 f2 f3

Mf = f1 f2 f3

MA = A31

A32

A21

A22

A12

A12

Page 8: Lecture 10 Experiment 2

Randomization

3. Cast matrices into vectors:

Mf = Mf(:); MA = MA(:);

4. Build a random integer vector with # of conditions:

cond_index = randperm(length(Mf));

Page 9: Lecture 10 Experiment 2

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;

Page 10: Lecture 10 Experiment 2

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.

Page 11: Lecture 10 Experiment 2

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

Page 12: Lecture 10 Experiment 2

Data Analysis

Page 13: Lecture 10 Experiment 2

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’

Page 14: Lecture 10 Experiment 2

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?

Page 15: Lecture 10 Experiment 2

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

Page 16: Lecture 10 Experiment 2

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 %

Page 17: Lecture 10 Experiment 2

Experiments

Page 18: Lecture 10 Experiment 2

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

Page 19: Lecture 10 Experiment 2

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

Page 20: Lecture 10 Experiment 2

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

Page 21: Lecture 10 Experiment 2

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

Page 22: Lecture 10 Experiment 2

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

Page 23: Lecture 10 Experiment 2

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

Page 24: Lecture 10 Experiment 2

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