.. _final-spring2025: Final Exam — Spring 2025: Worked Solutions =========================================== .. admonition:: Exam Information :class: info | **Course:** STAT 350 — Introduction to Statistics | **Semester:** Spring 2025 | **Total Points:** 150 + 15 (Extra Credit) = 165 | **Time Allowed:** 120 minutes | **Coverage:** Cumulative (Chapters 1–13); primary emphasis on Chapters 12–13, with Chapters 1–7 weighted more heavily than Chapters 8–11 among the earlier material .. list-table:: :header-rows: 1 :widths: 50 25 25 * - Problem - Total Possible - Topic * - Problem 1 (True/False, 2 pts each) - 12 - Covariance/Correlation, CLT/Binomial, Bayes' Theorem, ANOVA F-test, Least Squares, Extrapolation * - Problem 2 (Multiple Choice, 3 pts each) - 18 - Probability Inequalities, Random Variable Properties, Two-Sample Inference, SLR Units, Residual Patterns, ANOVA MSE Bias * - Problem 3 (Matching) - 21 - Confidence Intervals/Bounds, Sampling Bias, Paired Design, Interval Width, Interpretation Errors * - Problem 4 - 32 - Exponential Distribution, Laplace Distribution, CLT/Sampling Distribution * - Problem 5 - 40 - Simple Linear Regression * - Problem 6 - 42 - One-Way ANOVA, Tukey HSD * - **Total** - **150** (+ 15 Extra Credit) - --- Problem 1 — True/False (12 points, 2 pts each) ----------------------------------------------- .. admonition:: Question 1.1 (2 pts) :class: note Suppose :math:`X` and :math:`Y` are two random variables with a large covariance :math:`\text{COV}(X, Y) = 100{,}000`, and the individual standard deviations :math:`\sigma_X` and :math:`\sigma_Y` are unknown but finite. From this information, we can conclude that :math:`X` and :math:`Y` are strongly correlated. .. dropdown:: Solution :class-container: sd-border-success **Answer: FALSE** The correlation coefficient is defined as: .. math:: \rho = \frac{\text{COV}(X, Y)}{\sigma_X \sigma_Y} A large covariance does not imply strong correlation because the covariance is not scale-free. If :math:`\sigma_X` and :math:`\sigma_Y` are very large, :math:`\rho` could be close to zero even with :math:`\text{COV}(X, Y) = 100{,}000`. Since :math:`\sigma_X` and :math:`\sigma_Y` are unknown, we cannot determine the value of :math:`\rho` and therefore cannot conclude strong correlation. .. admonition:: Question 1.2 (2 pts) :class: note A Reddit user claims that when one encounters a Pokémon in the wild, there is a 2% chance that it is a legendary Pokémon. Assume that each encounter is independent, each has the same 2% chance, and each wild Pokémon encountered is either legendary or not legendary. Assuming the claim is true: the number of legendary Pokémon encountered is approximately normal if a sufficiently large number of wild Pokémon are observed. .. dropdown:: Solution :class-container: sd-border-success **Answer: TRUE** Let :math:`X` = number of legendary Pokémon encountered in :math:`n` encounters. Then :math:`X \sim \text{Binomial}(n, p = 0.02)`. Since each encounter is an independent Bernoulli trial, the CLT applies to the sum :math:`X`. For sufficiently large :math:`n` such that :math:`np \geq 10` and :math:`n(1-p) \geq 10` (i.e., :math:`n \geq 500`), the sampling distribution of :math:`X` is approximately normal. .. admonition:: Question 1.3 (2 pts) :class: note Bayes' Theorem is often used for revising probabilities based on new evidence. Bayes' Theorem applies when the events of interest, :math:`A_1, A_2, \ldots, A_k`, are mutually exclusive (disjoint), and the evidence event :math:`B` has positive probability. .. dropdown:: Solution :class-container: sd-border-success **Answer: TRUE** Bayes' Theorem states: .. math:: P(A_i \mid B) = \frac{P(B \mid A_i)\,P(A_i)}{\sum_{j=1}^{k} P(B \mid A_j)\,P(A_j)} The denominator is the Law of Total Probability, which requires the :math:`A_j` to be mutually exclusive and exhaustive, and :math:`P(B) > 0`. The statement is TRUE, noting that the :math:`A_i` must also be exhaustive (collectively covering the entire sample space), though the question focuses on the mutual exclusivity and positive-probability conditions. .. admonition:: Question 1.4 (2 pts) :class: note The plot below shows the response values of an experiment organized by different treatment groups. According to the plot, an ANOVA F-test for this dataset will most likely result in a failure to reject :math:`H_0` because most groups are shaped very similarly. .. figure:: https://yjjpfnblgtrogqvcjaon.supabase.co/storage/v1/object/public/stat-350-assets/images/Exams/FinalExam/SPRING2025/image1.png :alt: Dot plot showing response values for six groups. Groups 1 through 5 have similar spread and center around a common value. Group 6 has a noticeably lower center, well separated from the others. :align: center :width: 70% .. dropdown:: Solution :class-container: sd-border-success **Answer: FALSE** While most groups (1–5) do appear to have similar shapes and centers, Group 6 has a noticeably lower mean response, well separated from the others. The ANOVA F-test detects differences in group means — it does not require all groups to differ. The visual separation of Group 6 indicates that at least one pair of means differs, so the F-test will most likely **reject** :math:`H_0`, not fail to reject it. .. admonition:: Question 1.5 (2 pts) :class: note Let :math:`\hat{\beta}_1` and :math:`\hat{\beta}_0` be the slope and intercept of the regression line computed from a dataset :math:`(x_1, y_1), (x_2, y_2), \ldots, (x_n, y_n)`. Suppose a function :math:`l` is defined as: .. math:: l(a, b) = \sum_{i=1}^{n} \bigl(y_i - (a + b x_i)\bigr)^2 Then :math:`l` attains the smallest value possible by plugging in :math:`\hat{\beta}_0` for :math:`a` and :math:`\hat{\beta}_1` for :math:`b`. .. dropdown:: Solution :class-container: sd-border-success **Answer: TRUE** The function :math:`l(a, b)` is precisely the **sum of squared residuals** (SSE) as a function of the intercept :math:`a` and slope :math:`b`. The least squares estimators :math:`\hat{\beta}_0` and :math:`\hat{\beta}_1` are defined as the values of :math:`(a, b)` that minimize :math:`l(a, b)` over all possible choices of :math:`a` and :math:`b`. Therefore, :math:`l(\hat{\beta}_0, \hat{\beta}_1) \leq l(a, b)` for all :math:`(a, b)`, and the statement is TRUE. .. admonition:: Question 1.6 (2 pts) :class: note Interpolation and extrapolation are terms used for making predictions with a regression model. Extrapolation typically yields safer, more reliable predictions than interpolation. .. dropdown:: Solution :class-container: sd-border-success **Answer: FALSE** **Interpolation** — predicting within the observed range of :math:`x` values — is generally safer because the linear model has been empirically validated over that range. **Extrapolation** — predicting outside the observed range — is unreliable because the linear relationship may not hold beyond the data, and small errors in the estimated slope are amplified over large :math:`x`-distances. Extrapolation is therefore riskier, not safer. --- Problem 2 — Multiple Choice (18 points, 3 pts each) ----------------------------------------------------- .. admonition:: Question 2.1 (3 pts) :class: note Suppose :math:`A`, :math:`B`, :math:`C`, and :math:`D` are non-empty events in the same sample space where :math:`P(C) > P(A \cup B) > P(D) > 0.7`. Which of the following statements is TRUE? - (A) :math:`D` must be a subset of :math:`C`. - (B) :math:`P(A' \cap B') < P(C') < 0.3` holds. - (C) The two events :math:`C` and :math:`D` can be mutually exclusive. - (D) If :math:`A \cap C = \emptyset`, then :math:`B \cap C` must be a non-empty set. - (E) The two events :math:`A` and :math:`B` are independent. .. dropdown:: Solution :class-container: sd-border-success **Answer: (D)** Since :math:`P(C) > P(A \cup B) > 0.7`, we have :math:`P(C) + P(A \cup B) > 1.4 > 1`. By inclusion-exclusion: .. math:: P\!\bigl(C \cap (A \cup B)\bigr) \geq P(C) + P(A \cup B) - 1 > 0.4 > 0 So :math:`C` and :math:`A \cup B` must overlap. Since :math:`C \cap (A \cup B) = (C \cap A) \cup (C \cap B)`, if :math:`A \cap C = \emptyset` then :math:`C \cap (A \cup B) = C \cap B = B \cap C`. Therefore :math:`P(B \cap C) > 0`, which means :math:`B \cap C` must be a non-empty set. **(D) is TRUE.** - **(A) FALSE.** High probability of :math:`D` does not imply :math:`D \subseteq C`; subset relationships depend on set containment, not just probability values. - **(B) FALSE.** Since :math:`P(C) > P(A \cup B)`, we have :math:`P(C') = 1 - P(C) < 1 - P(A \cup B) = P(A' \cap B')`. So the correct ordering is :math:`P(C') < P(A' \cap B') < 0.3` — the inequality in option (B) is reversed. - **(C) FALSE.** If :math:`C` and :math:`D` were mutually exclusive, :math:`P(C \cup D) = P(C) + P(D) > 0.7 + 0.7 = 1.4 > 1`, which is impossible. - **(E) FALSE.** The given probability inequalities place no constraint on whether :math:`A` and :math:`B` are independent. .. admonition:: Note on solution key ⚠️ :class: danger The solution key marks **(B)** as the answer, but option (B) states :math:`P(A' \cap B') < P(C') < 0.3`. Because :math:`P(C) > P(A \cup B)`, we in fact have :math:`P(C') < P(A' \cap B')` — the inequality is reversed, making (B) false. Option **(D)** is the correct answer, as shown above. .. admonition:: Question 2.2 (3 pts) :class: note Which statement regarding the properties of common random variables is FALSE? - (A) A Poisson random variable counts the number of events occurring in a fixed interval of time, area, or space. - (B) A Uniform random variable assigns equal probability density across its entire support. - (C) A Binomial random variable counts the number of independent trials required to achieve a specified number of successes. - (D) An Exponential random variable measures the waiting time between consecutive independent events. - (E) None of the statements listed above are false. .. dropdown:: Solution :class-container: sd-border-success **Answer: (C)** - **(A) TRUE.** Poisson counts events in a fixed interval. - **(B) TRUE.** Uniform assigns constant density :math:`1/(b-a)` over :math:`[a, b]`. - **(C) FALSE.** A Binomial random variable counts the **number of successes** in a fixed number :math:`n` of independent trials — not the number of trials needed. The description in (C) (counting trials to a specified number of successes) describes the **Negative Binomial** distribution, which is not covered in this course. - **(D) TRUE.** The Exponential distribution models waiting times between consecutive events in a Poisson process. .. admonition:: Question 2.3 (3 pts) :class: note In an Amish community, an accountant wants to determine if the daily profit from selling groceries has increased in 2024 compared to 2023. However, due to a recent flood, the accountant was only able to obtain daily profit data for 55 days in 2023 and 82 days in 2024. The calculated test statistic follows the :math:`t`-distribution with :math:`\text{df} \approx 117.25`. Historically the distribution of daily profit prior to 2023 exhibited slight positive skewness, and current samples appear consistent with historical patterns. Which of the following statements in the accountant's report is FALSE? - (A) Daily profit reports were mixed in a random order, and only a few reports at the top of the pile were readable after the flood. Thus, the SRS assumption is naively satisfied. - (B) Since the daily profit is measured for the same Amish community in both years, a two-sample matched-pairs t-test should be used for analysis. - (C) The combined sample size is sufficiently large for the t-test to be robust against slight positive skewness. - (D) A :math:`Z`-table is used when calculating the :math:`p`-value due to limited access to electricity. The use of a :math:`Z`-table is a reasonable approximation because the :math:`t`-distribution becomes approximately Normal when df is sufficiently large. .. dropdown:: Solution :class-container: sd-border-success **Answer: (B)** - **(A) TRUE (plausible).** If reports were randomly mixed and the top few happened to be readable, this is a rough justification for treating the available records as an SRS. The statement is described as "naively satisfied" — indicating a weak but defensible assumption. - **(B) FALSE.** A matched-pairs design requires one-to-one pairing of observations (e.g., the same day in both years, or the same individual measured twice). Here the data are separate samples of 55 days and 82 days — there is no natural pairing because the sample sizes differ and the days are not matched. A **two-sample independent** :math:`t`-test (Welch's, since :math:`\text{df} \approx 117.25` suggests unequal variances) is appropriate. - **(C) TRUE.** With combined :math:`n = 55 + 82 = 137`, the CLT provides adequate robustness against slight skewness. - **(D) TRUE.** With :math:`\text{df} \approx 117`, the :math:`t`-distribution is nearly indistinguishable from the standard normal, making the :math:`Z`-table a reasonable approximation. .. admonition:: Question 2.4 (3 pts) :class: note In a simple linear regression, the predictor variable is recorded in pounds (lbs). What restriction, if any, does this put on the units of the response variable? - (A) It must be measured in some other unit of mass or weight. - (B) It cannot be expressed in pounds or any other weight units. - (C) It may be measured in whatever units are appropriate for the outcome. - (D) It must be measured in pounds exactly, matching the predictor units. - (E) Each of the statements given above is simultaneously valid and applicable. .. dropdown:: Solution :class-container: sd-border-success **Answer: (C)** In simple linear regression :math:`\hat{Y} = b_0 + b_1 x`, the slope :math:`b_1` has units of (response units)/(predictor units), and the intercept :math:`b_0` has units of the response. There is no restriction on the units of :math:`Y` imposed by the units of :math:`x`. The response variable may be measured in any units appropriate for the application — they need not match, relate to, or differ from the predictor's units. .. admonition:: Question 2.5 (3 pts) :class: note If the error variance is constant across all values of the predictor (homoscedasticity), what overall pattern should appear in a plot of residuals versus the predictor? - (A) The residuals spread out progressively, forming a fan shape. - (B) The residual spread narrows progressively, forming a funnel shape. - (C) Residual spread first widens and then narrows across the range. - (D) Residual spread stays about the same, forming a uniform band. - (E) Residuals align along a single slanted line rising or falling. .. dropdown:: Solution :class-container: sd-border-success **Answer: (D)** Under homoscedasticity the variance of :math:`\varepsilon_i` is constant at :math:`\sigma^2` for all values of :math:`x`. In the residual plot this manifests as a roughly **uniform horizontal band** of scatter — no systematic widening (fan), narrowing (funnel), or other patterns related to the predictor value. Options (A)–(C) describe heteroscedasticity; (E) describes a non-zero slope remaining in the residuals, which indicates a violation of linearity. .. admonition:: Question 2.6 (3 pts) :class: note A researcher performs ANOVA to analyze a dataset, and they mistakenly used the entire sample size :math:`n` instead of :math:`n_i` when calculating group variances :math:`s_i^2`. Assuming the formula below was used for calculating the MSE value, which of the following statements is TRUE? .. math:: \text{MSE} = \frac{\sum_{i=1}^{k}(n_i - 1)s_i^2}{n - k} - (A) The MSE value is overestimated, so it increases the chance of rejecting :math:`H_0`. - (B) The MSE value is overestimated, so it decreases the chance of rejecting :math:`H_0`. - (C) The MSE value is overestimated, but the ANOVA results remain the same. - (D) The MSE value is underestimated, so it increases the chance of rejecting :math:`H_0`. - (E) The MSE value is underestimated, so it decreases the chance of rejecting :math:`H_0`. - (F) The MSE value is underestimated, but the ANOVA results remain the same. .. dropdown:: Solution :class-container: sd-border-success **Answer: (D)** If the researcher uses :math:`n` (total sample size) as the denominator instead of :math:`n_i` when computing each group's sample variance, the resulting variance estimate is: .. math:: s_{i,\text{wrong}}^2 = \frac{\sum_{j=1}^{n_i}(x_{ij} - \bar{x}_i)^2}{n - 1} Since :math:`n > n_i`, the denominator :math:`n - 1` is larger than the correct :math:`n_i - 1`, so :math:`s_{i,\text{wrong}}^2 < s_i^2` for each group. The MSE numerator :math:`\sum_{i=1}^{k}(n_i-1)s_i^2` uses these deflated variance estimates, so the overall MSE is **underestimated**. A smaller MSE inflates the F-statistic :math:`F_{\text{TS}} = \text{MSA}/\text{MSE}`, which **increases** the chance of rejecting :math:`H_0`. Therefore **(D)** is correct. --- .. admonition:: Problem 3 Setup :class: important A biological research firm hired seven new intern statisticians. As part of their training program, the firm requires each intern to run a mock experiment and submit a report answering a unique statistical question. Being new to the position, the interns made various mistakes during this procedure. The consequence choices are: .. list-table:: :header-rows: 1 :widths: 15 85 * - Letter - Consequence * - A - The margin of error will be larger than necessary. * - B - The margin of error will be smaller than necessary. * - C - The sample will be a biased representation of the population. * - D - The result will be impacted by extraneous variation. * - E - An inaccurate message about the result will be conveyed to the non-statisticians in their team. * - F - This does not lead to any serious consequences. Problem 3 — Matching (21 points, 3 pts each) ---------------------------------------------- .. admonition:: Question 3 — All seven interns (21 pts) :class: note Match each intern's mistake to its **most serious** consequence (A–F). **Arthur** created a two-sided confidence interval, while a one-sided lower confidence bound was necessary. **Bill** asked all his extended family members to participate in his experiment in order to expedite data collection. **Charlie** used a two-sample independent approach, while it was correct to use the matched-pairs approach. **Ron** was unaware that the population SD was known, so he instead used the sample SD and the :math:`t`-procedure to create a lower confidence bound. **Molly** correctly obtained a lower confidence bound of −0.73 with 95% confidence. She reported that "the true parameter is above −0.73 with probability 0.95." **Fred** rejected the null hypothesis for an ANOVA F-test and proceeded to construct confidence intervals for pairwise differences of means using the Bonferroni method. Given the family-wise Type I error :math:`\alpha`, he used the critical value :math:`t_{\alpha/2,\,\text{df}}` for each interval. **Ginny** conducted the F-test for linear regression and failed to reject the null hypothesis. She reported that the explanatory variable and the response variable "can be seen as independent of each other." .. dropdown:: Solution :class-container: sd-border-success .. flat-table:: Matching Answers :header-rows: 1 :widths: 15 15 70 * - Intern - Answer - Explanation * - Arthur - **A** - A two-sided confidence interval has a critical value :math:`z_{\alpha/2}` (or :math:`t_{\alpha/2}`), while a one-sided lower confidence bound uses the smaller critical value :math:`z_\alpha`. The CI extends in both directions, so it is wider — the margin of error is **larger than necessary** for the one-sided inference goal. * - Bill - **C** - Recruiting only family members is a convenience sample (voluntary/network sampling). Family members likely share characteristics — lifestyle, economics, genetics — that are not representative of the broader population. The sample will be a **biased representation of the population**. * - Charlie - **D** - When a matched-pairs design is appropriate (e.g., before/after measurements on the same subject or paired subjects), using a two-sample independent approach fails to remove the within-pair correlation. The extraneous between-subject variation that the pairing was designed to eliminate remains in the error, inflating the variance estimate. The result will be **impacted by extraneous variation**. * - Ron - **A** - When :math:`\sigma` is known, the :math:`z`-procedure should be used; critical values from :math:`z` are smaller than the corresponding :math:`t` critical values (since the :math:`t`-distribution has heavier tails). Using :math:`t` when :math:`z` is appropriate produces a **larger margin of error than necessary**. * - Molly - **E** - The lower confidence bound of −0.73 is a fixed number computed from the data; the true parameter is also a fixed (though unknown) constant — it is not a random variable. Saying "the true parameter is above −0.73 with probability 0.95" assigns a probability to a fixed event, which is a frequentist error. The correct statement is "We are 95% confident that the true parameter is greater than −0.73." This conveys an **inaccurate message** about the nature of the result. * - Fred - **B** - The Bonferroni correction for :math:`C = \binom{k}{2}` pairwise comparisons uses critical value :math:`t_{\alpha/(2C),\,\text{df}}`, not :math:`t_{\alpha/2,\,\text{df}}`. Since :math:`\alpha/2 > \alpha/(2C)`, Fred's critical value is **smaller** than it should be, producing confidence intervals that are **narrower than necessary** — the margin of error is smaller than necessary, and the family-wise Type I error is inflated. * - Ginny - **E** - Failing to reject :math:`H_0\colon \beta_1 = 0` means there is insufficient evidence of a **linear** association. It does not mean the variables are statistically independent — a nonlinear relationship could still exist. Reporting "the variables can be seen as independent" overstates the conclusion and conveys an **inaccurate message** to the team. --- .. admonition:: Problem 4 Setup :class: important At a high-frequency trading venue, the waiting time (in milliseconds) until the next buy order arrives follows :math:`T_{\text{Buy}} \sim \text{Exp}(\lambda_{\text{Buy}})`, and the waiting time until the next sell order arrives independently follows :math:`T_{\text{Sell}} \sim \text{Exp}(\lambda_{\text{Sell}})`. Define the **signed arrival-time difference**: .. math:: R = T_{\text{Buy}} - T_{\text{Sell}} Problem 4 — Exponential Distribution, Laplace, and CLT (32 points) -------------------------------------------------------------------- .. admonition:: Question 4a (4 pts) :class: note Assume :math:`\lambda_{\text{Buy}} = 3\ \text{ms}^{-1}` and :math:`\lambda_{\text{Sell}} = 1\ \text{ms}^{-1}`. Determine :math:`E[R]` and :math:`\text{Var}(R)`. .. dropdown:: Solution :class-container: sd-border-success For :math:`T \sim \text{Exp}(\lambda)`: :math:`E[T] = 1/\lambda` and :math:`\text{Var}(T) = 1/\lambda^2`. Since :math:`T_{\text{Buy}}` and :math:`T_{\text{Sell}}` are independent: .. math:: E[R] = E[T_{\text{Buy}}] - E[T_{\text{Sell}}] = \frac{1}{3} - \frac{1}{1} = -\frac{2}{3} \approx \boxed{-0.6667} .. math:: \text{Var}(R) = \text{Var}(T_{\text{Buy}}) + \text{Var}(T_{\text{Sell}}) = \frac{1}{3^2} + \frac{1}{1^2} = \frac{1}{9} + 1 = \frac{10}{9} \approx \boxed{1.1111} (The variance of :math:`-T_{\text{Sell}}` equals :math:`\text{Var}(T_{\text{Sell}})` since variance is unaffected by sign.) .. admonition:: Question 4b (12 pts) :class: note Under these assumptions, :math:`R` follows a Laplace (double-exponential) distribution with parameters :math:`\mu = E[R]` and :math:`b = 1/\lambda_{\text{Buy}} + 1/\lambda_{\text{Sell}}`. The pdf is: .. math:: f_R(x) = \begin{cases} \dfrac{1}{2b}\,e^{(x-\mu)/b} & x < \mu \\[6pt] \dfrac{1}{2b}\,e^{-(x-\mu)/b} & x \geq \mu \end{cases} Write down the parameters :math:`\mu` and :math:`b`, and compute :math:`P(-1 \leq R \leq 1)`. .. dropdown:: Solution :class-container: sd-border-success **Parameters:** .. math:: \mu = -\frac{2}{3}, \qquad b = \frac{1}{3} + \frac{1}{1} = \frac{4}{3} \approx 1.3333 So :math:`\frac{1}{2b} = \frac{3}{8}` and the exponent coefficient is :math:`\frac{1}{b} = \frac{3}{4}`. **Computing** :math:`P(-1 \leq R \leq 1)`: split the integral at :math:`\mu = -2/3`. .. math:: P(-1 \leq R \leq 1) = \frac{3}{8}\left[\int_{-1}^{-2/3} e^{\frac{3}{4}(x+\frac{2}{3})}\,dx + \int_{-2/3}^{1} e^{-\frac{3}{4}(x+\frac{2}{3})}\,dx\right] Substitute :math:`u = x + 2/3`, so :math:`du = dx`: .. math:: = \frac{3}{8}\left[\int_{-1/3}^{0} e^{\frac{3}{4}u}\,du + \int_{0}^{5/3} e^{-\frac{3}{4}u}\,du\right] Evaluating each integral: .. math:: = \frac{3}{8}\left[\frac{4}{3}\!\left(1 - e^{-1/4}\right) + \frac{4}{3}\!\left(1 - e^{-5/4}\right)\right] .. math:: = \frac{1}{2}\!\left(1 - e^{-1/4}\right) + \frac{1}{2}\!\left(1 - e^{-5/4}\right) = 1 - \frac{1}{2}\!\left(e^{-1/4} + e^{-5/4}\right) .. math:: = 1 - \frac{1}{2}(0.7788 + 0.2865) = 1 - 0.5327 = \boxed{0.4673} .. admonition:: Question 4c (6 pts) :class: note Suppose we record the next **55 independent** observations :math:`R_1, R_2, \ldots, R_{55}`, each following the same Laplace distribution. Define: .. math:: \bar{R} = \frac{1}{55}\sum_{i=1}^{55} R_i Determine the exact mean :math:`E[\bar{R}]` and variance :math:`\text{Var}(\bar{R})`. .. dropdown:: Solution :class-container: sd-border-success By the properties of sample means of i.i.d. random variables: .. math:: E[\bar{R}] = E[R] = \boxed{-\frac{2}{3} \approx -0.6667} .. math:: \text{Var}(\bar{R}) = \frac{\text{Var}(R)}{n} = \frac{10/9}{55} = \frac{10}{495} = \frac{2}{99} \approx \boxed{0.0202} .. admonition:: Question 4d (7 pts) :class: note Based on the context of the problem and the plots below (Figures A–D), do you think it is reasonable to approximate :math:`\bar{R}` with a Normal distribution using the CLT? Answer **yes** or **no** and justify your answer by referring to the characteristics observed in the histograms and QQ-plots. .. figure:: https://yjjpfnblgtrogqvcjaon.supabase.co/storage/v1/object/public/stat-350-assets/images/Exams/FinalExam/SPRING2025/image2.png :alt: Four panels. (A) Histogram of the parent Laplace distribution R showing strong left skew, with a red kernel density curve and blue normal overlay that diverge substantially. (B) QQ-plot of R versus the normal distribution showing a curved S-shape, indicating heavy tails and skewness. (C) Histogram of the sampling distribution of Rbar for n=55, with red kernel density and blue normal overlay nearly aligned. (D) QQ-plot of Rbar versus the normal distribution showing mostly linear alignment but with some tail deviations. :align: center :width: 90% .. dropdown:: Solution :class-container: sd-border-success **Answer: Yes (reasonable) — with caveats.** The parent distribution of :math:`R` (Figure A) shows strong left skewness, confirmed by the curved QQ-plot in Figure B where the points deviate substantially from the line. However, for the sample mean :math:`\bar{R}` with :math:`n = 55` (Figure C), the histogram kernel density and the blue normal overlay are closely aligned, indicating that much of the skewness has been mitigated by averaging. Figure D (QQ-plot of :math:`\bar{R}`) shows mostly linear alignment, though some deviation persists in the tails. The Normal approximation via the CLT is **reasonable for most purposes** with :math:`n = 55`. However, if high precision in the tails is required, the approximation may still introduce non-negligible error, since Figure D confirms residual non-normality has not been fully eliminated. .. admonition:: Question 4e (3 pts) :class: note Using the Normal approximation to :math:`\bar{R}` with mean :math:`E[\bar{R}]` and standard deviation :math:`\text{SD}(\bar{R})`, select the correct R code to compute the approximate probability :math:`P(-0.5 \leq \bar{R} \leq 0)`. - (A) ``pnorm(0, mean=E[Rbar], sd=SD(Rbar), lower.tail=TRUE) - pnorm(-0.5, mean=E[Rbar], sd=SD(Rbar), lower.tail=FALSE)`` - (B) ``pnorm(0, mean=E[Rbar], sd=SD(Rbar), lower.tail=FALSE) - pnorm(-0.5, mean=E[Rbar], sd=SD(Rbar), lower.tail=TRUE)`` - (C) ``pnorm(0, mean=E[Rbar], sd=SD(Rbar), lower.tail=TRUE) - pnorm(-0.5, mean=E[Rbar], sd=SD(Rbar), lower.tail=TRUE)`` - (D) ``pnorm(0, mean=E[Rbar], sd=SD(Rbar), lower.tail=FALSE) - pnorm(-0.5, mean=E[Rbar], sd=SD(Rbar), lower.tail=FALSE)`` .. dropdown:: Solution :class-container: sd-border-success **Answer: (C)** The probability of an interval is computed as: .. math:: P(-0.5 \leq \bar{R} \leq 0) = P(\bar{R} \leq 0) - P(\bar{R} \leq -0.5) Both terms use the CDF (:math:`\texttt{lower.tail = TRUE}`), giving: .. code-block:: r pnorm(0, mean = E[Rbar], sd = SD(Rbar), lower.tail = TRUE) - pnorm(-0.5, mean = E[Rbar], sd = SD(Rbar), lower.tail = TRUE) - **(A)** subtracts ``pnorm(-0.5, ..., lower.tail=FALSE)`` = :math:`P(\bar{R} > -0.5)`, which gives a wrong result. - **(B)** uses ``lower.tail=FALSE`` for the upper limit, yielding :math:`P(\bar{R} > 0)`, not :math:`P(\bar{R} \leq 0)`. - **(D)** Both terms use ``lower.tail=FALSE`` (upper tail), producing :math:`P(\bar{R}>0) - P(\bar{R}>-0.5)` which is negative. --- .. admonition:: Problem 5 Setup :class: important Purdue researchers want to establish the relationship between **voltage** (:math:`x`, in volts) and the **lifetime of semiconductor chips** in electric vehicles (:math:`Y`, in years). They simulated the following data. .. flat-table:: Voltage and Chip Lifetime Data :header-rows: 1 :widths: 20 10 10 10 10 10 10 10 10 * - Variable - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 * - Voltage (:math:`x`, V) - 450 - 812 - 631 - 720 - 364 - 965 - 1044 - 569 * - Lifetime (:math:`Y`, years) - 17.6 - 13.4 - 15.3 - 14.9 - 19.7 - 13.2 - 12.3 - 16.8 Problem 5 — Simple Linear Regression (40 points) -------------------------------------------------- .. admonition:: Question 5a (3 pts) :class: note Describe the relationship, strength, and direction of the relationship between lifetime of semiconductor chips and voltage based on the scatter plot below. .. figure:: https://yjjpfnblgtrogqvcjaon.supabase.co/storage/v1/object/public/stat-350-assets/images/Exams/FinalExam/SPRING2025/image3.png :alt: Scatter plot of chip lifetime (y-axis, roughly 12 to 20 years) versus voltage (x-axis, roughly 300 to 1100 V). The eight data points follow a clear downward trend. :align: center :width: 75% .. dropdown:: Solution :class-container: sd-border-success **Answer:** The relationship between voltage and chip lifetime is **linear**, with a **negative direction** and **strong** (to moderate) association. Higher voltage is associated with shorter chip lifetime. .. admonition:: Question 5b (8 pts) :class: note The following output was obtained from RStudio for the regression fit. .. code-block:: r Call: lm(formula = Lifetime ~ Volt, data = jpr) Residuals: Min 1Q Median 3Q Max -0.80339 -0.40072 -0.05738 0.48086 0.93905 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 22.463962 0.782290 28.716 1.18e-07 *** Volt -0.010173 0.001073 -9.485 7.82e-05 *** --- Residual standard error: 0.6771 on 6 degrees of freedom Multiple R-squared: 0.9375, Adjusted R-squared: 0.9271 F-statistic: 89.96 on 1 and 6 DF, p-value: 7.824e-05 (i) Write out the equation of the regression line. (ii) Interpret the meaning of the estimated slope. (iii) Find and interpret :math:`R^2` in the context of the problem. .. dropdown:: Solution :class-container: sd-border-success **(i) Regression equation:** .. math:: \hat{y} = 22.4640 - 0.0102\,x_{\text{Volt}} **(ii) Slope interpretation:** For each additional 1 volt increase in operating voltage, the estimated mean lifetime of a semiconductor chip **decreases by approximately 0.0102 years**, on average. **(iii) Coefficient of determination:** :math:`R^2 = 0.9375`. Approximately **93.75%** of the variation in the lifetime of semiconductor chips is explained by the linear relationship with voltage. This indicates a very strong linear fit. .. admonition:: Question 5c (12 pts) :class: note Complete the ANOVA table. Show your work. .. flat-table:: ANOVA Table for Regression :header-rows: 1 :widths: 20 15 18 18 15 14 * - Source - df - SS - MS - F - :math:`\Pr(>F)` * - Regression - 1 - 41.249 - 41.249 - 89.964 - 7.824e-05 * - Error - 6 - 2.751 - 0.4585 - - * - Total - 7 - 44.000 - - - .. dropdown:: Solution :class-container: sd-border-success **Degrees of freedom:** .. math:: \text{df}_{\text{Reg}} = 1, \quad \text{df}_E = n - 2 = 8 - 2 = 6, \quad \text{df}_T = n - 1 = 7 **SST** is given directly (= 44). **SSR** is given (= 41.249). Cross-check: :math:`\text{SSR} = F_{\text{TS}} \times \text{MSE} \times \text{df}_{\text{Reg}} = 89.964 \times 0.4585 \times 1 \approx 41.25` ✓ **SSE:** .. math:: \text{SSE} = \text{SST} - \text{SSR} = 44 - 41.249 = 2.751 **MSE:** .. math:: \text{MSE} = \frac{\text{SSE}}{\text{df}_E} = \frac{2.751}{6} = 0.4585 Cross-check: :math:`\hat{\sigma} = \sqrt{0.4585} = 0.6771` matches the residual standard error in the output ✓ .. admonition:: Question 5d (7 pts) :class: note Based on the ANOVA table, is there a significant linear association between chip lifetime and voltage at :math:`\alpha = 0.001`? State the hypotheses and provide a formal conclusion in context. .. dropdown:: Solution :class-container: sd-border-success **Step 1 — Parameter of interest:** Let :math:`\beta_1` denote the true slope of the linear relationship between voltage (:math:`x`) and the mean lifetime of semiconductor chips (:math:`Y`). **Step 2 — Hypotheses:** .. math:: H_0\colon \beta_1 = 0 \quad \text{(no linear association between voltage and chip lifetime)} .. math:: H_a\colon \beta_1 \neq 0 \quad \text{(there is a linear association)} **Step 3 — Test statistic and p-value:** From the ANOVA table: :math:`F_{\text{TS}} = 89.964` on :math:`\text{df}_M = 1` and :math:`\text{df}_E = 6`; :math:`p\text{-value} = 7.824 \times 10^{-5}`. **Step 4 — Decision and conclusion:** Since :math:`p\text{-value} = 7.824 \times 10^{-5} < 0.001 = \alpha`, we **reject** :math:`H_0`. The data give support (:math:`p`-value :math:`= 7.824 \times 10^{-5}`) to the claim that there is a linear relationship between voltage and the lifetime of semiconductor chips in electric vehicles. .. admonition:: Question 5e (10 pts) :class: note Given that :math:`S_{xx} = 398{,}569.875`, construct a 99.9% confidence interval for :math:`\beta_1`. Select an appropriate critical value from the R output below. .. code-block:: r > qt(0.001, 6, lower.tail = FALSE) [1] 5.207626 > qt(0.001/2, 6, lower.tail = FALSE) [1] 5.958816 > qt(0.001, 7, lower.tail = FALSE) [1] 4.785290 > qt(0.001/2, 7, lower.tail = FALSE) [1] 5.407883 .. dropdown:: Solution :class-container: sd-border-success **Critical value selection:** For a 99.9% two-sided CI, :math:`\alpha = 0.001`, so we need :math:`t_{\alpha/2,\,\text{df}_E} = t_{0.0005,\,6}`: .. code-block:: r > qt(0.001/2, 6, lower.tail = FALSE) [1] 5.958816 **Standard error of** :math:`\hat{\beta}_1`: .. math:: \text{SE}(\hat{\beta}_1) = \sqrt{\frac{\text{MSE}}{S_{xx}}} = \sqrt{\frac{0.4585}{398{,}569.875}} = 0.001073 (This matches the Std. Error in the R output directly.) **99.9% Confidence interval:** .. math:: \hat{\beta}_1 \pm t_{0.0005,\,6} \cdot \text{SE}(\hat{\beta}_1) = -0.010173 \pm 5.958816 \times 0.001073 .. math:: = -0.010173 \pm 0.006394 .. math:: \boxed{(-0.0166,\ -0.0038)} Since the interval does not contain zero, this confirms at the 99.9% confidence level that :math:`\beta_1 < 0` — higher voltage is associated with shorter chip lifetime. --- .. admonition:: Problem 6 Setup :class: important An ethologist plans to study how vocal cats are when communicating with different species. Five species are selected: humans, dogs, parrots, rabbits, and hamsters. For each species, the **duration of vocal communication per week** (in minutes) for a group of 20 randomly selected cats is recorded. .. flat-table:: Summary Statistics by Species :header-rows: 1 :widths: 25 15 15 15 15 15 * - - Human - Dog - Parrot - Rabbit - Hamster * - :math:`n_i` - 20 - 20 - 20 - 20 - 20 * - :math:`\bar{x}_i` - 50.1 - 37.4 - 44.3 - 15.6 - 24.3 * - :math:`s_i` - 12.3 - 9.10 - 10.4 - 9.35 - 9.40 .. admonition:: Data table note ⚠️ :class: danger The exam table header labels the last row as :math:`s_i^2` (sample variance), but the solution key treats these values as **standard deviations** :math:`s_i` when computing SSE (squaring them to obtain :math:`s_i^2`). The F-statistic of 39.038 in the key is consistent only with the standard deviation interpretation. The equal variance check in the key is also consistent with treating these as standard deviations (direct ratio :math:`s_{\max}/s_{\min}`). All solutions below follow the key and treat the given values as :math:`s_i` (standard deviations). Problem 6 — One-Way ANOVA (42 points) -------------------------------------- .. admonition:: Question 6a (3 pts) :class: note When analyzing the data through ANOVA, which of the following statements is TRUE? - (A) The duration of vocal communication is a factor variable. - (B) All groups must have the same sample size. - (C) Measuring time in hours instead of minutes would change the ANOVA results. - (D) Homogeneity of variance is automatically satisfied because all cats are sampled from the same population. - (E) None of the above. .. dropdown:: Solution :class-container: sd-border-success **Answer: (E)** - **(A) FALSE.** The **species** (Human, Dog, Parrot, Rabbit, Hamster) is the **factor variable** — it is the categorical grouping variable. The duration of vocal communication is the quantitative **response variable**. - **(B) FALSE.** One-way ANOVA does not require equal group sizes; it accommodates unbalanced designs. - **(C) FALSE.** Rescaling the response (minutes → hours, dividing by 60) is a linear transformation that changes all values proportionally. The F-statistic is invariant to such scaling because SSA, SSE, and hence MSA/MSE all scale by the same factor :math:`(1/60)^2`. - **(D) FALSE.** Homogeneity of variance refers to the **population variance** within each group being equal — it must be assessed empirically (e.g., the rule-of-thumb ratio check) and is not guaranteed by sharing a common population. .. admonition:: Question 6b (2 pts) :class: note Check the constant variance assumption using the summary statistics. Show your work and state whether the assumption is satisfied. .. dropdown:: Solution :class-container: sd-border-success **Answer: The equal variance assumption is satisfied.** The rule of thumb checks whether :math:`s_{\max}/s_{\min} \leq 2`: .. math:: \frac{s_{\max}}{s_{\min}} = \frac{12.3}{9.10} \approx 1.3516 \leq 2 Since the ratio is well below 2, the homogeneity of variance assumption holds. .. admonition:: Question 6c (12 pts) :class: note Complete the ANOVA table. Show your work. .. flat-table:: One-Way ANOVA Table :header-rows: 1 :widths: 20 18 20 18 24 * - Source - df - SS - MS - F statistic * - Factor (Species) - 4 - 16178.64 - 4044.66 - 39.0379 * - Error - 95 - 9842.808 - 103.6085 - * - Total - 99 - 26021.45 - - .. dropdown:: Solution :class-container: sd-border-success **Degrees of freedom:** .. math:: \text{df}_A = k - 1 = 5 - 1 = 4, \quad \text{df}_E = N - k = 100 - 5 = 95, \quad \text{df}_T = 99 **Grand mean:** .. math:: \bar{\bar{x}} = \frac{50.1 + 37.4 + 44.3 + 15.6 + 24.3}{5} = \frac{171.7}{5} = 34.34 **SSA:** .. math:: \text{SSA} = 20\left[(50.1-34.34)^2 + (37.4-34.34)^2 + (44.3-34.34)^2 + (15.6-34.34)^2 + (24.3-34.34)^2\right] .. math:: = 20\left[248.3776 + 9.3636 + 99.2016 + 351.1876 + 100.8016\right] = 20 \times 808.9320 = \mathbf{16{,}178.64} **SSE** (treating :math:`s_i` as standard deviations): .. math:: \text{SSE} = \sum_{i=1}^{5}(n_i - 1)s_i^2 = 19\!\left(12.3^2 + 9.10^2 + 10.4^2 + 9.35^2 + 9.40^2\right) .. math:: = 19(151.29 + 82.81 + 108.16 + 87.4225 + 88.36) = 19 \times 518.0425 = 9842.808 **MSA and MSE:** .. math:: \text{MSA} = \frac{16178.64}{4} = 4044.66, \qquad \text{MSE} = \frac{9842.808}{95} = 103.6085 **F-statistic:** .. math:: F_{\text{TS}} = \frac{\text{MSA}}{\text{MSE}} = \frac{4044.66}{103.6085} \approx 39.0379 **SST** = SSA + SSE = 16178.64 + 9842.808 = 26021.45. .. admonition:: Question 6d (4 pts) :class: note What is the estimated value of the assumed common variance among different species? .. dropdown:: Solution :class-container: sd-border-success **Answer:** :math:`\hat{\sigma}^2 = \text{MSE} = \boxed{103.6085}` In one-way ANOVA, the MSE is the pooled estimate of the common within-group variance :math:`\sigma^2` (assumed equal across all :math:`k` groups under the ANOVA model). .. admonition:: Question 6e (3 pts) :class: note Select the correct R code for the :math:`p`-value associated with the ANOVA table. Assume :math:`F_{\text{TS}}`, :math:`\text{df}_A`, and :math:`\text{df}_E` are the correct test statistic and degrees of freedom. - (A) ``pf(FTS, df1 = dfA, df2 = dfE, lower.tail = TRUE)`` - (B) ``pf(FTS, df1 = dfA, df2 = dfE, lower.tail = FALSE)`` - (C) ``2 * pf(FTS, df1 = dfA, df2 = dfE, lower.tail = FALSE)`` - (D) The :math:`p`-value cannot be determined without specifying the significance level. .. dropdown:: Solution :class-container: sd-border-success **Answer: (B)** The ANOVA F-test is always **upper-tailed**: large values of :math:`F_{\text{TS}}` indicate evidence against :math:`H_0`. The :math:`p`-value is therefore the probability of observing an F-statistic as large as or larger than the one observed: .. math:: p\text{-value} = P(F \geq F_{\text{TS}}) = \texttt{pf(FTS, df1 = dfA, df2 = dfE, lower.tail = FALSE)} - **(A)** gives the CDF value :math:`P(F \leq F_{\text{TS}})` — the complement of the p-value. - **(C)** doubles the upper tail, which would be appropriate for a two-sided test; F-tests in ANOVA are one-sided. - **(D)** is incorrect; the p-value is a computed probability, not dependent on the significance level. .. admonition:: Question 6f (8 pts) :class: note The researchers obtain a :math:`p`-value less than :math:`2 \times 10^{-16}`. At the 1% level of significance, provide a formal decision and conclusion in context. .. dropdown:: Solution :class-container: sd-border-success Since :math:`p\text{-value} < 2 \times 10^{-16} < 0.01 = \alpha`, we **reject** :math:`H_0`. The data give support (:math:`p`-value :math:`< 2\times10^{-16}`) to the claim that the true mean duration of vocal communication per week differs across at least two of the five species studied. .. admonition:: Question 6g (10 pts) :class: note The R output below shows the Tukey HSD results at a family-wise error rate of 5%. Use the output and summary statistics to draw a graphical representation of the Tukey HSD results. Clearly indicate which species (or species, if multiple) has the shortest mean vocal communication duration. .. code-block:: r diff lwr upr p adj Hamster-Dog -13.097560 -22.043802 -4.1513175 0.0009019 Human-Dog 12.701642 3.755400 21.6478844 0.0013940 Parrot-Dog 6.912555 -2.033688 15.8587969 0.2085189 Rabbit-Dog -21.790044 -30.736286 -12.8438015 0.0000000 Human-Hamster 25.799202 16.852960 34.7454442 0.0000000 Parrot-Hamster 20.010114 11.063872 28.9563567 0.0000001 Rabbit-Hamster -8.692484 -17.638726 0.2537583 0.0610890 Parrot-Human -5.789088 -14.735330 3.1571548 0.3799648 Rabbit-Human -34.491686 -43.437928 -25.5454436 0.0000000 Rabbit-Parrot -28.702598 -37.648841 -19.7563561 0.0000000 .. dropdown:: Solution :class-container: sd-border-success **Graphical representation (underline notation):** Groups connected by the same underline are **not** significantly different from each other at the 5% family-wise level. .. figure:: https://yjjpfnblgtrogqvcjaon.supabase.co/storage/v1/object/public/stat-350-assets/images/Exams/FinalExam/SPRING2025/image4.png :alt: Tukey HSD underline display for five species. The five group means are shown in ascending order: 15.6 (Rabbit), 24.3 (Hamster), 37.4 (Dog), 44.3 (Parrot), 50.1 (Human). Three overlapping underlines are shown: one connecting Rabbit and Hamster; a second connecting Dog and Parrot; and a third connecting Parrot and Human. Parrot shares an underline with both Dog and Human but Dog and Human are significantly different from each other. :align: center :width: 70% .. flat-table:: Tukey HSD Groupings :header-rows: 1 :widths: 25 15 60 * - Species - :math:`\bar{x}_i` - Significant differences from * - Rabbit - 15.6 - Dog, Human, Parrot (all :math:`p < 0.001`); **not** from Hamster (:math:`p = 0.061`) * - Hamster - 24.3 - Dog, Human, Parrot (all :math:`p < 0.01`); **not** from Rabbit (:math:`p = 0.061`) * - Dog - 37.4 - Rabbit, Hamster, Human (all :math:`p < 0.01`); **not** from Parrot (:math:`p = 0.209`) * - Parrot - 44.3 - Rabbit, Hamster (both :math:`p < 0.001`); **not** from Dog (:math:`p = 0.209`) or Human (:math:`p = 0.380`) * - Human - 50.1 - Rabbit, Hamster, Dog (all :math:`p < 0.01`); **not** from Parrot (:math:`p = 0.380`) **Conclusion:** **Rabbit and Hamster** are the two species with the shortest mean vocal communication durations in the population. Both are statistically significantly different from every other species (Dog, Parrot, Human), but are **not** statistically significantly different from each other (:math:`p\text{-adj} = 0.0611 > 0.05`). Since their sample means (15.6 and 24.3 minutes/week, respectively) are the two lowest, we conclude that both Rabbit and Hamster elicit the least vocal behavior from cats.