Recap: Hypothesis Testing
Review all the hypothesis testing.
We'll cover the following
When inference isn’t needed
We’ve now walked through several different examples of how to use the infer
package to perform statistical inference by constructing confidence intervals and conducting hypothesis tests. For each of these examples, we made it a point to always perform an EDA first. Specifically, we looked at the raw data values, used data visualization with ggplot2
, and did data wrangling with dplyr
beforehand. We highly encourage learners to always do the same. As a beginner to statistics, EDA helps us develop intuition as to what statistical methods like confidence intervals and hypothesis tests can tell us. Even as a seasoned practitioner of statistics, EDA helps guide our statistical investigations. In particular, is statistical inference even needed?
Let’s consider an example. Say we’re interested in the following question: Of all flights leaving a New York City airport, are Hawaiian Airlines flights in the air for longer than Alaska Airlines flights? Furthermore, let’s assume that 2013 flights are a representative sample of all such flights. Then we can use the flights
data frame in the nycflights13
package we introduced earlier to answer our question. Let’s filter this data frame to only include Hawaiian and Alaska Airlines using their carrier
codes HA
and AS
:
Get hands-on with 1400+ tech skills courses.