Computing discriminability and bias with the R software

Similar documents
Categorical Perception

Research methods in sensation and perception. (and the princess and the pea)

Perception Lecture 1

1 Diagnostic Test Evaluation

CHAPTER ONE CORRELATION

Psychology Research Process

Three methods for measuring perception. Magnitude estimation. Steven s power law. P = k S n

Spreadsheet signal detection

Name Psychophysical Methods Laboratory

MEASUREMENT OF SKILLED PERFORMANCE

The t-test: Answers the question: is the difference between the two conditions in my experiment "real" or due to chance?

Georgina Salas. Topics EDCI Intro to Research Dr. A.J. Herrera

A Signal Improvement to Signal Detection Analysis: Fuzzy SDT on the ROCs

1 Introduction. 1 Early Philosophy of Perception. 1 Early Philosophy of Perception (cont d)

Applications. DSC 410/510 Multivariate Statistical Methods. Discriminating Two Groups. What is Discriminant Analysis

Sensory Thresholds and Signal Detection. Lecture 13

A Positive Generation Effect on Memory for Auditory Context

CHAPTER 3 DATA ANALYSIS: DESCRIBING DATA

APPENDIX N. Summary Statistics: The "Big 5" Statistical Tools for School Counselors

Psychology Research Process

APPENDIX D STRUCTURE OF RAW DATA FILES

Research Methods 1 Handouts, Graham Hole,COGS - version 1.0, September 2000: Page 1:

Testing Means. Related-Samples t Test With Confidence Intervals. 6. Compute a related-samples t test and interpret the results.

STATISTICAL METHODS FOR DIAGNOSTIC TESTING: AN ILLUSTRATION USING A NEW METHOD FOR CANCER DETECTION XIN SUN. PhD, Kansas State University, 2012

Chapter 3: Examining Relationships

To open a CMA file > Download and Save file Start CMA Open file from within CMA

Intro to SPSS. Using SPSS through WebFAS

3 CONCEPTUAL FOUNDATIONS OF STATISTICS

Small Group Presentations

Assessing recognition memory using confidence ratings and response times

Two-Way Independent ANOVA

Business Statistics Probability

CHAPTER - 6 STATISTICAL ANALYSIS. This chapter discusses inferential statistics, which use sample data to

Scale Invariance and Primacy and Recency Effects in an Absolute Identification Task

Comparing multiple proportions

Appendix: Instructions for Treatment Index B (Human Opponents, With Recommendations)

One-Way Independent ANOVA

Overview. Survey Methods & Design in Psychology. Readings. Significance Testing. Significance Testing. The Logic of Significance Testing

To open a CMA file > Download and Save file Start CMA Open file from within CMA

Creative Commons Attribution-NonCommercial-Share Alike License

Biology 345: Biometry Fall 2005 SONOMA STATE UNIVERSITY Lab Exercise 8 One Way ANOVA and comparisons among means Introduction

Describe what is meant by a placebo Contrast the double-blind procedure with the single-blind procedure Review the structure for organizing a memo

PSYCH-GA.2211/NEURL-GA.2201 Fall 2016 Mathematical Tools for Cognitive and Neural Science. Homework 5

Psy201 Module 3 Study and Assignment Guide. Using Excel to Calculate Descriptive and Inferential Statistics

Identifying or Verifying the Number of Factors to Extract using Very Simple Structure.

On the Measurement of Criterion Noise in Signal Detection Theory: The Case of Recognition Memory

An Introduction to Research Statistics

Propensity Score Analysis: Its rationale & potential for applied social/behavioral research. Bob Pruzek University at Albany

Binary Diagnostic Tests Two Independent Samples

Chapter 5: Field experimental designs in agriculture

Supplementary Materials

Detection Theory: Sensory and Decision Processes

d). Draw the following neural circuits (using the notation taught in class) and then say what would happen if they were stimulated as specified.

Designing Experiments... Or how many times and ways can I screw that up?!?

Describe what is meant by a placebo Contrast the double-blind procedure with the single-blind procedure Review the structure for organizing a memo

Kepler tried to record the paths of planets in the sky, Harvey to measure the flow of blood in the circulatory system, and chemists tried to produce

Clinical Decision Analysis

Still important ideas

SUPPLEMENTAL MATERIAL

Imperfect, Unlimited-Capacity, Parallel Search Yields Large Set-Size Effects. John Palmer and Jennifer McLean. University of Washington.

The Face Recognition Problem. Is a single image database sufficient for face recognition? A Psychological Experiment

Laboratory exercise: Adaptive tracks and psychometric functions

Group Decision-Making on an Optimal Stopping Problem

Analysis of Variance: repeated measures

The role of sampling assumptions in generalization with multiple categories

4 Diagnostic Tests and Measures of Agreement

Detection Theory: Sensitivity and Response Bias

1 The conceptual underpinnings of statistical power

PSYCHOLOGY 300B (A01) One-sample t test. n = d = ρ 1 ρ 0 δ = d (n 1) d

List of Figures. List of Tables. Preface to the Second Edition. Preface to the First Edition

Lecture 15 Chapters 12&13 Relationships between Two Categorical Variables

CRITERIA FOR USE. A GRAPHICAL EXPLANATION OF BI-VARIATE (2 VARIABLE) REGRESSION ANALYSISSys

Sawtooth Software. MaxDiff Analysis: Simple Counting, Individual-Level Logit, and HB RESEARCH PAPER SERIES. Bryan Orme, Sawtooth Software, Inc.

Resonating memory traces account for the perceptual magnet effect

Things you need to know about the Normal Distribution. How to use your statistical calculator to calculate The mean The SD of a set of data points.

Goodness of Pattern and Pattern Uncertainty 1

2.75: 84% 2.5: 80% 2.25: 78% 2: 74% 1.75: 70% 1.5: 66% 1.25: 64% 1.0: 60% 0.5: 50% 0.25: 25% 0: 0%

Example of Interpreting and Applying a Multiple Regression Model

Still important ideas

Supplementary Materials

Lecturer: Rob van der Willigen 11/9/08

Analysis of Variance (ANOVA) Program Transcript

9/29/14. Amanda M. Lauer, Dept. of Otolaryngology- HNS. From Signal Detection Theory and Psychophysics, Green & Swets (1966)

1 Version SP.A Investigate patterns of association in bivariate data

Lecturer: Rob van der Willigen 11/9/08

Technical Specifications

Statistics is the science of collecting, organizing, presenting, analyzing, and interpreting data to assist in making effective decisions

BMI 541/699 Lecture 16

PSY 216: Elementary Statistics Exam 4

FACTORIAL DESIGN. 2.5 Types of Factorial Design

Readings: Textbook readings: OpenStax - Chapters 1 11 Online readings: Appendix D, E & F Plous Chapters 10, 11, 12 and 14

Sheila Barron Statistics Outreach Center 2/8/2011

9. Interpret a Confidence level: "To say that we are 95% confident is shorthand for..

Introduction. We can make a prediction about Y i based on X i by setting a threshold value T, and predicting Y i = 1 when X i > T.

Inferential Statistics

Highlighting Effect: The Function of Rebuttals in Written Argument

1 Introduction. st0020. The Stata Journal (2002) 2, Number 3, pp

2012 Course: The Statistician Brain: the Bayesian Revolution in Cognitive Sciences

Source memory for unrecognized items: Predictions from multivariate signal detection theory

About Reading Scientific Studies

Transcription:

Computing discriminability and bias with the R software Christophe Pallier June 26, 2002 Abstract Psychologists often model detection or discrimination decisions as being influenced by two components: perceptual discriminability and response bias. In the signal detection framework, these are estimated by d and β. Other, non-parametric parameters, A and B D, have also been proposed. This note provides the code to compute those parameters with the statistical software R (http://www.r-project.org). Introduction Consider the following three situations : In a signal detection test, the subject is presented with a series of trials in which he must decide if a target signal (e.g. a faint tone in a noisy background) is present or absent. In a memory recognition test, the subject is first trained to memorize some stimuli. Then, in a subsequent test phase, he is presented with a series of stimuli and asked to decide if they are old or new items. In a discrimination task, the subject is presented with pairs of stimuli, and for each pair, asked to tell whether the stimuli are the same of different. In all three cases, the trials belong to two categories (Y=target present; N=target absent). So do the responses of the subjects (Y=yes; N=no). Therefore, they are four possible combinations of trial type and response (see Table 1): A Hit occurs when the subject correctly detects a signal (or www.pallier.org correctly recognize an old item, or correctly discriminate different stimuli...). A Miss occurs when the subject fails to detect the presence of the target signal. A False alarm (abbreviated as FA ) occurs when the subject reports the target while it is not present. Finally, a Correct rejection ( CR ) occurs when the subject correctly reports no target. Response Trial Y N Y Hits Misses N FA CR Table 1: Table of scores The data of a single participant can can be summarized in a table such as Table 1, which reports the counts of the different types of trial-response combinations. The four figures in the summary table are not independent: { Hits + Misses = total number of Y trials FA + CR = total number of N trials Therefore, the data are often summarized by the two independent numbers: { Hit rate = Hits/(Hits+Misses) FA rate = FA/(FA+CR) The percentage of correct responses is: %correct = (Hits + CR)/(Hits+Misses+FA+CR) If there are as many trials of types Y and N, the percentage of correct responses is simply the mean of the Hit and FA rates. The percentage of correct responses is a fonction of discriminability and bias. To introduce these notions, it is useful to plot the subject s performance on a graphics with 1

HITS (%) a c b FA (%) Figure 1: The (fa,hit) unit square (left) and the percentage correct responses as a function of (fa,hit) (right) FA and Hit rates as coordinates, as shown on Figure 1. Psychologists model binary answers of human participants as being influenced by two distinct factors: (a) a perceptual discrimination component and (b) a response bias. For example, two subjects with similar perceptual discrimination capabilities can have different propensions to answer yes or no. Or, in one individual, the response bias can be manipulated by varying the costs/benefits associated to the responses. Consider the following three examples of extreme behaviors: 1. A subject (a) has Hit and FA rates at 100% and 0% respectively; he is considered to discriminate perfectly and have no response bias. 2. A subject (b) systematically answer Yes : his Hit and Fa rates are both at 100%. One would say that he has a strong response bias, and no evident discrimination capacity. 3. A subject (c) has Hit and FA rates both at %; he will be considered to have no response bias, and no discriminability either (his score falls on the chance diagonal ). To disentangle the two components (bias and discriminability) in a given subject, several measures have been proposed, that improve on the simple percentage of correct responses. The most used are d and β and the non-parametric A and B D [1]. d and β originate from the signal detection theory framework. d reflects the distance between the two distributions: signal, and signal+noise and corresponds to the Z value of the hit-rate minus that of the false-alarm-rate. Though Z values can have any real value, normally distributed ones are between -2 and 2 about 95% of the time, so differences of twice that would be rare. The value for β is the ratio of the normal density functions at the criterion of the Z values used in the computation of d. This reflects an observer s bias to say yes or no with the unbiased observer having a value around 1.0. As the bias to say yes increases, resulting in a higher hitrate and false-alarm-rate, beta approaches 0.0. As the bias to say no increases, resulting in a lower hit-rate and false-alarm-rate, beta increases over 1.0 on an open-ended scale [2]. A and B D are non-parametric estimates of discriminability and bias. Given a point in the (fa,hit) unit square, A is defined as the sum of the area of B and half the areas of A1 and A2 (cf. Fig. 4). The formula for computing A and B D are: If hit>fa, A = 1/2 + If fa>hit, and, A = 1/2 B D (hit fa) (1 + hit fa) 4 hit (1 fa) (fa hit) (1 + fa hit) 4 fa (1 hit) = (1 hit) (1 fa) hit fa) (1 hit) (1 fa) + hit fa We will not detail the rationale behind the construction of these parameter (see [1]). Suffice to say 2

HITS (%) A2 a[fa==hit]<-.5 a A1 B bppd <-function(hit,fa) { ((1-hit)*(1-fa)-hit*fa) / ((1-hit)*(1-fa)+hit*fa) FA (%) Figure 4: Areas involved in the computation of A that an A near 1.0 indicates good discriminability, while a value near 0.5 means chance performance. A B D equal to 0.0 indicates no bias, positive numbers represent conservative bias (i.e. a tendency to answer no ), negative numbers represent liberal bias (i.e. a tendency to answer yes ). The maximum absolute value is 1.0. The isolevel curves for the parameters that estimate discriminability are shown on figure 2. They can be compared with the rigth panel of Figure 1. The isolevel curves for the bias estimates d and B D are shown on figure 3. R functions Here is the R code for four functions dprime, beta, aprime and bppd that compute the parameters as a function of Hit and FA rates: dprime <- function(hit,fa) { qnorm(hit) - qnorm(fa) beta <- function(hit,fa) { zhr <- qnorm(hit) zfar <- qnorm(fa) exp(-zhr*zhr/2+zfar*zfar/2) aprime <-function(hit,fa) { a<-1/2+((hit-fa)*(1+hit-fa) / (4*hit*(1-fa))) b<-1/2-((fa-hit)*(1+fa-hit) / (4*fa*(1-hit))) a[fa>hit]<-b[fa>hit] Hit and FA rates can be passed as single numbers or as vectors. In the latter case, the function will return a vector of the same length. This is useful to get the parameters for a set of subjects. Note the trick in aprime to handle the two cases fa>hit, hit>fa without resorting to a loop on the vectors elements. Practical usage We suppose that the code given above for the four functions is saved in a text file named, say, discri.r. To be able to access these functions, the first command to run is: source( discri.r ) If you have already computed Hit and FA rates for each subject, you can enter them into two R vectors hit and fa, using the c operator: hit <- c(.7,.8,.6) fa <- c(.2,.1,.3) Then plot the performances and compute the parameters: plot(fa,hit,xlim=c(0,1),ylim=c(0,1)) aprime(hit,fa) bppd(hit,fa) dprime(hit,fa) beta(hit,fa) If, rather, the rates are saved in a text file data.txt in a tabular format such as: s1 0.7 0.2 s2 0.8 0.1 s3 0.6 0.3 You would then rather use: 3

A d Figure 2: Isolevel plots for the discriminability parameters B D β Figure 3: Isolevel plots for the bias parameters 4

a<-read.table( data.txt ) hits <- a$v2; fa <- a$v3; Finally, only raw data may be available, for example, as a table with one row per trial, with the three space-separated columns corresponding respectively to the subject code, the trial type, and the response of the subject: s1 S Y s1 S N s1 N Y s1 N N s1 N Y... s2 S Y s2 S Y s2 N Y s2 S N... hit<-0:20/20 fa<-rep(.05,21) pairs(cbind(hit, correct=correct(hit,fa), aprime=aprime(hit,fa), dprime=dprime(hit,fa))) References [1] Wayne Donaldson (1992) Measuring Recognition Memory. J. Exp. Psychol.: General, 121, 3, 275 277 [2] Gary Perlman. STAT 5.4: data manipulation & analysis programs for unix and msdos (software package available on the web) In this case, to compute subjects hit and fa rates: a<-read.table( samp.dat, col.names=c( suj, target, resp )) attach(a) b<-table(target,resp,suj) suj <- names(b[1,1,]) hit <- b[ S, Y,]/(b[ S, Y,]+b[ S, N,]) fa <- b[ N, Y,]/(b[ N, Y,]+b[ N, N,]) You can explore b and check that b[ S, Y,] = Hits, b[ S, N,] = Misses, b[ N, Y,] = False alarms, and b[ N, N,] = Correct rejections. Whence, the formula for hit and fa. Explorations The isodiscriminability curves were obtained using the contour function: a<-0:10/10 contour(z=outer(a,a,"aprime")) contour(z=outer(a,a,"dprime")) In figure 5, we looked at the behavior of percent correct, A and d when the fa rate was set to a fixed value of 5%, and the hit rate varied from 0% to 100%. The code was the following: 5

1.0 1.2 1.4 1.6 1.8 0.0 1.0 2.0 3.0 hit 1.0 1.2 1.4 1.6 1.8 correct aprime 0.4 0.6 0.8 1.0 0.0 1.0 2.0 3.0 dprime 0.4 0.6 0.8 1.0 Figure 5: Relationship between percent correct, A and d for a constant FA rate=0.05 6