BjornvanBraak/ActuarialMathBench huggingface dataset:
Question: Determine which of the following indicates that a nonstationary time series can be represented as a random walk
I. A control chart of the series detects a linear trend in time and increasing variability.
II. The differenced series follows a white noise model.
III. The standard deviation of the original series is greater than the standard deviation of the differenced series.

Options:
A
I only
B
II only
C
III only
D
I, II and III
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: D

Solution: See Page 242 of Regression Modeling with Actuarial and Financial Applications. I is true because a random walk is characterized by a linear trend and increasing variability.

II is true because differencing removes the linear trend and stabilizes the variance. III is true as both the linear trend and the increasing variability contribute to a higher standard deviation.
Question: You are given a set of \(n\) observations, each with \(p\) features. Determine which of the following statements is/are true with respect to clustering methods.
I. The \(n\) observations can be clustered on the basis of the \(p\) features to identify subgroups among the observations.
II. The \(p\) features can be clustered on the basis of the \(n\) observations to identify subgroups among the features.
III. Clustering is an unsupervised learning method and is often performed as part of an exploratory data analysis.

Options:
A
None
B
I and II only
C
I and III only
D
II and III only
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: E

Solution: I and II are both true because the roles of rows and columns can be reversed in the clustering algorithm. (See Section 10.3 of An Introduction to Statistical Learning.)
III is true. Clustering is unsupervised learning because there is no dependent (target) variable. It can be used in exploratory data analysis to learn about relationships between observations or features.
Question: Determine which of the following statements is/are true about clustering methods:
I. If \(K\) is held constant, \(K\)-means clustering will always produce the same cluster assignments.
II. Given a linkage and a dissimilarity measure, hierarchical clustering will always produce the same cluster assignments for a specific number of clusters.
III. Given identical data sets, cutting a dendrogram to obtain five clusters produces the same cluster assignments as \(K\)-means clustering with \(K=5\).

Options:
A
I only
B
II only
C
III only
D
I, II and III
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: B

Solution: I is false. \(K\)-means clustering is subject to the random initial assignment of clusters.
II is true. Hierarchical clustering is deterministic, not requiring a random initial assignment.
III is false. The two methods differ in their approaches and hence may not yield the same clusters.
Question: Determine which of the following statements about hierarchical clustering is/are true.
I. The method may not assign extreme outliers to any cluster.
II. The resulting dendrogram can be used to obtain different numbers of clusters.
III. The method is not robust to small changes in the data.

Options:
A
None
B
I and II only
C
I and III only
D
II and III only
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: D

Solution: I is false. All observations are assigned to a cluster.
II is true. By cutting the dendrogram at different heights, any number of clusters can be obtained.

III is true. Clustering methods have high variance, that is, having a different random sample from the population can lead to different clustering.
Question: Analysts \(\mathrm{W}, \mathrm{X}, \mathrm{Y}\), and Z are each performing Principal Components Analysis on the same data set with three variables. They use different programs with their default settings and discover that they have different factor loadings for the first principal component. Their loadings are:

\begin{tabular}{|l|c|c|c|}
\hline & Variable 1 & Variable 2 & Variable 3 \\
\hline W & -0.549 & -0.594 & 0.587 \\
\hline X & -0.549 & 0.594 & 0.587 \\
\hline Y & 0.549 & -0.594 & -0.587 \\
\hline Z & 0.140 & -0.570 & -0.809 \\
\hline
\end{tabular}

Determine which of the following is/are plausible explanations for the different loadings.
I. Loadings are unique up to a sign flip and hence X 's and Y 's programs could make different arbitrary sign choices.
II. Z's program defaults to not scaling the variables while Y's program defaults to scaling them.
III. Loadings are unique up to a sign flip and hence W's and X's programs could make different arbitrary sign choices.

Options:
A
None
B
I and II only
C
I and III only
D
II and III only
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: B

Solution: I is true. Uniqueness up to a sign flip means all three signs must be flipped. This is true for X and Y .

II is true. The presence of absence of scaling can change the loadings.
III is false. Uniqueness up to a sign flip means all three signs must be flipped. For W and X only the second loading is flipped.
Question: You are given two models:

Model L: \(\quad y_{t}=\beta_{0}+\beta_{1} t+\varepsilon_{t}\)
where \(\left\{\varepsilon_{t}\right\}\) is a white noise process, for \(t=0,1,2, \ldots\)
Model M: \(\quad y_{t}=y_{0}+\mu_{c} t+u_{t}\)
\(c_{t}=y_{t}-y_{t-1}\)
\(u_{t}=\sum_{j=1}^{t} \varepsilon_{j}\)
where \(\left\{\varepsilon_{t}\right\}\) is a white noise process, for \(t=0,1,2, \ldots\)

Determine which of the following statements is/are true.
I. Model L is a linear trend in time model where the error component is not a random walk.
II. Model M is a random walk model where the error component of the model is also a random walk.
III. The comparison between Model L and Model M is not clear when the parameter \(\mu_{c}=0\).

Options:
A
I only
B
II only
C
III only
D
I, II and III
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: D

Solution: I is true. See formula (7.8) in the Frees text.
II. is true. See formula (7.9) in the Frees text.

III is true. The only difference is the error terms, which are difficult to compare. See page 243 in the Frees text.
Question: Determine which of the following statements about clustering is/are true.
I. Cutting a dendrogram at a lower height will not decrease the number of clusters.
II. \(K\)-means clustering requires plotting the data before determining the number of clusters.
III. For a given number of clusters, hierarchical clustering can sometimes yield less accurate results than \(K\)-means clustering.

Options:
A
None
B
I and II only
C
I and III only
D
II and III only
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: C

Solution: I is true. At the lowest height, each observation is its own cluster. The number of clusters decreases as the height increases.

II is false. There is no need to plot the data to perform \(K\)-means clustering.
III is true. \(K\)-means does a fresh analysis for each value of \(K\) while for hierarchical clustering, reduction in the number of clusters is tied to clusters already made. This can miss cases where the clusters are not nested.
Question: For a random forest, let \(p\) be the total number of features and \(m\) be the number of features selected at each split.
Determine which of the following statements is/are true.
I. When \(m=p\), random forest and bagging are the same procedure.
II. \(\quad \frac{p-m}{p}\) is the probability a split will not consider the strongest predictor.
III. The typical choice of \(m\) is \(\frac{p}{2}\).

Options:
A
None
B
I and II only
C
I and III only
D
II and III only
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: B

Solution: I is true. Random forests differ from bagging by setting \(m<p\).
II is true. \(p-m\) represents the splits not chosen.
III is false. Typical choices are the square root of \(p\) or \(p / 3\).
Question: Two actuaries are analyzing dental claims for a group of \(n=100\) participants. The predictor variable is sex, with 0 and 1 as possible values.

Actuary 1 uses the following regression model:
\[
Y=\beta+\varepsilon
\]

Actuary 2 uses the following regression model:
\[
Y=\beta_{0}+\beta_{1} \times \operatorname{Sex}+\varepsilon
\]

The residual sum of squares for the regression of Actuary 2 is 250,000 and the total sum of squares is 490,000.

Calculate the \(F\)-statistic to test whether the model of Actuary 2 is a significant improvement over the model of Actuary 1.

Options:
A
92
B
93
C
94
D
95
E
96

Correct answer: C

Solution: The model of Actuary 1 is the null model and hence values from it are not needed. The solution is \(F=\frac{(T S S-R S S) / 1}{R S S /(n-2)}=\frac{490,000-250,000}{250,000 / 98}=94.08\).
Question: A time series was observed at times \(0,1, \ldots, 100\). The last four observations along with estimates based on exponential and double exponential smoothing with \(w=\) 0.8 are:

\begin{tabular}{|l|c|c|c|c|}
\hline Time \((t)\) & 97 & 98 & 99 & 100 \\
\hline Observation \(\left(y_{t}\right)\) & 96.9 & 98.1 & 99.0 & 100.2 \\
\hline Estimates \(\left(\hat{s}_{t}^{(1)}\right)\) & 93.1 & 94.1 & 95.1 & \\
\hline Estimates \(\left(\hat{s}_{t}^{(2)}\right)\) & 88.9 & 89.9 & & \\
\hline
\end{tabular}

All forecasts should be rounded to one decimal place and the trend should be rounded to three decimal places.

Let \(F\) be the predicted value of \(y_{102}\) using exponential smoothing with \(w=0.8\).
Let \(G\) be the predicted value of \(y_{102}\) using double exponential smoothing with \(w=0.8\).

Calculate the absolute difference between \(F\) and \(G,|F-G|\).

Options:
A
0.0
B
2.1
C
4.2
D
6.3
E
8.4

Correct answer: D

Solution: The smoothed forecast at 100 is \(0.2(100.2)+0.8(95.1)=96.1\). This is also the forecast at 102.

The smoothed values are at 99: \(0.2(95.1)+0.8(89.9)=90.9\). At 100: \(0.2(96.1)+ 0.8(90.9)=91.9\). The trend is \(0.2(96.1-91.9) / .8=1.05\). The intercept (value at 100) is \(2(96.1)-91.9=100.3\). The forecast at time 102 is \(100.3+2(1.05)=102.4\).

The difference is 6.3.
Question: Trish runs a regression on a data set of \(n\) observations. She then calculates a \(95 \%\) confidence interval \((t, u)\) on \(y\) for a given set of predictors. She also calculates a \(95 \%\) prediction interval \((v, w)\) on \(y\) for the same set of predictors.

Determine which of the following must be true.
I. \(\quad \lim _{n \rightarrow \infty}(u-t)=0\)
II. \(\quad \lim _{n \rightarrow \infty}(w-v)=0\)
III. \(w-v>u-t\)

Options:
A
None
B
I and II only
C
I and III only
D
II and III only
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: C

Solution: I is true. A confidence interval reflects the error in estimating the expected value. With an infinite amount of data, the error goes to zero.

II is false. A prediction interval also reflects the uncertainty in the predicted observation. That uncertainty is independent of the sample size and thus the interval cannot go to zero. III is true. The additional uncertainty in making predictions about a future value as compared to estimating its expected value leads to a wider interval.
Question: Determine which of the following statements regarding statistical learning methods is/are true.
I. Methods that are highly interpretable are more likely to be highly flexible.
II. When inference is the goal, there are clear advantages to using a lasso method versus a bagging method.
III. Using a more flexible method will produce a more accurate prediction against unseen data.

Options:
A
I only
B
II only
C
III only
D
I, II and III
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: B

Solution: I is false. Highly flexible models are harder to interpret. For example, a ninth degree polynomial is harder to interpret than a straight line.

II is true. Inference is easier when using simple and relatively inflexible methods. Lasso is simpler and less flexible than bagging.

III is false. Flexible methods tend to overfit the training set and be less accurate when applied to unseen data.
Question: Determine which of the following statements is/are true about Pearson residuals.
I. They can be used to calculate a goodness-of-fit statistic.
II. They can be used to detect if additional variables of interest can be used to improve the model specification.
III. They can be used to identify unusual observations.

Options:
A
I only
B
II only
C
III only
D
I, II, and III
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: D

Solution: I is true. See Page 348 of Frees.
II is true. See Page 347 of Frees.
III is true. See Page 347 of Frees.
Question: You are given the following eight observations from a time series that follows a random walk model:

\begin{tabular}{|l|c|c|c|c|c|c|c|c|}
\hline Time \((t)\) & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 \\
\hline Observation \(\left(y_{t}\right)\) & 3 & 5 & 7 & 8 & 12 & 15 & 21 & 22 \\
\hline
\end{tabular}

You plan to fit this model to the first five observations and then evaluate it against the last three observations using one-step forecast residuals. The estimated mean of the white noise process is 2.25 .

Let \(F\) be the mean error (ME) of the three predicted observations.

Let \(G\) be the mean square error (MSE) of the three predicted observations.

Calculate the absolute difference between \(F\) and \(G,|F-G|\).

Options:
A
3.48
B
4.31
C
5.54
D
6.47
E
7.63

Correct answer: B

Solution: The three one-step predicted values are \(12+2.25=14.25 ; 15+2.25=17.25\); and \(21+2.25 =23.25\). The errors are \(15-14.25=0.75 ; 21-17.25=3.75\); and \(22-23.25=-1.25\).
\(F=(0.75+3.75-1.25) / 3=1.083\)
\(G=\left(0.75^{2}+3.75^{2}+1.25^{2}\right) / 3=5.396\)
The absolute difference is 4.313.
Question: You are given the following six observed values of the autoregressive model of order one time series
\[
y_{t}=\beta_{0}+\beta_{1} y_{t-1}+\varepsilon_{t} \text { with } \operatorname{Var}\left(\varepsilon_{t}\right)=\sigma^{2}
\]

\begin{tabular}{|c|c|c|c|c|c|c|}
\hline\(t\) & 1 & 2 & 3 & 4 & 5 & 6 \\
\hline\(y_{t}\) & 31 & 35 & 37 & 41 & 45 & 51 \\
\hline
\end{tabular}

The approximation to the conditional least squares method is used to estimate \(\beta_{0}\) and \(\beta_{1}\).

Calculate the mean squared error \(s^{2}\) that estimates \(\sigma^{2}\).

Options:
A
13
B
21
C
22
D
26
E
35

Correct answer: C

Solution: The estimate of \(\beta_{1}\) is
\[
b_{1}=r_{1}=\frac{\begin{array}{c}
(31-40)(35-40)+(35-40)(37-40)+(37-40)(41-40) \\
+(41-40)(45-40)+(45-40)(51-40)
\end{array}}{(31-40)^{2}+(35-40)^{2}+(37-40)^{2}+(41-40)^{2}+(45-40)^{2}+(51-40)^{2}}=\frac{117}{262}=0.4466
\]

The estimator of \(\beta_{0}\) is \(b_{0}=\bar{y}\left(1-r_{1}\right)=22.136\).
The residuals are then
\(e_{2}=35-(22.136+0.4466 \times 31)=-0.9806\)
\(e_{3}=37-(22.136+0.4466 \times 35)=-0.7670\)
\(e_{4}=41-(22.136+0.4466 \times 37)=2.3398\)
\(e_{5}=45-(22.136+0.4466 \times 41)=4.5534\)
\(e_{6}=51-(22.136+0.4466 \times 45)=8.7670\).
The average residual is \(\bar{e}=2.78252\) and then the mean square error is
\[
s^{2}=\frac{(-0.9806-2.78252)^{2}+(-0.7670-2.78252)^{2}+(2.3398-2.78252)^{2}}{+(4.5534-2.78252)^{2}+(8.7670-2.78252)^{2}}=21.969 .
\]
Question: You apply 2-means clustering to a set of five observations with two features. You are given the following initial cluster assignments:

\begin{tabular}{|l|l|l|l|}
\hline Observation & \(X 1\) & \(X 2\) & Initial cluster \\
\hline 1 & 1 & 3 & 1 \\
\hline 2 & 0 & 4 & 1 \\
\hline 3 & 6 & 2 & 1 \\
\hline 4 & 5 & 2 & 2 \\
\hline 5 & 1 & 6 & 2 \\
\hline
\end{tabular}

Calculate the total within-cluster variation of the initial cluster assignments, based on Euclidean distance measure.

Options:
A
32.0
B
70.3
C
77.3
D
118.3
E
141.0

Correct answer: C

Solution: The means for cluster 1 are \((1+0+6) / 3=2.3333\) for \(X 1\) and \((3+4+2) / 3=3\) for \(X 2\) and the variation is
\[
(1-2.3333)^{2}+(3-3)^{2}+(0-2.3333)^{2}+(4-3)^{2}+(6-2.3333)^{2}+(2-3)^{2}=22.6667 .
\]

The means for cluster 2 are \((5+1) / 2=3\) for \(X 1\) and \((2+6) / 2=4\) for \(X 2\) and the variation is \((5-3)^{2}+(2-4)^{2}+(1-3)^{2}+(6-4)^{2}=16\).

The total within-cluster variation is (per equation (10.12) in the first edition of \(I S L R\) ) \(2(22.6667+16)=77.33\).
Question: Determine which of the following statements about selecting the optimal number of clusters in \(K\)-means clustering is/are true.
I. \(\quad K\) should be set equal to \(n\), the number of observations.
II. Choose \(K\) such that the total within-cluster variation is minimized.
III. The determination of \(K\) is subjective and there does not exist one method to determine the optimal number of clusters.

Options:
A
I only
B
II only
C
III only
D
I, II and III
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: C

Solution: I is false. Setting \(K=n\) will almost certainly overfit as there are unlikely to be that many true clusters.

II is false. Within-cluster variation is minimized when \(K=n\), which as noted above is unlikely to be optimal.
III is true. There is no exact method for determining the optimal value of \(K\).
Question: A linear model has been fit to a dataset containing six predictor variables, \(\mathrm{F}, \mathrm{G}, \mathrm{H}\), I, J, and K. Determine which of the following statements regarding using Akaike information criterion (AIC) or Bayesian information criterion (BIC) to select an optimal set of predictor variables for this linear model is/are true.
I. AIC and BIC provide a direct estimate of the test error.
II. When choosing between the subsets \(\{\mathrm{F}, \mathrm{G}, \mathrm{H}\}\) and \(\{\mathrm{I}, \mathrm{J}, \mathrm{K}\}\), AIC will always select the same subset as BIC.
III. For large sample sizes ( \(n>7\) ), the number of variables selected by BIC will be less than or equal to the number selected by AIC.

Options:
A
None
B
I and II only
C
I and III only
D
II and III only
E
The correct answer is not given by (A), (B), (C), or (D).

Correct answer: D

Solution: I is false, AIC and BIC make an indirect estimate by adjusting the training error.
II is true, for a fixed value of the number of predictors, the two provide the same ranking.
III is true as for \(n>7\), BIC provides a greater penalty for additional variables, and hence will select a number less than equal to that selected by AIC.
Question: A and B each attempt a task 10 times. A is successful 8 out of 10 times while \(B\) is successful 2 out of 10 times. They fit a logistic regression model to predict an individual's success with linear term \(\beta_{0}+\beta_{1} X\), where \(X\) is an indicator variable for individual A .

The full model estimates that \(A\) will be successful \(80 \%\) of the time and \(B\) will be successful \(20 \%\) of the time. Under the null hypothesis that \(\beta_{1}=0\), the estimate is that both \(A\) and \(B\) will be successful \(50 \%\) of the time. The likelihood ratio test is applied to the logistic regression model.

Determine the lowest available significance level at which the null hypothesis is rejected.

Options:
A
0.100
B
0.050
C
0.025
D
0.010
E
0.005

Correct answer: D

Solution: In the full model, there are 16 outcomes with a probability of 0.8 and 4 outcomes with a probability of 0.2 , so the loglikelihood is \(16 \ln 0.8+4 \ln 0.2=-10.01\). In the reduced model, the probability of each of the 20 outcomes is 0.5 , so the loglikelihood is \(20 \ln 0.5 =-13.86\).

The likelihood ratio test statistic (equal to twice the difference in loglikelihoods) has a chi-square distribution with degrees of freedom equal to the difference in the number of explanatory variables, in this case 1 . The test statistic is \(2(-10.01-(-13.86))=7.71\). The critical values for one degree of freedom are 6.635 and 7.879 for \(p=0.010\) and 0.005 respectively, so the null hypothesis can be rejected at 0.010 but not 0.005 .
Question: In a random forest, a random sample of \(m\) predictors is selected from the full set of \(p\) predictors. Determine which of the following statements are true:
I. The \(m\) predictors are sampled with replacement.
II. The \(m\) predictors are sampled without replacement.
III. A fresh sample of \(m\) predictors are selected for each split.
IV. A fresh sample of \(m\) predictors are selected for each tree, but not for each split.

Options:
A
Only I and III are true.
B
Only I and IV are true.
C
Only II and III are true.
D
Only II and IV are true.
E
Fewer than two of the statements are true.

Correct answer: C

Solution: II and III are true. Random forests require that the predictors be sampled without replacement. If not, the same predictor could be selected more than once and thus fewer than \(m\) predictors would be used. While it is possible to draw a fresh sample for each tree, that is not the definition of a random forest.
Question: You are fitting a boosted regression tree with shrinkage parameter \(\lambda=0.08\). There is a single numeric predictor variable, \(x\), and the target variable is \(y\). Each tree is to have a single split. The first tree, built using all the training data has the following split:
- If \(\mathrm{x}<17.5\), then the predicted value of y is 125.4 .
- If \(x \geq 17.5\), then the predicted value of \(y\) is 350.5 .

The following are three observations from the training set:

\begin{tabular}{|l|c|c|}
\hline Observation & x & y \\
\hline 1 & 15.2 & 139 \\
\hline 2 & 12.9 & 156 \\
\hline 3 & 23.6 & 289 \\
\hline
\end{tabular}

Calculate the updated predictions for these three observations \(\left(\hat{f}\left(x_{1}\right), \hat{f}\left(x_{2}\right), \hat{f}\left(x_{3}\right)\right)\).

Options:
A
\(\quad(-406.1,-389.1,-31.1)\)
B
\(\quad(-211.4,-194.4,163.6)\)
C
\(\quad(10.0,10.0,28.0)\)
D
\(\quad(111.0,128.0,279.0)\)
E
\(\quad(129.0,146.0,261.0)\)

Correct answer: C

Solution: The initial fitted values are all zero They are updated by adding \(\lambda\) times the prediction from the tree. For the three observations the predictions are 125.4, 125.4, and 350.5. The updated predictions are \(0+0.08(125.4)=10.0,0+0.08(125.4)=10.0\), and \(0+ 0.08(350.5)=28.0\).
Question: An analyst is modeling the probability of a certain phenomenon occurring. The analyst has observed that the simple linear model currently in use results in predicted values less than zero and greater than one.

Determine which of the following is the most appropriate way to address this issue.

Options:
A
Limit the data to observations that are expected to result in predicted values between 0 and 1.
B
Consider predicted values below 0 as 0 and values above 1 as 1 .
C
Use a logit function to transform the linear model into only predicting values between 0 and 1 .
D
Use the canonical link function for the Poisson distribution to transform the linear model into only predicting values between 0 and 1 .
E
None of the above.

Correct answer: C

Solution: (A) is not appropriate because removing data will likely bias the model estimates.
(B) is not appropriate because altering data will likely bias the model estimates.
(C) is correct.
(D) is not appropriate because the canonical link function is the logarithm, which will not restrict values to the range zero to one.