Lab: A Matter of Taste, Part II
Question 1
List any changes that you made to your experimental protocol from when you formulated it on Tuesday/Wednesday and when you executed it on Thursday/Friday.
Question 2
part a
Create a data frame based off the data you collected, listed in the order in which it was collected, and print it. Consult the tutorials from the beginning of the semester for a refresher on how to make a data frame!
part b
Does the data frame differ at all from the one that you sketched into your experimental protocol? If so, how?
Question 3
part a
Create a visualization of the data you collected (not the null distribution) similar to the one you sketched in the worksheet.
part b
Does your visualization look clearly in support of your claim, contrary to your claim, or somewhere in between? Answer in at least one sentence.
Question 4
part a
Considering the order in which the data was collected i.e. 1 for the first observation, 2 for the second, etc.) as a numeric covariate, compute and report its standardized mean difference. You may do this using a Love plot.
part b
Conduct a hypothesis test using infer to determine whether run order differs significantly across your experimental groups. In doing so, obtain a p-value and interpret the results.
Question 5
You will now conduct a hypothesis test to determine whether your data is consistent with the null hypothesis.
part a
Write down the null and alternative hypotheses for the test in words and in mathematical form.
part b
Calculate the value of the observed test statistic using infer.
part c
Visualize a distribution of simulated test statistics under the null hypothesis. Include on this visualization a vertical line indicating where your observed test statistic is and shade in the p-value.
part d
Calculate a p-value for the test and, based on the \(\alpha\)-value you selected in Part I of the lab, make a conclusion regarding the null hypothesis and your original claim.
Question 6
A thought experiment: if you did not find a significant effect, speculate as to what you could change about your protocol to increase the chance that you find an effect. If you did find a significant effect, speculate as to what you would change about your protocol if you wanted to decrease the chance that you’d find an effect if you were to repeat the experiment.
WARNING: Does your rendered pdf have 30+ pages? (And do you want to get credit?)
If your final pdf is really long, you are probably printing an entire dataframe in one of your code cells. For example, a line that just says flights will print the entire flights dataframe (over 100,000 rows!). You don’t realize this, because RStudio is smart enough to hide most of the rows from your screen while you’re working. But when you render, it will obediently print every single row of the dataframe, giving you an unwieldy output.
To fix this, anytime you have a line that is just displaying a dataframe (e.g. just flights), change it to only show the first few rows by using either the head function, e.g. head(flights) or the tidyverse equivalent slice_head(flights, n = 10).
Last Question
Will you ensure that your submission to Gradescope…
- is a pdf generated from a qmd file
- your code is fully visible (not running off the page)
- follows formatting rules (here)
- and assigns each of the questions to all pages that show your work for that question?
(This one is easy! Just answer “yes” or “no”)