Probability of finding adjacent colored squares in a line of white squares So this question has a small science background, but the problem itself is purely mathematical. Consider a one-dimensional row of squares, some are white, some are blue. The blue squares represent water, and the white ones represent some other irrelevant compound. If there are $N$ total squares and $n$ water squares, and you are given the concentration of water in the solution (say it is any multiple of $10\%$ from $0\%$ to $100\%$), how would you calculate the probability for each concentration that two water squares are touching? How would you calculate the average number of water-water bonds in each concentration? Two adjacent blue squares represents one water-water bond.
EDIT:  My model in one-dimension seems to be working to my liking, and I would now like to extrapolate it to two and three dimensions.  I will be posting my personal results/progress here, but what is the best way to move this into higher dimensions?
 A: The total number of arrangements is $N \choose n$.  To find the total number without a pair of water squares together, put the non-water squares in a row.  There are $N-n+1$ places to put water squares (including each end), so there are ${N-n+1 \choose n}$ ways.  The required probability is then $1-\frac {N-n+1 \choose n}{N \choose n}=1-\frac {(N-n+1)!}{n!(N-2n+1)!}\frac {(N-n)!n!}{N!}=1-\frac {(N-n+1)!}{(N-2n+1)!}\frac {(N-n)!}{N!}$
A: We will suppose that the locations of the blue squares are "random," with all choices of $n$ blue squares from the $N$ total squares equally likely. We will use the method of indicator random variables. 
For $i=1$ to $N-1$, let $X_i=1$ is there is water at $i$ and at $i+1$, and let $X_i=0$ otherwise. Then $X=X_1+X_2+\cdots+X_{N-1}$ is the number of times a blue is followed by a blue. You asked for $E(X)$. By the linearity of expectation, we have
$$E(X)=E(X_1)+E(X_2)+\cdots +E(X_{N-1}).$$
All the $X_i$ have the same expectation. The probability that the $i$-th square is blue and the $i+1$-th square is blue is $\frac{n}{N}\cdot\frac{n-1}{N-1}$.
Multiply by $N-1$ to get $E(X)$. We conclude that
$$E(X)=\frac{n(n-1)}{N}.$$
Remark: Note that the $X_i$ are not independent, but for linearity of expectation, that doesn't matter. To a fair degree, it is this fact that makes the method powerful. It enables us to bypass the possibly difficult problem of finding the distribution of $X$, and then wading through a mess to calculate the expectation. 
