2082 3

STA154 · 2082 · 10 marks

Question A web development team records the number of hours spent on debugging (X) and the number of resolved issues (Y) across 10 sprints. a) Calculate the Pearson correlation coefficient to assess the relationship between debugging hours and issues resolved. b) Derive the regression equation of is

Question

A web development team records the number of hours spent on debugging (X) and the number of resolved issues (Y) across 10 sprints.

$$\begin{array}{|c|cccccccccc|}\hline X & 15 & 20 & 25 & 30 & 35 & 40 & 45 & 50 & 55 & 60 \ \hline Y & 3 & 6 & 8 & 11 & 12 & 14 & 16 & 19 & 21 & 22 \ \hline \end{array}$$

a) Calculate the Pearson correlation coefficient to assess the relationship between debugging hours and issues resolved.

b) Derive the regression equation of issues resolved on hours spent debugging.

c) Predict the number of issues resolved for 38 hours of debugging.

[10+0+0+0]

Basic StatisticsChapter 8: Correlation and Regression AnalysisKarl Pearson correlation coefficientNumerical: Correlation and regression

Model Answer: Correlation and Regression Analysis

Given Data

X (hours)15202530354045505560
Y (issues)36811121416192122

$n = 10$


STEP 1: Compute the sums

XYXYX²Y²
153452259
20612040036
25820062564
3011330900121
35124201225144
40145601600196
45167202025256
50199502500361
552111553025441
602213203600484
3751325820161252112

$\sum X = 375,\ \sum Y = 132,\ \sum XY = 5820,\ \sum X^2 = 16125,\ \sum Y^2 = 2112$


a) Pearson Correlation Coefficient

$$r = \frac{n\sum XY - \sum X \sum Y}{\sqrt{[n\sum X^2 - (\sum X)^2][n\sum Y^2 - (\sum Y)^2]}}$$

Compute components:

  • $n\sum XY = 10 \times 5820 = 58200$
  • $\sum X \sum Y = 375 \times 132 = 49500$
  • $n\sum X^2 = 161250,\quad (\sum X)^2 = 140625 \Rightarrow 20625$
  • $n\sum Y^2 = 21120,\quad (\sum Y)^2 = 17424 \Rightarrow 3696$

$$r = \frac{58200 - 49500}{\sqrt{20625 \times 3696}} = \frac{8700}{\sqrt{76245000}}$$

$$\sqrt{76245000} = 8731.95$$

$$r = \frac{8700}{8731.95} = 0.9963$$

$r \approx 0.996$: very strong positive correlation.


b) Regression Equation of Y on X

$$b = \frac{n\sum XY - \sum X \sum Y}{n\sum X^2 - (\sum X)^2} = \frac{8700}{20625} = 0.42182$$

Means:

$$\bar{X} = \frac{375}{10} = 37.5,\qquad \bar{Y} = \frac{132}{10} = 13.2$$

Intercept:

$$a = \bar{Y} - b\bar{X} = 13.2 - (0.42182)(37.5) = 13.2 - 15.818 = -2.618$$

$$\boxed{\hat{Y} = -2.618 + 0.4218,X}$$


c) Prediction for X = 38 hours

$$\hat{Y} = -2.618 + 0.4218(38) = -2.618 + 16.029 = 13.41$$

Approximately 13 issues resolved (13.4 if retaining decimals).

Since $r = 0.996$ and $X = 38$ lies inside the observed range $[15,60]$, the prediction is reliable.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.