0
$\begingroup$

A company that develops software received an order for a service to be performed within a week and, in order to decide on the profile of the team of programmers to be used, it should take into account that:

The total number of lines of code (commands, instructions) to be developed is approximately 30 thousand.

The productivity of your most experienced programmers, in hourly commands, follows a with an average of 50 and a standard deviation of 15.

The productivity of its less experienced programmers, in hourly commands, follows a with a mean of 30 and a standard deviation of 10.

Each programmer works six hours a day, five days a week.

What is the probability that the service will be ready in a week if the team consists of 10 more experienced programmers and 20 less experienced programmers?

Solution:

Let P be the team productivity, X the productivity of most experienced programmers and Y the productivity of less experienced programmers:

$X \sim N(50, 15^2)$
$Y \sim N(30, 10^2)$
$P = 10X + 20Y$

Since P is a linear combination of Normal distributions:

$E[P] = 10E[X] + 20E[Y] = 10(50) + 20(30) = 1100$
$Var(P) = 10^2Var[X] + 20^2Var[Y] = 10^2(15^2) + 20^2(10^2) = 62500$

(...)

Question:

The textbook answer says that $Var(P) = 10Var[X] + 20Var[Y] = 10(15^2) + 20(10^2) = 4250$.

Why?

$\endgroup$
3
  • 3
    $\begingroup$ The book's answer seems to be wrong. $\endgroup$
    – gunes
    Commented Jan 22, 2019 at 21:13
  • 2
    $\begingroup$ The book's author needs to read Fred Brooks' classic The Mythical Man-Month to understand what is so awfully wrong about this question. $\endgroup$
    – whuber
    Commented Jan 22, 2019 at 21:16
  • 2
    $\begingroup$ Perhaps the company can outsource this on Twitter to 30,000 marginally efficient volunteer programmers, each of whom can write one line of code in an hour. Then, if all the volunteer tweets come back quickly, the project might be completed within a few hours. $\endgroup$
    – BruceET
    Commented Jan 22, 2019 at 22:30

1 Answer 1

1
$\begingroup$

Model 1. Consider two experienced programmers, each producing $X_1 \sim \mathsf{Norm}(\mu = 50, \sigma=15)$ and $X_2 \sim \mathsf{Norm}(\mu = 50, \sigma=15)$ lines of code in an hour, respectively. Then make the assumption that together they produce $X_1 + X_2$ lines of code in and hour. Then $$X_1 + X_2 \sim \mathsf{Norm}\left(\mu=50+50=100,\\ \sigma = \sqrt{15^2+15^2} = 21.2132\right)$$ lines of code are produced in an hour (and we suppose a magic elf instantly puts the lines of code into a coherent whole).

Model 2. By contrast, suppose that, grossly over-caffeinated and working a double rate, the first exerienced programmer can produce $$2X_1 \sim \mathsf{Norm}\left(\mu=2(50)=100,\, \sigma = \sqrt{4*15^2} = 30\right)$$ coherent lines of code in an hour.

Notice that two different probability models have been used here. Hence, I don't believe your expression $P=10X+20Y$ is what the problem means (assuming, contrary to @whubeer's link, that it makes any practical sense at all). I fear for the health of a single programmer (on whatever drugs) working at 20 times normal rate.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.