Let X1, X2, . . . , Xk be independent n bit random variables. If they have arbitrary distributions, we show how to compute distributions like Pr{X1 ⊕ X2 ⊕ · · · ⊕ Xk} and Pr{X1 X2 · · · Xk} in complexity O(kn2n ). Furthermore, if X1, X2, . . . , Xk are uniformly distributed we demonstrate a large class of functions F(X1, X2, . . . , Xk), for which we can compute their distributions efficiently. These results have applications in linear cryptanalysis of stream ciphers as well as block ciphers. A typical example is the approximation obtained when additions modulo 2n are replaced by bitwise addition. The efficiency of such an approach is given by the bias of a distribution of the above kind. As an example, we give a new improved distinguishing attack on the stream cipher SNOW 2.0.