How does the video compute the total time to complete both reports?
The video computes the total time to complete both reports by performing an elementwise addition of the two simulated completion-time arrays. The total time is simply their summation, represented in code as `duration = `.
Conditions
- A and B must be arrays of the same length.
- Addition is performed entrywise across matched simulation runs.
Reasoning, step by step
- Generate the array A of simulated completion times for report A.
- Generate the array B of simulated completion times for report B.
- Add the paired samples to obtain one million total completion times using `duration = `.
Example
The code line visible is `duration = `. The narrator says, "And of course, the total time to complete these two reports is simply their summation. So let's add them up and voila, we now have 1 million random samples."
Common misconceptions
- Assuming the total time is computed by adding the maximums or minimums of the intervals.
- Thinking that the addition is done sequentially rather than elementwise across the arrays.
Watch the explanation
Explore next
Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.