---
title: "Math 58 / 58B - Introduction to (Bio)Statistics"
author: "your name here"
date: "due Feb 20, 2020"
output: pdf_document
---
Homework 4
========================================================
```{r global_options, include=FALSE}
knitr::opts_chunk$set(message=FALSE, warning=FALSE, fig.height=2.5,
fig.width=5,
fig.align = "center", cache=TRUE)
library(tidyverse)
library(infer)
library(mosaic)
```
### Assignment Summary (Goals)
* sampling
* errors
* p-values
1. **Tattoos, Part I** (https://askgoodquestions.blog/).
Suppose that you want to test the null hypothesis that one-third of all adults in your county have a tattoo, against a two-sided alternative. For each of the following parts, create your own example of a sample of 100 people that satisfies the indicated property. Do this by providing the sample numbers with a tattoo and without a tattoo. Also report the test statistic and p-value from a one-proportion z-test.
(a) Use the normal distribution and the following information to calculate a p-value for the appropriate Z-score
p-value = probability a N(0,1) (standard normal) will be more extreme than the Z score you calculate below.
(i) Create your own example of a sample of 100 people such that: the two-sided p-value is less than 0.001.
(ii) Create your own example of a sample of 100 people such that: the two-sided p-value is greater than 0.20.
(b) For each of (i) and (ii) above, explain whether you may have committed a Type 1 or a Type 2 error. (Hint: you will not know whether or not you committed an error, but you **will** know the type of error you may have committed.)
2. **Tattoos, Part II** (https://askgoodquestions.blog/).
Suppose that you want to estimate the proportion of all adults in your county who have a tattoo. For each of the following parts, create your own example to satisfy the indicated property. Do this by specifying the sample size and the number of people in the sample with a tattoo. Also determine the confidence interval.
a) Create your own example such that the sample proportion with a tattoo is 0.30, and a 95% confidence interval for the population proportion includes the value 0.35.
b) Create your own example such that the sample proportion with a tattoo is 0.30, and a 99% confidence interval for the population proportion does not include the value 0.35.
3. **Gettysburg Address** (Inv 1.12, ISCAM)
Consider the activity done in class on the Gettysburg Address by Abraham Lincoln. (Click on "Gettysburg": http://www.rossmanchance.com/applets/OneSample.html?showBoth=1)
(a) For any of the samples taken in class, describe (in words) the:
- an observational unit
- a variable
- the statistic
- the parameter
(b) After you click on "show sampling options," the applet shows histograms at the bottom. For each of the three histograms (i.e., provide three answers), what is the thing that is varying?
(c) Suppose that you select a sample of Claremont students by standing in front of the library and approaching 50 students who pass by. Would this constitute a random sample of Claremont students? What if you stand in front of the gym and approach 50 students who pass by? Explain.
(d) Even though the convenience sampling (at the library) described above is not random, could it nevertheless result in a sample that is representative of the population of Claremont students? Identify a variable for which you would not be willing to consider such a convenience sample (as described above) to be representative of the population of Claremont students. Also identify a variable for which you would be willing to consider such a sample (as described above) to be representative of the population of Claremont students.