---
title: "More on the Binomial Distribution"
author: "Evan L. Ray"
date: "October 25, 2017"
output: ioslides_presentation
---

<style>
  .col2 {
    columns: 2 200px;         /* number of columns and width in pixels*/
    -webkit-columns: 2 200px; /* chrome, safari */
    -moz-columns: 2 200px;    /* firefox */
  }
  .col3 {
    columns: 3 100px;
    -webkit-columns: 3 100px;
    -moz-columns: 3 100px;
  }
</style>

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
require(ggplot2)
require(dplyr)
require(tidyr)
require(readr)
```

## Home Ownership in the US

According to the 2000 Census, 66% of US households own the home they live in.  There are 125.82 million households in the US.  If I take a random sample of 3 households in the US, is it reasonable to model the number of households in my sample who own their home with a Binomial distribution?

## Home Ownership on my Street

Suppose that 66% of households on my street own the home they live in.  There are 9 households on my street.  If I take a random sample of 3 households on my street, is it reasonable to model the number of households in my sample who own their home with a Binomial distribution?

## Independence and Finite Populations

* The **10% Condition** says that if we take a random sample from a finite population, it's ok to treat the sampled items as independent as long as the sample size is smaller than 10% of the population size.

* Sample from US Households:
    * 3 is much less than 10% of 125.82 million, so we're ok

* Sample from my street:
    * 3 is more than 10% of 9, so we can't use a Binomial model

* **Note:** If we design our sampling procedure badly, a small sample size relative to the population can't save us!
    * If I sample 1000 households from the US, but I choose them all in the same town, the homeownership status for those households is not independent even though 1000 is less than 125.82 million!

## Summary of Conditions for Binomial

* A Binomial model can be used for $X$ if $X$ is the number of successes in $n$ Bernoulli trials:
    * Each trial results in one of two outcomes (success and failure)
    * The probability of success, $p$, is the same on all trials
    * The trials are **independent**: knowing the outcome of one trial does not give you any information about the outcome of another trial.
        * If the trials are the result of taking a sample from a finite population, check the **10% condition**: the sample size must be less than 10% of the population size.
