NivaarExam PrepOfficial exam papers ↗

04-BS-2 · December 2014

Question 8 of 8: Correlation and Simple Linear Regression

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

National Examinations, December 2014 — 04-BS-2, Probability and Statistics (2 hours; closed book except one hand-written information sheet and an approved calculator; any 5 of 8 questions constitute a complete paper — all 8 are solved below as a complete study resource).

Reference texts: Walpole, Myers, Myers & Ye, Probability & Statistics for Engineers and Scientists, 9th ed.

Question 8: Correlation and Simple Linear Regression (20 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. n=20, $\Sigma X=35.00$, $\Sigma X^2=68.10$, $\Sigma Y=3{,}600.00$, $\Sigma Y^2=648{,}171.00$, $\Sigma XY=6330.10$.

Find. (a) r; (b) 95% CI for ρ; (c) the normal equations and $b_0,b_1$; (d) 95% CI for E(Y|X=1.8).

Approach. Reduce the raw sums to the corrected sums of squares/cross-products $S_{xx}, S_{yy}, S_{xy}$, from which r and the least-squares slope/intercept follow directly; use the Fisher z-transform for the ρ interval, and the standard-error-of-a-fitted-mean formula for the E(Y|X=1.8) interval.

  1. Corrected sums. $\bar x=35.00/20=1.75$, $\bar y=3600.00/20=180.0$. $$S_{xx}=68.10-\dfrac{35.00^2}{20}=6.85,\quad S_{yy}=648171.00-\dfrac{3600.00^2}{20}=171.0,\quad S_{xy}=6330.10-\dfrac{35.00(3600.00)}{20}=30.10.$$
  2. (a) Correlation coefficient. $$r=\dfrac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}=\dfrac{30.10}{\sqrt{6.85(171.0)}}=\boxed{0.8795}.$$
  3. (b) 95% CI for ρ via Fisher's z-transform. $$z_r=\tfrac12\ln\!\left(\dfrac{1+r}{1-r}\right)=1.3734,\qquad SE=\dfrac{1}{\sqrt{n-3}}=\dfrac{1}{\sqrt{17}}=0.2425.$$ $$z_r\pm1.96\,SE=1.3734\pm0.4754=(0.8980,\ 1.8488)\ \xrightarrow{\text{back-transform}}\ \boxed{(0.7154,\ 0.9516)}.$$
  4. (c) Least-squares normal equations and estimates. The normal equations are $$n b_0+b_1\Sigma X=\Sigma Y,\qquad b_0\Sigma X+b_1\Sigma X^2=\Sigma XY,$$ i.e. $20 b_0+35.00 b_1=3600.00$ and $35.00 b_0+68.10 b_1=6330.10$. Solving (equivalently, using the corrected-sum shortcut $b_1=S_{xy}/S_{xx}$, $b_0=\bar y-b_1\bar x$): $$b_1=\dfrac{30.10}{6.85}=\boxed{4.394},\qquad b_0=180.0-4.394(1.75)=\boxed{172.310}.$$ So $\hat y=172.310+4.394x$.
  5. (d) 95% CI for the expected value of Y at X=1.8. First the residual variance: $SSE=S_{yy}-b_1S_{xy}=171.0-4.394(30.10)=38.736$, $MSE=SSE/(n-2)=2.152$, $s=1.467$. The fitted value at $x_0=1.8$ is $\hat y_0=172.310+4.394(1.8)=180.220$, with $$SE(\hat y_0)=s\sqrt{\dfrac{1}{n}+\dfrac{(x_0-\bar x)^2}{S_{xx}}}=1.467\sqrt{\dfrac{1}{20}+\dfrac{(0.05)^2}{6.85}}=0.3292.$$ With $t_{0.025,18}=2.101$: $$\hat y_0\pm t_{0.025,18}\,SE(\hat y_0)=180.220\pm0.692=\boxed{(179.53,\ 180.91)}.$$
Final results — Question 8
PartQuantityResult
(a)r0.8795
(b)95% CI for ρ(0.7154, 0.9516)
(c)$b_0$, $b_1$172.310, 4.394
(d)95% CI for E(Y|X=1.8)(179.53, 180.91) psi
Back to the paper →