<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FAQ/wavelength_eg</title><revhistory><revision><revnumber>11</revnumber><date>2014-03-31 11:50:25</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>10</revnumber><date>2013-03-08 10:17:09</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>9</revnumber><date>2011-06-09 09:38:49</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>8</revnumber><date>2011-06-09 09:29:25</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>7</revnumber><date>2008-11-24 17:05:50</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>6</revnumber><date>2008-11-24 15:47:54</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>5</revnumber><date>2008-11-24 15:44:38</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>4</revnumber><date>2008-11-24 15:37:15</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>3</revnumber><date>2008-11-24 15:34:46</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>2</revnumber><date>2008-11-24 15:33:54</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>1</revnumber><date>2008-11-24 15:09:40</date><authorinitials>PeterWatson</authorinitials></revision></revhistory></articleinfo><section><title>Working out 2 group signal detection diagnostics</title><para>The area under Receiver Operating Characteristic (ROC) curves is a way of describing the magnitude of how well separated two groups are with respect to some diagnostic.  </para><para>For two groups where the mean of A &gt; mean of B it is a plot of sensitivity at each of T thresholds (Probability of being in group A given you have a value less than or equal to t) against 1 - specificity (probability of being in group B given you have a value less than or equal to t) as seen <ulink url="https://lsr-wiki-01.mrc-cbu.cam.ac.uk/statswiki/FAQ/wavelength_eg/statswiki/FAQ/wavelength_eg?action=AttachFile&amp;do=get&amp;target=rocplot.jpg">here</ulink>. </para><para>The sensitivity is the blue horizontal area and 1-specificity is the diagonal orange area evaluated at a score of 1. These can also be evaulated using frequencies. You can see that as sensitivity increases so does 1-specificity (with the threshold increasing ie line moving to the right). When the line is at the far left both sensitivity and 1-specificity are zero and when the line is on the far right they are both equal to unity. </para><informaltable><tgroup cols="7"><colspec colname="col_0" colwidth="25*"/><colspec colname="col_1"/><colspec colname="col_2"/><colspec colname="col_3"/><colspec colname="col_4"/><colspec colname="col_5"/><colspec colname="col_6"/><tbody><row rowsep="1"><entry colsep="1" nameend="col_3" namest="col_0" rowsep="1"/><entry colsep="1" rowsep="1"/><entry colsep="1" nameend="col_6" namest="col_5" rowsep="1"><para>True </para></entry></row><row rowsep="1"><entry colsep="1" nameend="col_3" namest="col_0" rowsep="1"/><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1"><para>  A </para></entry><entry colsep="1" rowsep="1"><para> B </para></entry></row><row rowsep="1"><entry colsep="1" nameend="col_3" namest="col_0" rowsep="1"><para> Score  </para></entry><entry colsep="1" rowsep="1"><para> &lt;= t </para></entry><entry colsep="1" rowsep="1"><para>  a </para></entry><entry colsep="1" rowsep="1"><para> b </para></entry></row><row rowsep="1"><entry colsep="1" nameend="col_3" namest="col_0" rowsep="1"/><entry colsep="1" rowsep="1"><para> &gt; t </para></entry><entry colsep="1" rowsep="1"><para>  c </para></entry><entry colsep="1" rowsep="1"><para> d </para></entry></row></tbody></tgroup></informaltable><para>In the above table the sensitivity is the proportion of observations in group A which have values less than or equal to t and 1-specificity is the proportion of observations in group B which have a value less than or equal to a particular score t. </para><para>These probabilities are evaluated at each observed score, t and plotted with sensitivity on the y-axis and 1-specificity on the x-axis. The points may be joined together to form a curve and the area under the curve evaluated using, for example, the trapezium rule. The area under the ROC curve may be computed on the raw data <ulink url="https://lsr-wiki-01.mrc-cbu.cam.ac.uk/statswiki/FAQ/wavelength_eg/statswiki/FAQ/roc#">using the LOGISTIC REGRESSION procedure in SPSS</ulink> or a <ulink url="https://lsr-wiki-01.mrc-cbu.cam.ac.uk/statswiki/FAQ/wavelength_eg/statswiki/FAQ/rocplot#">SPSS macro.</ulink>  </para></section></article>