Advanced Quantitative Methods 360-301 • CEGEP, Montreal

Corrected practice final exam: advanced quantitative methods (360-301)

This three-hour practice exam covers the whole Advanced Quantitative Methods course, 360-301, in the CEGEP Social Science program: comparing two groups with the independent-samples and paired t-tests, effect size and power (exercises 1 and 2), one-way analysis of variance and multiple comparisons (exercises 3 and 4), multiple regression and model diagnostics (exercises 5 and 6), the Kruskal-Wallis nonparametric test (exercise 7), and time series with seasonal indices (exercise 8).

The thread of the paper is that of the whole course: each exercise first asks for the right calculation, then for the sentence that calculation allows you to write. A rejection or a failure to reject never stands alone, it comes with an effect size and a limit of the design.

The ten exercises are worth ten marks each. The first five are about tests and models, the next five about diagnostics and critical reading: five statements to correct (exercise 9) and a research report to evaluate from start to finish (exercise 10).

10 corrected exercises • 100 points • 180 minutes

This chapter is part of 360-301, every chapter with its set and sheet

Self-checking set Type your answers and check them question by question: the page tells you right or wrong before you open the solution. With an account, every answer right on the first try earns points, and your right answers stay filled in when you come back.

Course recap

  • • Independent-samples t-test: sp2=(n1−1)s12+(n2−1)s22n1+n2−2s_{p}^{2}=\dfrac{\left(n_{1}-1\right)s_{1}^{2}+\left(n_{2}-1\right)s_{2}^{2}}{n_{1}+n_{2}-2}, df=n1+n2−2df=n_{1}+n_{2}-2. Paired samples: we test the differences, df=n−1df=n-1.
  • • Cohen's d=gapsd=\dfrac{\text{gap}}{s}: 0.2 small, 0.5 medium, 0.8 large. Sample size for 80% power: 2(1.96+0.84)2d2\dfrac{2\left(1.96+0.84\right)^{2}}{d^{2}} per group, without the factor 2 for paired samples.
  • • Analysis of variance: MS=SSdfMS=\dfrac{SS}{df}, F=MSbetweenMSwithinF=\dfrac{MS_{between}}{MS_{within}}, η2=SSbetweenSStotal\eta^{2}=\dfrac{SS_{between}}{SS_{total}}.
  • • Post hoc comparisons: SE=MSwithin(1n1+1n2)SE=\sqrt{MS_{within}\left(\dfrac{1}{n_{1}}+\dfrac{1}{n_{2}}\right)}, threshold corrected by Bonferroni, minimum detectable difference =tcrit×SE=t_{crit}\times SE.
  • • Regression: t=bSEt=\dfrac{b}{SE}, Radj2=1−(1−R2)n−1n−k−1R_{adj}^{2}=1-\left(1-R^{2}\right)\dfrac{n-1}{n-k-1}, standardized coefficients for comparing.
  • • U-shaped residuals: nonlinearity, to be fixed with a quadratic term or a transformation. Funnel-shaped residuals: heteroscedasticity.
  • • VIF=11−Rj2VIF=\dfrac{1}{1-R_{j}^{2}}; the standard error is multiplied by VIF\sqrt{VIF}. A categorical variable with kk categories takes k−1k-1 indicator variables.
  • • Mann-Whitney: Uj=Rj−nj(nj+1)2U_{j}=R_{j}-\dfrac{n_{j}\left(n_{j}+1\right)}{2}; we reject if the smaller UU is LESS THAN OR EQUAL TO the cutoff.
  • • Kruskal-Wallis: H=12N(N+1)∑Rj2nj−3(N+1)H=\dfrac{12}{N(N+1)}\sum \dfrac{R_{j}^{2}}{n_{j}}-3\left(N+1\right), compared with a chi-square at k−1k-1 degrees of freedom.
  • • Time series: seasonal indices that sum to pp; deseasonalize by dividing by the index; forecast the trend, then multiply back by the index.
  • • Regression toward the mean: z2=r z1z_{2}=r\,z_{1}. By itself it explains the improvement of any group selected on an extreme value.

Part A: tests and models (/50)

Exercise 1: Comparing two independent groups

Treated group: 32 students, mean 76.8, standard deviation 7.4. Control group: 30 students, mean 72.1, standard deviation 8.9. Two-tailed critical value at 60 degrees of freedom: 2.000.

50607080901000.010.020.030.040.050.06control: 72.1treated: 76.8
  • a) State the hypotheses and compute the pooled variance.
  • b) Compute the standard error of the difference, the statistic tt and the degrees of freedom.
  • c) Conclude at the 5% level.
  • d) Compute the effect size and the confidence interval of the difference.
  • e) Check the condition of homogeneity of variances using the variance ratio.

Type your answers, the page tells you right or wrong 0/13

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) H0H_{0}: μ1=μ2\mu_{1}=\mu_{2}; sp2≈66.578s_{p}^{2}\approx 66.578 and sp≈8.160s_{p}\approx 8.160
  • b) SE≈2.074SE\approx 2.074, t=4.72.074≈2.267t=\dfrac{4.7}{2.074}\approx 2.267, at 6060 degrees of freedom
  • c) 2.267>2.0002.267>2.000: reject, p-value close to 0.0270.027
  • d) d≈0.576d\approx 0.576, medium effect; interval [0.552, 8.848][0.552,\ 8.848] points
  • e) F=79.2154.76≈1.447F=\dfrac{79.21}{54.76}\approx 1.447, well under 4: homogeneity acceptable
a)

H0: μ1=μ2H_{0}:\ \mu_{1}=\mu_{2}; H1: μ1≠μ2H_{1}:\ \mu_{1}\neq \mu_{2}. Pooled variance: sp2=31×7.42+29×8.9260=31×54.76+29×79.2160=1,697.56+2,297.0960=3,994.6560≈66.578s_{p}^{2}=\dfrac{31\times 7.4^{2}+29\times 8.9^{2}}{60}=\dfrac{31\times 54.76+29\times 79.21}{60}=\dfrac{1{,}697.56+2{,}297.09}{60}=\dfrac{3{,}994.65}{60}\approx 66.578, so sp≈8.160s_{p}\approx 8.160.

b)

SE=8.160132+130=8.1600.03125+0.033333=8.160×0.254131≈2.0738SE=8.160\sqrt{\dfrac{1}{32}+\dfrac{1}{30}}=8.160\sqrt{0.03125+0.033333}=8.160\times 0.254131\approx 2.0738. t=76.8−72.12.0738=4.72.0738≈2.267t=\dfrac{76.8-72.1}{2.0738}=\dfrac{4.7}{2.0738}\approx 2.267, with 32+30−2=6032+30-2=60 degrees of freedom.

c)

2.267>2.0002.267>2.000: we REJECT the null hypothesis. The difference of 4.7 points is significant at the 5% level; the p-value is about 0.027.

d)

d=4.78.160≈0.576d=\dfrac{4.7}{8.160}\approx 0.576, a MEDIUM effect. Confidence interval: 4.7±2.000×2.0738=4.7±4.1484.7\pm 2.000\times 2.0738=4.7\pm 4.148, that is [0.552, 8.848]\left[0.552,\ 8.848\right] points. The interval excludes zero, which agrees with the rejection, and it shows that the true difference could be as small as half a point or as large as nearly nine points: the result is established but imprecise.

e)

F=8.927.42=79.2154.76≈1.447F=\dfrac{8.9^{2}}{7.4^{2}}=\dfrac{79.21}{54.76}\approx 1.447. The ratio stays well below 4, the usual cutoff when the sample sizes are similar: the homogeneity of variances is acceptable and the classic t-test can be used. With more unbalanced variances, we would have switched to the Welch correction.

Tick the exercises you have done or want to review: a free account, no password, keeps your ticks and your right answers from one visit to the next, tells you which chapter to tackle next and lets you ask for the exercise you are missing. Create your space, an email is enough.

Exercise 2: Paired samples, effect size and power

Twelve students are measured before and after a workshop. The mean of the differences is 2.4 points, and their standard deviation 3.6. Two-tailed critical value at 11 degrees of freedom: 2.201.

  • a) Compute the standard error of the mean of the differences and the statistic tt.
  • b) Conclude at the 5% level.
  • c) Compute the effect size and interpret it.
  • d) How many pairs would be needed to detect an effect of this size with 80% power?
  • e) What can be concluded from the observed improvement, from the standpoint of the design?

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) SE=3.612≈1.039SE=\dfrac{3.6}{\sqrt{12}}\approx 1.039 and t≈2.309t\approx 2.309, at 1111 degrees of freedom
  • b) 2.309>2.2012.309>2.201: reject, just barely, p-value close to 0.0410.041
  • c) d=2.43.6≈0.667d=\dfrac{2.4}{3.6}\approx 0.667: medium to large effect
  • d) 7.840.4449≈17.6\dfrac{7.84}{0.4449}\approx 17.6, that is 1818 pairs
  • e) Nothing about the workshop: without a control group, maturation, testing, history and regression remain open
a)

SE=sdn=3.612=3.63.4641≈1.0392SE=\dfrac{s_{d}}{\sqrt{n}}=\dfrac{3.6}{\sqrt{12}}=\dfrac{3.6}{3.4641}\approx 1.0392. t=2.41.0392≈2.309t=\dfrac{2.4}{1.0392}\approx 2.309, with n−1=11n-1=11 degrees of freedom.

b)

2.309>2.2012.309>2.201: we REJECT. The mean improvement of 2.4 points is significant at the 5% level, the p-value being about 0.041. The result is therefore established, but only just.

c)

d=d‾sd=2.43.6≈0.667d=\dfrac{\overline{d}}{s_{d}}=\dfrac{2.4}{3.6}\approx 0.667, which corresponds to a MEDIUM to LARGE effect by the usual benchmarks. In other words, the typical improvement is worth two thirds of the spread of the individual improvements, which is appreciable.

d)

n≈(1.96+0.84)2d2=7.840.4449≈17.6n\approx \dfrac{\left(1.96+0.84\right)^{2}}{d^{2}}=\dfrac{7.84}{0.4449}\approx 17.6, that is 18 pairs. With 12 pairs, the study was therefore slightly undersized, and the narrow rejection was to be expected.

e)

From the standpoint of the design, nothing is shown about the workshop. A before-and-after study without a control group leaves maturation, testing, history and, if the participants were chosen for a poor initial result, regression toward the mean all open. The test establishes that there was an improvement; it does not establish that the improvement comes from the workshop. A waitlist experiment would be needed, in which the individual improvements of the students drawn by lot would be compared with those of the students not drawn.

Exercise 3: One-way analysis of variance

Four mentoring methods, ten students each. Sum of squares between groups: 486.0. Sum of squares within groups: 2,340.0. Critical value of FF at 3 and 36 degrees of freedom: 2.87.

60646872768084A: 68.2B: 71.5C: 74.8D: 72.9group means, ten students each
  • a) Give the degrees of freedom and the total sum of squares.
  • b) Compute the two mean squares and the statistic FF.
  • c) Conclude at the 5% level.
  • d) Compute η2\eta^{2} and compare it with the conclusion of the test.
  • e) What would it take to settle the question?

Type your answers, the page tells you right or wrong 0/12

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 33, 3636 and 3939; total sum of squares 2,826.02{,}826.0
  • b) MSbetween=162.0MS_{between}=162.0, MSwithin=65.0MS_{within}=65.0, so F≈2.492F\approx 2.492
  • c) 2.492<2.872.492<2.87: fail to reject, p-value close to 0.0760.076
  • d) η2≈0.172\eta^{2}\approx 0.172, a LARGE effect that the test does not detect: underpowered study
  • e) f≈0.456f\approx 0.456: about 15 to 16 subjects per group would be needed instead of 10
a)

Degrees of freedom: between, k−1=4−1=3k-1=4-1=3; within, N−k=40−4=36N-k=40-4=36; total, N−1=39N-1=39. Total sum of squares: 486.0+2,340.0=2,826.0486.0+2{,}340.0=2{,}826.0. We check that 3+36=393+36=39.

b)

MSbetween=486.03=162.0MS_{between}=\dfrac{486.0}{3}=162.0 and MSwithin=2,340.036=65.0MS_{within}=\dfrac{2{,}340.0}{36}=65.0. F=162.065.0≈2.492F=\dfrac{162.0}{65.0}\approx 2.492.

c)

2.492<2.872.492<2.87: we FAIL TO REJECT. The data do not allow us to conclude that the four methods differ at the 5% level. The p-value is about 0.076, so the result is close to the threshold without reaching it.

d)

η2=486.02,826.0≈0.172\eta^{2}=\dfrac{486.0}{2{,}826.0}\approx 0.172. The mentoring method therefore accounts for 17.2% of the variance in the results, which is well above the 0.14 benchmark for a LARGE effect. So there is a substantial effect that the test does not detect: this is an underpowered study, and simply reporting “no significant difference” would be downright misleading here.

e)

More subjects are needed. For an effect of this size, expressed as f=η21−η2=0.1720.828≈0.456f=\sqrt{\dfrac{\eta^{2}}{1-\eta^{2}}}=\sqrt{\dfrac{0.172}{0.828}}\approx 0.456, 80% power with four groups requires about 15 to 16 subjects per group, against 10 here. In other words, about twenty to twenty-five more students would probably be enough to settle it, and that is exactly what the conclusion of the report should recommend rather than concluding that the methods are equivalent.

Exercise 4: Multiple comparisons

We resume the previous analysis, assuming this time that the overall test rejected. The four means are 68.2, 71.5, 74.8 and 72.9, with MSwithin=65.0MS_{within}=65.0 and ten students per group.

  • a) How many pairwise comparisons are there? What is the overall risk without correction?
  • b) Compute the standard error of a difference between two means.
  • c) The Bonferroni correction gives a critical value of 2.79. Compute the minimum detectable difference.
  • d) Which pairs exceed this gap?
  • e) Write the conclusion of the comparisons.

Type your answers, the page tells you right or wrong 0/8

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 66 comparisons; overall risk 1−0.956≈26.5%1-0.95^{6}\approx 26.5\%
  • b) 65.0×0.2≈3.606\sqrt{65.0\times 0.2}\approx 3.606
  • c) 2.79×3.606≈10.062.79\times 3.606\approx 10.06 points
  • d) None: the largest gap, C minus A, is 6.66.6 points
  • e) At least one method stands out, without our being able to say which: a consequence of ten per group
a)

4×32=6\dfrac{4\times 3}{2}=6 comparisons. Without correction, the risk of wrongly concluding at least once is 1−0.956≈0.26491-0.95^{6}\approx 0.2649, close to 27% instead of 5%.

b)

SE=MSwithin(110+110)=65.0×0.2=13.0≈3.6056SE=\sqrt{MS_{within}\left(\dfrac{1}{10}+\dfrac{1}{10}\right)}=\sqrt{65.0\times 0.2}=\sqrt{13.0}\approx 3.6056. The standard error is the same for all six pairs since the sample sizes are equal.

c)

Minimum detectable difference: 2.79×3.6056≈10.062.79\times 3.6056\approx 10.06 points. Any difference between means smaller than 10.1 points will be declared not significant after correction.

d)

Observed gaps: C−A=74.8−68.2=6.6C-A=74.8-68.2=6.6; D−A=4.7D-A=4.7; B−A=3.3B-A=3.3; C−B=3.3C-B=3.3; D−B=1.4D-B=1.4; C−D=1.9C-D=1.9. NO pair reaches 10.1 points. The largest gap, 6.6 points between C and A, stays well below the threshold.

e)

“Since the overall test rejected the hypothesis that the means are equal, six pairwise comparisons were carried out with a Bonferroni correction. No pair reaches the threshold: the minimum detectable difference is 10.1 points, and the largest observed gap, between methods C and A, is 6.6 points. The study therefore establishes that at least one method stands out, without being able to say which, which is a direct consequence of the sample size of ten students per group.” This situation, in which the omnibus test rejects and no comparison follows, is common and must be reported as it stands rather than hidden.

Exercise 5: Multiple regression: reading and prediction

On 180 students: y^=38.5+0.42x1+0.91x2−0.28x3\hat{y}=38.5+0.42x_{1}+0.91x_{2}-0.28x_{3}, where x1x_{1} is the high school average, x2x_{2} the hours of study and x3x_{3} the hours of paid work. Standard errors: 0.058, 0.240, 0.090. R2=0.47R^{2}=0.47. Critical value: 1.974.

  • a) Compute the three tt statistics and conclude for each.
  • b) Interpret the coefficient 0.91 in one complete sentence.
  • c) Compute the adjusted R2R^{2}.
  • d) Predict the grade of a student with a high school average of 80, who studies 10 hours and works 15 hours.
  • e) Build the confidence interval of the coefficient for the hours of work.

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) 7.2417.241, 3.7923.792 and −3.111-3.111: all three are significant
  • b) “Holding the high school average and the hours of work constant, one more hour of study is associated with 0.910.91 points”
  • c) 1−0.53×179176≈0.4611-0.53\times \dfrac{179}{176}\approx 0.461
  • d) 38.5+33.6+9.1−4.2=77.038.5+33.6+9.1-4.2=77.0
  • e) [−0.458, −0.102][-0.458,\ -0.102]: ten hours of work cost between 1.01.0 and 4.64.6 points
a)

t1=0.420.058≈7.241t_{1}=\dfrac{0.42}{0.058}\approx 7.241; t2=0.910.240≈3.792t_{2}=\dfrac{0.91}{0.240}\approx 3.792; t3=−0.280.090≈−3.111t_{3}=\dfrac{-0.28}{0.090}\approx -3.111. All three exceed 1.974 in absolute value: the three coefficients are significantly different from zero at the 5% level.

b)

“Holding the high school average and the hours of paid work constant, each additional weekly hour of study is associated with 0.91 more points in the term average.” The holding-constant clause and the word “associated” are both mandatory: since the data are cross-sectional, no causal link is established.

c)

Radj2=1−(1−0.47)179176=1−0.53×1.017045=1−0.539034≈0.461R_{adj}^{2}=1-\left(1-0.47\right)\dfrac{179}{176}=1-0.53\times 1.017045=1-0.539034\approx 0.461. With 180 observations for three variables, the correction costs only about one percentage point.

d)

y^=38.5+0.42×80+0.91×10−0.28×15=38.5+33.6+9.1−4.2=77.0\hat{y}=38.5+0.42\times 80+0.91\times 10-0.28\times 15=38.5+33.6+9.1-4.2=77.0. The prediction concerns the mean of the students with this profile, not the individual.

e)

−0.28±1.974×0.090=−0.28±0.17766-0.28\pm 1.974\times 0.090=-0.28\pm 0.17766, that is [−0.458, −0.102]\left[-0.458,\ -0.102\right]. The interval excludes zero, consistent with the test, and it indicates that ten weekly hours of work cost between 1.0 and 4.6 points of average, other variables held constant: a wide range, but entirely on the same side.

Part B: analysis and critical reading (/50)

Exercise 6: Model diagnostics

Three problems threaten the previous regression. The graph shows the scatter plot of the residuals against the predicted values.

residualpredicted value
  • a) Describe the shape of the scatter plot and name the problem.
  • b) Propose two remedies.
  • c) A fourth variable, strongly correlated with x1x_{1}, is added, so that Rj2=0.78R_{j}^{2}=0.78. Compute the variance inflation factor and its effect on the standard error.
  • d) The variable “field of study” has four categories. How many indicator variables are needed, and how are their coefficients read?
  • e) Five variables are added and R2R^{2} goes from 0.47 to 0.486. Does the model improve?

Type your answers, the page tells you right or wrong 0/13

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) A U: the residuals are positive at the ends and negative in the middle. It is nonlinearity
  • b) Add a quadratic term, or transform the variable; failing that, cut it into classes
  • c) VIF≈4.545VIF\approx 4.545, standard error multiplied by 2.1322.132: tt would go from 7.247.24 to 3.403.40
  • d) 4−1=34-1=3 indicator variables; each coefficient is the mean gap from the reference category
  • e) No: the adjusted value goes from 0.4610.461 to 0.4620.462, one thousandth for five variables
a)

The scatter plot traces a U: the residuals are positive at both ends and negative in the middle. The problem is NONLINEARITY: the true relationship is curved, and the fitted line systematically underestimates at the extremes while overestimating at the center. The coefficients are then perfectly calculated and biased over the whole domain.

b)

First remedy, add a QUADRATIC TERM x2x^{2} to the model, which lets the fit curve. Second remedy, TRANSFORM the variable, with a logarithm if the relationship shows diminishing returns, or with a square root. A third remedy exists: cut the variable into classes and introduce them through indicator variables, which imposes no particular form but uses up degrees of freedom.

c)

VIF=11−0.78=10.22≈4.545VIF=\dfrac{1}{1-0.78}=\dfrac{1}{0.22}\approx 4.545. The standard error is multiplied by 4.545≈2.132\sqrt{4.545}\approx 2.132: that of x1x_{1} would go from 0.058 to 0.1236, and its tt statistic from 7.24 to 3.40. The coefficient would remain significant, but we are already close to the warning threshold of 5 for the variance inflation factor.

d)

We need 4−1=34-1=3 indicator variables, the fourth category serving as the REFERENCE. Each coefficient is read as the mean gap between its field of study and the reference field, other variables held constant. Comparing two fields other than the reference requires an additional test, or rerunning the model with a different reference.

e)

No. Radj2R_{adj}^{2} goes from 1−0.53×179176≈0.4611-0.53\times \dfrac{179}{176}\approx 0.461 to 1−0.514×179171≈0.4621-0.514\times \dfrac{179}{171}\approx 0.462, a gain of one thousandth for five variables. In other words, the five variables add practically nothing beyond what the degrees of freedom they consume cost, and they complicate the interpretation while aggravating the risk of collinearity. The three-variable model remains preferable.

Exercise 7: A nonparametric test

Three groups of five students rate the clarity of a course on a scale from 1 to 10. After ranking the fifteen values, the rank sums are 62 for A, 40 for B and 18 for C.

  • a) Justify the choice of a rank test rather than an analysis of variance.
  • b) Check the total of the rank sums.
  • c) Compute the Kruskal-Wallis statistic HH.
  • d) Conclude at the 5% level, the chi-square critical value at 2 degrees of freedom being 5.991.
  • e) What is the logical next step in the analysis, and what difficulty should be expected?

Type your answers, the page tells you right or wrong 0/10

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) Ordinal variable, five subjects per group, and the mechanical skew of a bounded scale
  • b) 62+40+18=120=15×16262+40+18=120=\dfrac{15\times 16}{2}
  • c) H=0.05×1,153.6−48=9.68H=0.05\times 1{,}153.6-48=9.68
  • d) 9.68>5.9919.68>5.991: reject, p-value close to 0.0080.008
  • e) Pairwise Mann-Whitney tests at the 0.01670.0167 threshold; only a perfect or near-perfect separation will clear it
a)

Three reasons add up. The variable is ORDINAL, a scale from 1 to 10 whose gaps are not guaranteed to be comparable. The sample sizes are very small, five per group, which rules out appealing to the central limit theorem. And a bounded scale produces a mechanical skew as soon as the answers pile up toward one end.

b)

62+40+18=12062+40+18=120, which must equal N(N+1)2=15×162=120\dfrac{N(N+1)}{2}=\dfrac{15\times 16}{2}=120. The check passes: no rank was forgotten or counted twice.

c)

∑Rj2nj=622+402+1825=3,844+1,600+3245=5,7685=1,153.6\sum \dfrac{R_{j}^{2}}{n_{j}}=\dfrac{62^{2}+40^{2}+18^{2}}{5}=\dfrac{3{,}844+1{,}600+324}{5}=\dfrac{5{,}768}{5}=1{,}153.6. Then H=1215×16×1,153.6−3×16=0.05×1,153.6−48=57.68−48=9.68H=\dfrac{12}{15\times 16}\times 1{,}153.6-3\times 16=0.05\times 1{,}153.6-48=57.68-48=9.68.

d)

9.68>5.9919.68>5.991: we REJECT. At least one of the three groups stands out from the others, with a p-value of about 0.008. A customary reservation: with five observations per group, the chi-square approximation is at the edge of its domain, and software would use the exact distribution of HH.

e)

The logical next step is a series of pairwise comparisons by Mann-Whitney tests, with a corrected threshold, 0.053≈0.0167\dfrac{0.05}{3}\approx 0.0167 for three comparisons. The difficulty to expect is that with five observations per group, the smallest possible UU is 0 and the smallest p-value attainable is about 0.008: only a perfect separation, where one group lies entirely above the other (U=0U=0), or a near-perfect one (U=1U=1, p-value about 0.016), will clear the corrected threshold. It is therefore likely that no comparison will be significant even though the overall test was, a situation that has to be reported explicitly.

Exercise 8: Time series and forecasting

Quarterly attendance at a service, annual means: 620, 668 and 710. Seasonal indices: 1.12, 0.85, 1.20, 0.83.

12345550600650700750800620668710year
  • a) Check the sum of the seasonal indices and interpret the one for the second quarter.
  • b) Fit a trend line to the three annual means.
  • c) Forecast the quarterly mean of the fourth year.
  • d) Forecast the four quarters and check their sum.
  • e) The raw series goes from 568 in the second quarter of year 3 to 852 in the third quarter. Compute the raw change, then the deseasonalized change.

Type your answers, the page tells you right or wrong 0/16

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) Sum 4.004.00; the second quarter is structurally 15%15\% below the average of its year
  • b) y^=576+45x\hat{y}=576+45x
  • c) 576+180=756576+180=756 visits per quarter
  • d) 846.7846.7, 642.6642.6, 907.2907.2 and 627.5627.5, with sum 3,024=4×7563{,}024=4\times 756
  • e) Raw 50%50\%; deseasonalized 710.0−668.2668.2≈6.25%\dfrac{710.0-668.2}{668.2}\approx 6.25\%
a)

1.12+0.85+1.20+0.83=4.001.12+0.85+1.20+0.83=4.00: the sum is exact, no renormalization is needed. The index of 0.85 means that the second quarter sits structurally 15% BELOW the average level of its year, year after year.

b)

x‾=2\overline{x}=2, y‾=620+668+7103=1,9983=666\overline{y}=\dfrac{620+668+710}{3}=\dfrac{1{,}998}{3}=666. Sum of cross-products of deviations: (−1)(620−666)+(1)(710−666)=46+44=90\left(-1\right)\left(620-666\right)+\left(1\right)\left(710-666\right)=46+44=90. Sum of squares of the deviations of xx: 2. Slope: 902=45\dfrac{90}{2}=45. Intercept: 666−45×2=576666-45\times 2=576. Line: y^=576+45x\hat{y}=576+45x.

c)

Year 4: 576+45×4=576+180=756576+45\times 4=576+180=756 visits per quarter on average.

d)

756×1.12=846.7756\times 1.12=846.7; 756×0.85=642.6756\times 0.85=642.6; 756×1.20=907.2756\times 1.20=907.2; 756×0.83=627.5756\times 0.83=627.5. Sum: 3,024.03{,}024.0, and 4×756=3,0244\times 756=3{,}024. The check passes exactly, which confirms both the indices and the trend.

e)

RAW change: 852−568568=0.5\dfrac{852-568}{568}=0.5, that is 50%. Deseasonalized values: 5680.85≈668.2\dfrac{568}{0.85}\approx 668.2 and 8521.20=710.0\dfrac{852}{1.20}=710.0. Deseasonalized change: 710.0−668.2668.2≈0.0625\dfrac{710.0-668.2}{668.2}\approx 0.0625, that is 6.25%. The real movement is therefore eight times smaller than the apparent one: the announced 50% describes the calendar, the 6.3% describes the service.

12345550600650700750800620668710yeary = 576 + 45xforecast: 756

Exercise 9: Five statements to correct

Each of the following five statements is FALSE. Say why and give the correct statement.

  • 1) “The analysis of variance fails to reject: the four methods are therefore equivalent.”
  • 2) “We measured the same twelve students twice and compared the two means with a t-test at 22 degrees of freedom.”
  • 3) “The coefficient of x2x_{2} is 0.91 and that of x3x_{3} is −0.28-0.28: x2x_{2} weighs three times more in the model.”
  • 4) “Attendance jumped by 50% from one quarter to the next: the service is taking off.”
  • 5) “Our Mann-Whitney UU is 3, well below the critical value of 6: the result is therefore not significant.”

Type your answers, the page tells you right or wrong 0/11

1)
2)
3)
4)
5)
Show the solution

Answers

  • 1) FALSE: η2=0.172\eta^{2}=0.172 is a large effect; the study lacks power, it does not demonstrate equivalence
  • 2) FALSE: paired measurements, so 1111 degrees of freedom on the twelve differences, not 2222
  • 3) FALSE: different units; standardized coefficients are needed
  • 4) FALSE: calendar effect (0.850.85 against 1.201.20); the real increase is 6.3%6.3\%
  • 5) FALSE: the rule is reversed; U=3≤6U=3\le 6, so we REJECT
1)

FALSE. Failing to reject means that the data are compatible with equality, not that equality has been demonstrated. Here η2=0.172\eta^{2}=0.172 corresponds to a large effect that ten students per group are not enough to detect. Correct statement: the study does not allow a conclusion; the share of variance associated with the method is nevertheless substantial, and a sample of about 16 per group would be needed to settle it.

2)

FALSE. The two measurements concern the same people: they are not independent. We must work on the twelve individual DIFFERENCES, with n−1=11n-1=11 degrees of freedom and not 22. Treating the measurements as independent puts the variability between individuals back into the denominator and makes the statistic collapse. Correct statement: paired-samples t-test, t=2.31t=2.31 at 11 degrees of freedom.

3)

FALSE. The two coefficients are expressed in different units, points per hour of study and points per hour of work, and their contribution also depends on the spread of each variable. Correct statement: to compare relative importance, we need the STANDARDIZED coefficients, or failing that we can compare the tt statistics, here 3.79 against −3.11-3.11, which measure reliability and not magnitude.

4)

FALSE. The second quarter has a seasonal index of 0.85 and the third quarter 1.20: the rise is largely a calendar effect. After deseasonalizing, the real increase is 6.3%. Correct statement: with seasonal variation removed, attendance rises by 6.3% over the previous quarter.

5)

FALSE, the rule is reversed for UU. We reject when the statistic is LESS THAN OR EQUAL TO the critical value, because a small UU means that one group monopolizes the high ranks. With U=3U=3 against 6, we REJECT. Correct statement: the difference between the two groups is significant at the 5% level.

Exercise 10: Problem: evaluating a research report

A report concludes: “The program works. Participants improve by 6.8 points on average between the start and the end of the term (t=3.42t=3.42; p=0.002p=0.002; n=40n=40). An analysis of variance further shows that the effect varies by field of study (F=2.49F=2.49; p=0.076p=0.076), which confirms our hypotheses. Finally, the regression indicates that family income has no effect (p=0.22p=0.22). We recommend extending the program.”

  • a) Does the first result demonstrate that the program works? Name three competing explanations.
  • b) The participants were recruited from among the students who failed the midterm exam. What additional threat does this introduce, and how can it be quantified?
  • c) “The analysis of variance shows that the effect varies” with p=0.076p=0.076: what is wrong with this?
  • d) “Family income has no effect”: what is wrong with this?
  • e) Write the recommendations you would make instead.

Type your answers, the page tells you right or wrong 0/15

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) No: before-and-after without a control group. Maturation, history and testing remain competing explanations
  • b) Regression toward the mean: z2=0.6×(−1.5)=−0.9z_{2}=0.6\times (-1.5)=-0.9, that is 0.60.6 standard deviations, 66 points of rise
  • c) p=0.076p=0.076 does not reject, and showing that an effect varies requires an interaction, with a control group
  • d) A failure to reject is not proof of absence, and the coefficient is partial, already absorbed upstream
  • e) Name the threat, quantify it, and replace the extension with a waitlist experiment
a)

No. The design is a before-and-after study WITHOUT A CONTROL GROUP, the weakest there is. Three competing explanations: MATURATION, students improve on their own over the course of the term; HISTORY, a different instructor, exam or calendar at the second measurement; TESTING, simple familiarity with the format of the test. The t-test establishes that there was an improvement, it establishes nothing about its cause.

b)

REGRESSION TOWARD THE MEAN. Selecting on a failure guarantees that part of the poor initial result was due to passing circumstances, and the next measurement rises mechanically. It is quantified by z2=r z1z_{2}=r\,z_{1}: if the selected students were 1.5 standard deviations below the mean and the correlation between the two exams is 0.6, the prediction with no intervention at all is −0.9-0.9 standard deviations, a rise of −0.9−(−1.5)=0.6-0.9-\left(-1.5\right)=0.6 standard deviations. Beware of the trap: the rise is the DIFFERENCE of the two Z scores, not the value 0.90.9 of the second one. With a standard deviation of 10 points, this is 6 points of expected rise, against 6.8 points observed: the program therefore adds only eight tenths of a point to what doing nothing would have produced.

c)

Two criticisms. First, with p=0.076p=0.076, the test FAILS TO REJECT at the usual level: the report presents as a demonstration a result that does not reach the threshold it set for itself. Second, an analysis of variance would compare fields of study with one another, not treatment EFFECTS: showing that the effect varies by field of study would require an interaction term between treatment and field of study, in a design that includes a control group. The word “confirms” is, moreover, the opposite of what a test does, which can only fail to refute.

d)

A failure to reject is not proof of absence. With p=0.22p=0.22, the data are simply compatible with zero, and the confidence interval, which is not reported, probably contains appreciable values. It must also be added that the income coefficient is PARTIAL: it is controlled for the other variables in the model, several of which, high school average and hours of paid work, are themselves consequences of income. A good part of the effect of income has therefore been absorbed upstream, which makes the absence of a coefficient of its own expected rather than informative.

e)

“Participants improve by 6.8 points on average, t=3.42t=3.42; p=0.002p=0.002; n=40n=40. The design being a before-and-after study with no control group, and the participants having been selected on a failure, this improvement is compatible with regression toward the mean alone, whose expected size is of the order of 6 points: the data therefore do not allow us to conclude that the program has an effect. For the next term, we recommend a waitlist experiment: among the students who failed the midterm, half, drawn by lot, would receive the program immediately and the other half the following term, and the analysis would compare the individual improvements of the two groups on an intention-to-treat basis. A sample of about 60 students per group would detect a medium effect with 80% power.” The paragraph keeps the facts, names the threat, quantifies what would be needed, and replaces a recommendation to extend the program with a protocol.

Something missing from this set? A type of exercise your teacher gives, a problem you are stuck on, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

© Ahmed Squalli Houssaini. Exercise set published at www.letuteurscientifique.ca/en/exercices/cegep-aqm-practice-final. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

See also

Looking for an advanced quantitative methods tutor in Montreal?

Get in touch for a first session. The 360-301 comes at the time of the end-of-program research project, and it is the course where a mistake in method costs the whole analysis chapter.

Site by Studio Squalli