Diversity partitioning is becoming widely used to decompose the total number of species recorded in an area or region $$(\gamma )$$ ( γ ) into the average number of species within samples $$(\alpha )$$ ( α ) and the average difference in species composition $$(\beta )$$ ( β ) among samples. Single-value metrics of $$\alpha $$ α and $$\beta $$ β diversity are popular because they may be applied at multiple scales and because of their ease in computation and interpretation. Studies thus far, however, have emphasized observed diversity components or comparisons to randomized, null distributions. In addition, prediction of $$\alpha $$ α and $$\beta $$ β components using environmental or spatial variables has been limited to more extensive data sets because multiple samples are required to estimate single $$\alpha $$ α and $$\beta $$ β components. Lastly, observed diversity components do not incorporate variation in detection probabilities among species or samples. In this study, we used hierarchical Bayesian models of species abundances to provide predictions of $$\alpha $$ α and $$\beta $$ β components in species richness and composition using environmental and spatial variables. We illustrate our approach using butterfly data collected from 26 grassland remnants to predict spatially nested patterns of $$\alpha $$ α and $$\beta $$ β based on the predicted counts of butterflies. Diversity partitioning using a Bayesian hierarchical model incorporated variation in detection probabilities by butterfly species and habitat patches, and provided prediction intervals for $$\alpha $$ α and $$\beta $$ β components using environmental and spatial variables.