Brainteaser iconBrainteaser - Flashlight

Suppose we have a flashlight that has a compartment for two batteries. Let \( A_i \) denote the event that the \( i^{th} \) battery fails. Assume we have \( P(A_1) = 0.1 \) and \( P(A_2) = 0.2 \). Calculate the probability that the flashlight works in case:

i) It needs both batteries to function.
ii) It needs at least one battery to function.