What is the possibility that a random triple $\{\vec{a},\vec{b},\vec{c}\} \subset \mathbb{R}^3$ of zero-one vectors is linearly independent? I am interpreting the question as "What is the possibility that a random $3$x$3$ binary matrix has rank $3$?" 
To find this, I wrote the code
x=0;
for i=1:100000
    A = randi([0, 1], 3,3);
    if rank(A) == 3,
        x = x+1;
    end
end
x/100000

in MATLAB, which approximately gives $0.34$.
Then, to manually check my work, I calculated the same probability by using the following method: 


*

*Think of the 8 possible vectors as corners of a unit cube.

*Notice that we are looking for combinations of 3 distinct corners (as vectors) of the unit cube such that any combination does not include the corner $(0,0,0)$ and the 3 corners in the combination are not co-planar. 

*The number of such combinations is equal to  $\left(\begin{matrix}
 7 \\
 3
 \end{matrix}\right)-3-3$. (Choose 3 distinct non-(0,0,0) corners out of 8 corners, subtract the 3 possible combinations lying on 3 face planes, and subtract the 3 possible combinations lying on 3 diagonal planes.

*The total possible combinations are $(8+3-1)!$ (number of random triples where repetition is allowed and the order does not matter.

*The resulting possibility is 


\begin{equation*} \frac{\left(\begin{matrix}
 7 \\
 3
 \end{matrix}\right)-3-3}{(8+3-1)!}=\frac{29}{120}\approx 0.24.
\end{equation*}
Can someone please find the reason for the discrepancy between the two calculated probabilities, which are supposed to be the same?
 A: To match your MATLAB calculation, instead of $\frac{29}{120}$, you should compute $\frac{29 \cdot 3!}{512} \approx 0.3398$. The idea is:


*

*When you generate your random $3 \times 3$ matrix, if it has rank $3$, the rows are an ordered triple of independent vectors, so there are $29 \cdot 3!$ possibilities for them.

*In general, the number of possibilities for your random $3 \times 3$ matrix is $2^{3 \cdot 3} = 512$.

A: The desired probability is
$$\frac{\left(\binom{7}{3}-3-3\right)3!}{8^3}=87/256\approx .34$$
Explanation:


*

*There are $8$ choices for each vector, and the $3$ vectors are chosen independently.

*There are $\binom{7}{3}$ ways of choosing a subset of $3$ distinct nonzero vectors.

*Of those, each of the $3$ faces having the origin as a vertex has a subset of $3$ vectors that we want to exclude.

*Also, each of the $3$ rectangles with one edge along one of the coordinate axes and passing through the centroid of the cube has a subset of$\,3$ vectors that we want to exclude.

*Of the accepted subsets, we need to account for the $3!$ permutations

