---
jupyter:
  jupytext:
    text_representation:
      extension: .Rmd
      format_name: rmarkdown
      format_version: '1.0'
      jupytext_version: 0.8.1
  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.6.5
---

# Inference

With thanks to [Allen Downey](http://www.allendowney.com/wp) for his suggestions in [inference in three hours](https://tinyurl.com/inference3).


In our [answer for the Supreme Court](reply_supreme), we discovered the process
of *statistical inference*.


Statistical inference proceeds in these steps.

* Find the **data**.  In our case, this was the race of the 12 people on Robert
  Swain's jury, and the proportion of eligible voters who were Black.
* Calculate some **measure of interest** from the data.  Call this the
  **observed statistic**. In our case, this was the number of Black jurors - 0.
* Make a simple model of the world to offer as an explanation of the data.
  This model is the null-world, also known as the null-hypothesis.  In our
  case, the null-world was the model where the jurors were randomly selected
  from the eligible population.
* **Simulate the data** many times using the simple (null-world) model.
* For each simulation **calculate the measure of interest**.  Call these the
  **simulated measures**.  Our simulated measures were the number of black
  jurors in each simulation.
* Use the **simulated measures** to build up the **sampling distribution**.
* Compare the **observed measure** to the **sampling distribution**, to see
  whether it represents a rare or common event, given the model.
