COVID19 has challenged the current day’s medical testing capability. Pooled testing is an effective approach that can increase scale with limited resources and reduce the overall costs considerably. Current pooled testing techniques usually make the assumption that the entire population has a uniform probability of infection. However, symptomatic and asymptomatic patients have vastly different probabilities of testing positive, and positivity rates vary widely based on geographic regions. In this paper, we introduce a novel pooled testing technique that improves efficiency when handling the non-uniform likelihood of infection. We derive the expected cost for any rectangular pooling, using different pool sizes that suit different sub-populations. We develop a software system that takes in samples with varying probabilities and outputs optimized designs. Experiments with our software show that our approach is significantly more efficient than the “optimal” double-pooled design and classic Dorfman-style single-pooled testing, with the efficiency gain depending on the positivity rates of the sub-populations mixtures. A simple restructuring using an estimated probability of infection can significantly reduce the costs of COVID19 or another testing. We provide open-source code and web-based services.