Testing

Lecture 22

Dr. Elijah Meyer + Konnie Huang

Duke University
STA 199 - Fall 2022

November 14th, 2022

Checklist

– Clone ae-21

Announcements

– Lab 7 Due Tonight (Monday)

– Exam Week! Please vote on review survey

Project

– Communicate

  • Good Practice

  • Grade

Goals

– Compare two proportions, and do a hypothesis test

– Compare two means, and do a bootstrap interval

– Prediction and bootstrap interval for the slope

Can we always make inference?

– Short answer no

– An assumption that we need to make is called independence in order to trust our simulation results.

Warm up: 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