Abstract Ecological presence–absence matrices capture information of species occurrences among a number of sites. Statistical inference of matrix structure often used a fixed–fixed (FF) null model in which matrix entries are randomized, but the row and column total of each random matrix match those of the original matrix. However, in a stochastically assembled meta-community, row and column totals of a random assemblage might be expected to vary among matrices. Here we introduce a 4-step proportional–proportional (PP) algorithm that creates null matrices in which the row and column vary randomly, but the average row and column totals in a set of PP matrices are unbiased and match those of the original matrix. We tested the performance of the PP algorithm with 5 sets of artificial matrices and one large set of 288 published empirical matrices. Compared to the FF algorithm, the PP algorithm has better power to detect segregated and nested matrices, but it is vulnerable to Type I errors if row and column sums have small variances. The PP algorithm identified only 9% of empirical matrices as significantly segregated, compared with 30% identified by the traditional FF algorithm. The choice between whether to use the PP or the FF algorithm is similar to the distinction between random and fixed effects in a mixed-model ANOVA. For robust analysis, it may be desirable to use both the PP and the FF algorithms with the same data matrix.