Someone Code for me plz

Job ID: 32321386

Budget: $30 – $250 USD

I want you to develop a program to implement an adaptive threshold
experiment. An adaptive threshold procedure is a procedure where the stimulus is varied
based on the subject’s response in order to efficiently estimate the threshold stimulus required
to obtain a level of accuracy.
You will implement an experiment to detect the frequency difference between two pure tones
(sinusoidal notes) that can be detected accurately around ⅔ of the time. I have provided a
function A_B_fixed.py that might be a useful starting point.
TWO UP - ONE DOWN PROCEDURE
The basic idea of this procedure is to adapt the stimulus by the accuracy of the subject’s
response. If the subject provides two consecutive correct responses, the task should be made
harder on the next trial. If the subject makes one incorrect response then the task should be
made easier. If implemented correctly the subject should settle at a level where they get the
task correct two out of three times (approximately).
To make this concrete,
In a frequency difference threshold experiment we would start with a very large frequency
difference - 128 Hz. That means if tone A is 440 Hz, tone B is 440+128 = 568 Hz.
The subject will perform a two interval forced choice task, where the two tones are presented in
random order and the subject has to detect the higher tone, and indicate 1 or 2.
You will adapt the stimulus by following this rule (logarithmic scaling):
(1) If the subject gets two consecutive trials correct, the frequency difference should be
divided by 2 for the next trial.
(2) If the subject gets a trial incorrect the frequency difference should be multiplied by 2 for
the next trial.
You need to save the following information on each trial
(1) the frequency difference
(2) Whether the subject got the trial correct or incorrect.
When you run the experiment, you should make sure that the number of trials is sufficient that
the subject (you) gets it wrong at least 5 times. I think ntrials = 30 should be enough trials, but
you might need a bit more if you have excellent frequency discrimination.
The level just above (in this experiment 2 x higher) where you get it consistently wrong is a good
estimate of the threshold.
The program should make a graph of the frequency difference for all trials that has the following
properties:
(1) X axis should be trial number
(2) Y axis should be frequency difference.
(3) Frequency difference should be plotted on a log scale.
(4) A different color symbol should be used for the frequency difference values on correct
and incorrect response trials. This should be indicated by a legend.
(5) Find the median value of frequency difference for the incorrect response trials. Draw a
horizontal line at 2 x that level of frequency difference.
Save the plot to a file with (easiest is a .png extension).
Result needed: (1) Your program(2) Your plot as an image
Related categories: Python Coding Visual Studio