Lecture 21
Duke University
STA 199 - Spring 2024
2024-04-04
ae
.ae-15-duke-forest-bootstrap.qmd
.What is this visualization about?
ae-15-duke-forest-bootstrap
Review last part of ae-15-duke-forest-bootstrap.qmd
.
To estimate plausible values of a parameter of interest, e.g., a slope (\(\beta_1\)), a mean (\(\mu\)), a proportion (\(p\)).
Bootstrapping is a statistical procedure that resamples(with replacement) a single data set to create many simulated samples.
We then use these simulated samples to quantify the uncertainty around the sample statistic we’re interested in, e.g., a slope (\(b_1\)), a mean (\(\bar{x}\)), a proportion (\(\hat{p}\)).
Note: The plot is of a bootstrap distribution of a sample mean.
specify(response = x, success = "success level")
calculate(stat = "prop")
stat
scalculate()
documentation: infer.tidymodels.org/reference/calculate.html
infer pipelines: infer.tidymodels.org/articles/observed_stat_examples.html
A hypothesis test is a statistical technique used to evaluate competing claims using data
Null hypothesism \(H_0\): An assumption about the population. “There is nothing going on.”
Alternative hypothesis, \(H_A\): A research question about the population. “There is something going on”.
Note: Hypotheses are always at the population level!
As a researcher, you are interested in the average number of cups of coffee Duke students drink in a day. An article on The Chronicle suggests that the Duke students drink, on average, 1.2 cups of coffee. You are interested in evaluating if The Chronicle’s claim is too high. What are your hypotheses?
As a researcher, you are interested in the average number of cups of coffee Duke students drink in a day.
An article on The Chronicle suggests that the Duke students drink, on average, 1.2 cups of coffee. \(\rightarrow H_0: \mu = 1.2\)
You are interested in evaluating if The Chronicle’s too high. \(\rightarrow H_A: \mu < 1.2\)
Let’s suppose you manage to take a random sample of 100 Duke students and ask them how many cups of coffee they drink and calculate the sample average to be \(\bar{x} = 1\).
Assume yoi live in a world where null hypothesis is true: \(\mu = 1.2\).
Ask yourself how likely you are to observe the sample statistic, or something even more extreme, in this world: \(P(\bar{x} < 1 | \mu = 1.2)\) = ?
ae-16-equality-randomization
ae
.ae-16-equality-randomization.qmd
.