From the Introduction to Modern Statistics (IMS) textbook, complete the following exercises:
\(~\)
Additionally, complete the following exercise using
R
:
Question #1: For this question you’ll use “diet”
data set provided below. These data come a randomized experiment
comparing the efficacy of 3 different weight loss diets. Each subject’s
assigned diet (labeled 1, 2 or 3) is stored in the variable
Diet
.
postWeight
and weightChange
. Which
of these is the better outcome variable? Briefly explain.weightChange
. Then, based upon this graph,
briefly explain whether you believe weightChange
is
associated with diet. Hint: you may use the
factor()
function to ensure the variable “Diet” is treated
as categorical.weightChange
. You should
use factor()
to ensure the variable “Diet” is treated as
categorical in your model formula. Your answer should clearly state the
null and alternative hypotheses (words is okay), report the test
statistic and \(p\)-value (you may
calculate both using R
), and provide a conclusion based
upon the \(p\)-value.postWeight
. Use ANOVA to determine whether diet
is associated with postWeight
. You should use
factor()
to ensure the variable “Diet” is treated as
categorical in your model formula. Your answer should clearly state the
null and alternative hypotheses (words is okay), report the test
statistic and \(p\)-value (you may
calculate both using R
), and provide a conclusion based
upon the \(p\)-value.preWeight
and
diet? Briefly explain, then use ANOVA to verify or refute what you
suspect. You do not need to show all of the formal hypothesis testing
steps here. Instead, you can simply report the \(p\)-value and explain what it tells you in
regard to the premise of this question.