Question

# Computer programs are classified by the length of the source code and by the execution time. Programs with more than 150 lines in the source code are big (B). Programs with $\leq$ 150 lines are little (L). Fast programs (F) run in less than 0.1 seconds. Slow programs (W) require at least 0.1 seconds. Monitor a program executed by a computer. Observe the length of the source code and the run time. The probability model for this experiment contains the following information: P [LF]=0.5, P[BF]=0.2, and P[BW]=0.2. What is the sample space of the experiment? Calculate the following probabilities: P[W], P[B], and $\mathrm{P}[W \cup B]$.

Solution

Verified
Step 1
1 of 2

The sample space contains 4 two-letter words with the first letter either B (Big) or L (Little) and the second letter either F (Fast) or W (Slow). For example, if an element of the sample space is BF, it refers to a program which is Big and Fast.

Hence, Sample Space, $\boxed{\textbf{S = \{BF, BW, LF, LW\}}}$

Given: P(LF) = 0.5, P(BF) = 0.2, P(BW) = 0.2

Since we know that P(S) = 1.0

Hence, P(BF) + P(BW) + P(LF) + P(LW) = 1.0

Hence, 0.2 + 0.2 + 0.5 + P(LW) = 1.0

Hence, P(LW) = 1.0 - 0.9 = 0.1

Now, in order to find P(W), we need to sum probabilities of the events in sample space which involve W i.e. P(BW) and P(LW). It is because of the event of programs being Big and the event of programs being Little, i.e. {B, L} is a partition

Hence, P(B $\cap$ W) + P(L $\cap$ W) = P(W)

Hence, P(W) = P(BW) + P(LW)

Hence, P(W) = 0.2 + 0.1 = $\boxed{\textbf{0.3}}$

Similar to the prior case, the event of programs being Fast and the event of programs being Slow, i.e. {F, W} is a partition.

Hence, P(B) = P(B $\cap$ F) + P(B $\cap$ W)

Hence, P(B) = P(BF) + P(BW)

Hence, P(B) = 0.2 + 0.2 = $\boxed{\textbf{0.4}}$

Now, for the last part of the question, we know the following theorem:

P(W $\cup$ B) = P(W) + P(B) - P(W $\cap$ B)

Hence, P(W $\cup$ B) = P(W) + P(B) - (BW)

Hence, P(W $\cup$ B) = 0.3 + 0.4 - 0.2 = 0.7 - 0.2 = $\boxed{\textbf{0.5}}$

## Recommended textbook solutions

#### Probability and Stochastic Processes: A Friendly Introduction for Electrical and Computer Engineers

2nd EditionDavid Goodman, Roy D. Yates
288 solutions

#### Probability Concepts in Engineering: Emphasis on Applications to Civil and Environmental Engineering

2nd EditionAlfredo H-S. Ang, Wilson H. Tang

#### Probability and Stochastic Processes: A Friendly Introduction for Electrical and Computer Engineers

3rd EditionDavid Goodman, Roy D. Yates
465 solutions

#### Probability and Stochastic Processes

2nd EditionDavid Goodman, Roy D. Yates
288 solutions