(Solved):
Subject - Modelling (Random Process)
A computer programmer writes the following (pseudo) code (wit ...
Subject - Modelling (Random Process)
A computer programmer writes the following (pseudo) code (with line numbers) 01) \( \mathrm{R}=\operatorname{rand}() \) 02) if \( \mathrm{R}>0.7 \) 03) print('RED') 04) else 05) if \( R>0.2 \) 06) \( \quad \mathrm{S}=\operatorname{rand}() \) 07) if \( S>0.5 \) 08) print('RED') 09) else 10) print('BLUE') 11) else Assume that each call to the rand () subroutine returns an independent real number uniformly sampled from within the interval \( [0,1] \) (a) What is the probability that the string 'BLUE' is printed upon execution? (b) Given that the program prints 'BLUE' upon execution, what is the probability that it is printed by the instruction on line \( 12 ? \)