Testing

Lecture 21

Dr. Elijah Meyer + Konnie Huang

Duke University
STA 199 - Fall 2022

November 9th, 2022

Checklist

– Clone ae-20

Announcements

– HW 5 (Due Thursday)

– Small typo on HW 5 (see Slack)

– You may see some hints posted as well….

– Drop 1 Peer Feedback

Goals

– Compare two proportions, and do a hypothesis test

– Compare two means, and do a bootstrap interval

– Prediction and bootstrap interval for the slope

Warm Up: Can we always make inference?

– What assumption do we need to make about our data in order to trust results from our bootstrap methods?

Assumption - Independence

– What is independence?

  • One observation does not effect or influence another

Independence Example

– 50 Airbnb listings in 2020 for Asheville, NC.

How do we ensure Independnece

– Random Sample - Every observation has an equal probability of being selected

– A random sample ensures that our sample is representative of the entire population

If we don’t have a random sample …

– Our results are hard to trust

Good models and procedures can not fix bad data

For your project

– Today, we go through how to bootstrap for a slope coefficient

– Can use other bootstrap methods for other questions you may be interested in

– Do not use if data are not representitative

ae-21

In Summary