https://infer.netlify.app/articles/observed_stat_examples.html
Clone the appex-12 repo on GitHub and start a new project in RStudio.
We will live-code together, and then you must complete the remainder of this Application Exercise on your own!
We will continue working with the Asheville Airbnb data.
library(tidyverse)
library(infer)
asheville <- read_csv("data/asheville.csv")
Suppose you are interested in whether at least half of the Airbnb listings in Asheville are more than $50 per guest per night. What would be your null and alternative hypotheses? There are two options!
Simulate the null distribution to test your hypotheses. You can use 1000 reps for the in-class exercise.
# don't forget to set a seed!
#create variable to track price
# don't forget to set a seed!
What was your p-value? What decision do you make with respect to your hypotheses, and what conclusion do you make in the context of the research problem?
#calculate observed statistic
# obtain p-value
#calculate observed statistic
# obtain p-value
Suppose you are interested in whether at least half of listings have a price per guest per night less than $50. How would your null and alternative hypotheses change in this case? Carry out the appropriate hypothesis test (Option 1 and/or Option 2 above), and report your p-value, decision, and conclusion in context of the research problem. Use a seed of 1234 to conduct this hypothesis test.
\(H_0\):
\(H_a\):
# your code here!