An engine encounters a standard environment with a probability of 0.9, and a severe environment with a probability of 0.1. In a normal environment the probability of failure is 0.03, whereas in the severe environment this probability is 0.5.
i. What is the probability of failure?
ii. Given that failure has occurred, what is the probability that the environment encountered was severe?