An engineering system consisting of $n$ components is said to be a $k$-out-of-$n$ system ($k \le n$) when the system functions if and only if at least $k$ out of the $n$ components function. Suppose that all components function independently of each other.
If the $i^{th}$ component functions with probability $p_i$, $i = 1, 2, 3, 4$, compute the probability that a 2-out-of-4 system functions.
This problem in itself does not seem very difficult to solve, but I suspect I am not doing it the way it was intended to be done, because the formulas that come out are very ugly. I calculated the probability by conditioning on whether or not the $1^{st}$ and $2^{nd}$ components worked, and it came out to be $ p_3 p_4 + p_2 (p_3 + p_4 - 2 p_3 p_4) + p_1 (p_3 + p_4 - 2 p_3 p_4 + p_2 (1 - 2 p_3 - 2 p_4 + 3 p_3 p_4)) $ Even if this is right, there's no way it's what the answer is supposed to look like. Can someone give me a push in the right direction?