{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# HIDDEN\n", "from datascience import *\n", "from datascience.predicates import are\n", "import numpy as np\n", "import matplotlib\n", "matplotlib.use('Agg', warn=False)\n", "%matplotlib inline\n", "import matplotlib.pyplot as plots\n", "plots.style.use('fivethirtyeight')\n", "import warnings\n", "warnings.simplefilter(action=\"ignore\", category=FutureWarning)" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "Causality and Experiments\n", "=========================\n", "\n", "*\"These problems are, and will probably ever remain, among the inscrutable\n", "secrets of nature. They belong to a class of questions radically inaccessible to\n", "the human intelligence.\"* \n", "—The Times of London, September 1849, on how cholera\n", "is contracted and spread\n", "\n", "Does the death penalty have a deterrent effect? Is chocolate good for you? What\n", "causes breast cancer?\n", "\n", "All of these questions attempt to assign a cause to an effect. A careful\n", "examination of data can help shed light on questions like these. In this section\n", "you will learn some of the fundamental concepts involved in establishing\n", "causality.\n", "\n", "Observation is a key to good science. An *observational study* is one in which\n", "scientists make conclusions based on data that they have observed but had no\n", "hand in generating. In data science, many such studies involve observations on a\n", "group of individuals, a factor of interest called a *treatment*, and an\n", "*outcome* measured on each individual.\n", "\n", "It is easiest to think of the individuals as people. In a study of whether\n", "chocolate is good for the health, the individuals would indeed be people, the\n", "treatment would be eating chocolate, and the outcome might be a measure of blood\n", "pressure. But individuals in observational studies need not be people. In a\n", "study of whether the death penalty has a deterrent effect, the individuals could\n", "be the 50 states of the union. A state law allowing the death penalty would be\n", "the treatment, and an outcome could be the state’s murder rate.\n", "\n", "The fundamental question is whether the treatment has an effect on the outcome.\n", "Any relation between the treatment and the outcome is called an *association*.\n", "If the treatment causes the outcome to occur, then the association is *causal*.\n", "*Causality* is at the heart of all three questions posed at the start of this\n", "section. For example, one of the questions was whether chocolate directly causes\n", "improvements in health, not just whether there there is a relation between\n", "chocolate and health.\n", "\n", "The establishment of causality often takes place in two stages. First, an\n", "association is observed. Next, a more careful analysis leads to a decision about\n", "causality.\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.4.4" } }, "nbformat": 4, "nbformat_minor": 0 }