[2pts] 在方差分析的上下文中证明𝑆𝑆𝐺 + 𝑆𝑆𝐸 = 𝑆𝑆𝑇。具体来说，令 𝑆 是一组 𝑁 数

} 对于𝑗
௧௛组，
𝑛௝ = |𝑆௝|成员。那么𝑆 = 𝑆ଵ ∪ 𝑆ଶ ∪ ⋯∪ 𝑆௞，并且𝑁 = |𝑆| = 𝑛ଵ + 𝑛ଶ + ⋯+ 𝑛௞ 是总大小。

[2pts] 进行 2 样本 t 检验。陈述你的参数、假设、假设、检验统计量、p-

[2pts] 现在使用方差分析重复 a 部分。包括用于检查假设的相关图。怎么办

2.
[4pts] 在这道题中，你将在班级调查数据中选择一对合适的变量来运行

3.
[4pts, Extra Credit] 对班级调查数据中的一对合适的变量进行线性回归

[2pts] Prove that 𝑆𝑆𝐺 + 𝑆𝑆𝐸 = 𝑆𝑆𝑇 in the context of ANOVA. Specifically, Let 𝑆 be a set of 𝑁 numbers
which can be partitioned into 𝑘 groups 𝑆௝ for 𝑗 = 1,…, 𝑘. Write 𝑆௝ = {𝑥௝,ଵ, 𝑥௝,ଶ,…, 𝑥௝,௡ೕ
} for the 𝑗
௧௛ group,
with 𝑛௝ = |𝑆௝| members. Then 𝑆 = 𝑆ଵ ∪ 𝑆ଶ ∪ ⋯∪ 𝑆௞, and 𝑁 = |𝑆| = 𝑛ଵ + 𝑛ଶ + ⋯+ 𝑛௞ is the total size.

Use these to prove that 𝑆𝑆𝐺 + 𝑆𝑆𝐸 = 𝑆𝑆𝑇.
The 2-sample t-test for independent populations can loosely be thought of as a special case of ANOVA
where the number of groups is just 2. In this problem we will contrast the results of the two tests if we
treat it as such. We will compare political leanings of vegans and non-vegans in the class survey data.
[2pts] Perform a 2-sample t-test. State your parameters, hypotheses, assumptions, test-statistic, p-
value, and conclusion. Feel free to use R but include your code and results.
a.
[2pts] Now repeat part a using ANOVA. Include relevant plots for checking assumptions. How do
the two p-values compare?
b.
2.
[4pts] In this problem you will choose an appropriate pair of variables in the class survey data to run
ANOVA on, with the goal being the demonstration of an apparent effect or non-effect that you personally
find interesting. You may have to run some tests before finding interesting results. Report your code and
results (for the variables that you ultimately decide to analyze) and explain your findings, including, e.g.,
an explanation of the possible cause of your effect or non-effect. Feel free to include plots and graphics
and comments on your methods and analysis. Answers will awarded up to 4 points for accuracy, effort,
proficiency, and relevance.
3.
[4pts, Extra Credit] Perform a linear regression on an appropriate pair of variables in the class survey data
that you find interesting, and which has not already been done (so don’t do weight vs. height, for example,
since that was done in class). Show your code, plot (of the line and data), the equation of the least-squares
line, and the R-squared value. Explain and interpret your results.