A small brewery has three bottling machines. Machine A produces 40% of all the bottles, machines B and C produce 30% each. Five percent of bottles filled by A, four percent of bottles filled by B, and three percent of bottles filled by C are rejected for some reason.
(a) If a bottle is filled by A or B, what is the probability that it is rejected?
(b) If a bottle is rejected, what is the probability that it was filled by A?