Stat 301 – HW 5
Due Friday, Feb. 17, midnight
These questions focus on Ch. 2. (Meaning: start now!) There are definitely some “stretch” questions so try your best. Please include your name(s) in the file and include all relevant output.
1) Researchers at Arizona State University (McNabb & Gray, 2016) explored the effects on driving with various types of cell phone use. In particular, they were interested in comparing the effects between text-based media and picture-based media. They had their subjects use a driving simulator and requested that they stay two seconds behind the car in front of them. The car in front travelled between 55 and 65 mph and was programmed to come to a complete stop 8 times during the simulation. One of the variables the researchers measured was the reaction time for the subjects to brake when the car in front of them stopped. Each subject was measured twice: once when instructed to scroll through Facebook messages that just consisted of text and once when instructed to scroll through Instagram pictures that did not contain any text. Datafile: BrakeReactionTime.txt
(a) The measurement units were not given, what do you think they were? How did you decide?
(b) In the study, the order of the two treatments was randomly determined for each subject. Why do you think that was?
(c) Calculate the difference in reaction time (Facebook – Instagram). Create a graph of the distribution of the differences. Write a sentence summarizing the behavior of these differences, including what preliminary evidence is provided for the research question.
(d) Let <![if !msEquation]><![if !vml]><![endif]><![endif]> represent the long-run mean difference in reaction times (Facebook – Instagram). Write appropriate null and alternative hypotheses for <![if !msEquation]><![if !vml]><![endif]><![endif]>.
(e) Are the one-sample t-procedures likely valid for these data? Explain your reasoning.
(f) Use R or JMP or Theory-Based Inference applet (p. 147) to carry out a one-sample t-test for the differences (regardless of your answer to (e)). Include your output and summarize your conclusion in context.
(g) Use R or JMP or Theory-Based Inference applet to determine a 95% t-confidence interval. Include your output and write a one-sentence interpretation of your interval.
(h) Determine and interpret a 95% prediction interval. Be sure to show details of how you determined the interval.
2) An alternative to a one-sample t-procedure is bootstrapping. Bootstrapping is most helpful when the t-procedures are not expected to be valid, especially when the choice of statistic is not the mean. In particular, bootstrapping can provide an estimate of the standard error of the statistic without using the theoretical formula or <![if !msEquation]><![if !vml]><![endif]><![endif]>. The principle behind bootstrapping is to estimate “sample to sample” variation in the statistic by taking repeated samples from the sample you have, but with replacement. (Note: It’s important to match the sample size of the study. Sampling with replacement is what allows the results to differ from sample to sample. See also Investigation 2.9. You can think of this as taking samples of 18 observations from a population that consists of infinitely copies of your original sample.) Below is a bootstrap distribution of the sample median for the reaction time data.
resamples = lapply(1:1000, function(i) sample(diffs$differences, 18, replace = TRUE) )
bootstrapmedians = sapply(resamples, median)
<![if !vml]><![endif]><![if !vml]><![endif]>
Figures: 1,000 sample medians from 1,000 random samples (n = 18) with replacement from the observed reaction time differences
(a) Try to explain why the mean of this bootstrap distribution is closer to 0.19 than to 0 based on the bootstrapping process.
(b) There appears to be several clumps of identical values in the dotplot. Try to explain why that is not surprising for a graph of sample medians.
(c) What is the standard deviation of the bootstrap distribution? Use this value to create an informal 95% confidence interval for the population median (e.g., estimate + 2 SE(estimate)). Include a one-sentence interpretation of your interval in context.
(d) How does the interval for the population median compare to the interval for the population mean? Which interval would you report to these researchers? Why?
3) Continuing with the reaction time data.
(a) Reporting “effect size” is becoming increasingly popular. For a one-sample t-test, the effect size could be calculated as <![if !msEquation]><![if !vml]><![endif]><![endif]>. How does this differ from a one-sample t-statistic and conjecture why knowing the effect size of a study might be useful (Hint: practical significance).
(b) Calculate the effect size for the reaction time data. (This is also called Cohen’s d, and Cohen in the 90s decided 0.5 was a moderate effect (= “visible to the naked eye of a careful observer”) and 0.8 was a large effect. Related article.
(c) Explain what a “Type I Error” would mean in this context.
(d) Explain what a “Type II Error” would mean in this context.
(e) Suppose the researchers considered a mean difference of 0.33 seconds (the length of an eye blink) to be meaningful. Use R or JMP to determine the power of the one-sample t-test to detect this difference.
#You have to first install a package
#Then load in the package
#Now use the pwr.t.test function
pwr.t.test(n = 18, d = 0.33/.41, sig.level = 0.05, type = c("one.sample"))
Explain what d is here.
Choose DOE > Sample Size Explorers > Power > Power for One Sample Mean.
Keep Alpha set to 0.05.
Change the value of the Std Dev to 0.41.
Specify 0.33 as the difference to detect.
Enter 18 as the sample size.
Include your output.
Report and interpret the power in context. Does this amount of appear sufficient to you?
(f) Repeat for a sample size of n = 100. Include your output. Does the power increase or decrease?
(g) Try to give an intuitive explanation for why the power in (e) is so large even though the sample size is so small.
(h) In addition to impacting power, what is a second advantage to using a larger sample size for a one-sample t-test?