{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "hide_input" ] }, "outputs": [], "source": [ "from IPython.core.display import HTML, Markdown, display\n", "\n", "import numpy.random as npr\n", "import numpy as np\n", "import pandas as pd\n", "import seaborn as sns\n", "import matplotlib.pyplot as plt\n", "import scipy.stats as stats\n", "import statsmodels.formula.api as smf\n", "\n", "import ipywidgets as widgets\n", "\n", "import requests\n", "import zipfile\n", "import os\n", "import shutil\n", "import nibabel\n", "from scipy.stats import gamma\n", "\n", "# Enable plots inside the Jupyter Notebook\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Signal detection simulation -- Part 1" ] }, { "cell_type": "markdown", "metadata": { "tags": [ "popout" ] }, "source": [ "Authored by *Liang Zhli*, *Clay Curtis*, *Brenden Lake* and *Todd Gureckis*.\n", "Justin Gardner's [Signal Detection Tutorial](http://gru.stanford.edu/doku.php/tutorials/sdt) but translated from MATLAB to Python." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We're going to simulate a signal detection experiment and an “ideal observer” (an observer who behaves exactly according to signal detection theory). This is always a useful thing to do when trying to understand a decision model, experimental method or an analysis tool. You get to control and play around with the simulation to see what effect it has on the analysis that comes out.\n", "\n", "\n", "On each trial, our observer sees an element sampled from either the signal present gaussian distribution or the signal absent distribution, which is also gaussian with the same standard deviation. The observer chooses to say “signal present” when the signal they see on that trial is above criterion and “signal absent” otherwise. The picture you \n", "should have in your head is this:\n", "\n", "\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "