---
title: "HW 5 -- Math 58B"
author: "your name here"
date: "due Thursday, February 23, 2023"
output: pdf_document
---


```{r global_options, include=FALSE}
knitr::opts_chunk$set(message=FALSE, warning=FALSE, fig.height=3, fig.width=5, 
                      fig.align = "center", cache=TRUE)
library(tidyverse)
library(infer)
library(mosaic)
library(praise)
```


### Assignment Summary (Goals)
* working with Z scores (calculating and interpreting)
* calculating normal probabilities (with Z scores and with $\hat{p}$)
* calculating CIs using the Z* value from the normal curve

#### Q1. Learning Community Q
Describe one thing you learned from someone in your learning community this week (it could be: content, logistical help, background material, R information, etc.)  1-3 sentences.

#### Q2.  Distribution of $\hat{p}$ 

Suppose the true population proportion were p = 0.1. The figure below (see the pdf version of the assignment with the image) shows what the distribution of a sample proportion looks like when the sample size is $n = 20$, $n = 100$, and $n = 500$. 

(a) What does each point (observation) in each of the samples represent?
(b) Describe how the distribution of the sample proportion, $\hat{p}$, changes as n becomes larger.


#### Q3.  Area under the curve

What percent of a standard normal distribution [the one with:  N( $\mu = 0; \sigma = 1$)]
is found in each region? Be sure to draw a graph [or use a function in R (`xpnorm()` in the mosaic package) that provides a graph].

(a) Z < -1.35 
(b) Z > 1.48 
(c) -0.4 < Z < 1.5 
(d) |Z| > 2


#### Q4.  Scores on the GRE

A college senior who took the Graduate Record Examination exam scored 620 on the Verbal Reasoning section and 670 on the Quantitative Reasoning section. The mean score for Verbal Reasoning section was 462 with a standard deviation of 119, and the mean score for the Quantitative Reasoning was 584 with a standard deviation of 151. Suppose that both distributions are nearly normal.


(a) Write down the short-hand for the two normal distributions.

(b) What is her Z score on the Verbal Reasoning section? On the Quantitative Reasoning section?
Draw a standard normal distribution curve and mark the two Z scores.

(c) What do the Z scores tell you?


(d) Relative to others, which section did she do better on?


(e) Find her percentile scores for the two exams.


(f) What percent of the test takers did better than her on the Verbal Reasoning section? On the Quantitative Reasoning section?


(g) Explain why simply comparing her raw scores from the two sections would lead to the incorrect conclusion that she did better on the Quantitative Reasoning section.


(h) If the distributions of the scores on the exams are not nearly normal, would your answers to parts (b) - (f) change? Explain your reasoning.



#### Q5. Chronic illness

In 2013, the Pew Research Foundation reported that "45% of U.S. adults report that they live with one or more chronic conditions". However, this value was based on a sample, so it may not be a perfect estimate for the population parameter of interest on its own. The study reported a standard error of about 1.2%, and a normal model may reasonably be used in this setting. 

(a) Using the normal distribution as a probability model, create a 95% confidence interval for the proportion of U.S. adults who live with one or more chronic conditions. Also interpret the confidence interval in the context of the study.

Identify each of the following statements as TRUE or FALSE.  You don't need to justify it here, but it's always a good idea (read: exam coming soon!) to practice putting into words why something is true or false.

(b) We can say with certainty that the confidence interval contains the true percentage of U.S. adults who suffer from a chronic illness.

(c) If we repeated this study 1,000 times and constructed a 95% confidence interval for each study, then approximately 950 of those confidence intervals would contain the true fraction of U.S. adults who suffer from chronic illnesses.

(d) The poll provides statistically significant evidence (at the $\alpha = 0.05$ level) that the percentage of U.S. adults who suffer from chronic illnesses is below 50%. [You don't need to do the entire hypothesis test here, you should be able to get the answer from the CI.  However, you should also know how to do the entire hypothesis test!]

(e) Since the standard error is 1.2%, only 1.2% of people in the study communicated uncertainty about their answer.




```{r}
praise()
```