Probability of a chemical entering the environment (Probability and Poisson distribution) In a laboratory a dangerous chemical is being kept. In case of an accident there are $k \in \mathbb N$ security systems to neutralize the chemical. They all work independently of each othre with probability $p \in (0,1)$. There are $N$ accidents every year.
What is the probability that the chemical will enter the environment $(=X)$ if $N$ is constant or if $N$ is Poissoin$(10)$-distributed? 
My approach was to figure out what the probability is in case of $N=1$ which resulted in $\mathbb P_1(X)=\Pi_{i=1}^k(1-p_i)$ where $p_i$ is the probability of a security system succeeding.
Can someone explain me how to figure it out for the general case $N=const$ and how to determine the probability for Poisson distributions?
 A: Let $X$ denote the random number of accidents in which the chemical is released into the environment.
If $N = 1$ accident, then the chemical is released into the environment if all $k$ security systems fail.  If each system succeeds in neutralizing the accident with independent probability $p$, then the chance that all systems will fail is $$\Pr[X = 1 \mid N = 1] = (1-p)^k.$$  Note that your calculation corresponds to a general case where each neutralizing system is independent but not identically distributed, with success probabilities $p_1, p_2, \ldots, p_k \in (0,1)$.  It is worth noting that the complementary probability is simply $$\Pr[X = 0 \mid N = 1] = 1 - (1-p)^k.$$  This is the chance of no release for a single accident.
Consequently, if we have $N = n$ accidents, then the chance that there is a release in at least one accident is $$\Pr[X \ge 1 \mid N = n] = 1 - \Pr[X = 0 \mid N = n] = 1 - (\Pr[X = 0 \mid N = 1])^n.$$  The key insight is the last part:  each accident is independent of the others, so the probability of no release for all $n$ accidents is simply the probability of no release for a single accident, raised to the $n^{\rm th}$ power.  Consequently, $$\Pr[X \ge 1 \mid N = n] = 1 - (1 - (1-p)^k)^n.$$  Notably, if $N = 0$, this probability is $0$ regardless of $k$ or $p$, which is as it should be.
Now suppose $N \sim \operatorname{Poisson}(\lambda)$.  Then the resulting probability is $$\Pr[X \ge 1] = \sum_{n=0}^\infty \Pr[X \ge 1 \mid N = n]\Pr[N = n]$$ by the law of total probability, where $$\Pr[N = n] = e^{-\lambda} \frac{\lambda^n}{n!}, \quad n = 0, 1, 2, \ldots.$$  I have left this computation as an exercise.
