Species diversity may be additively partitioned within and among samples (alpha and beta diversity) from hierarchically scaled studies to assess the proportion of the total diversity (gamma) found in different habitats, landscapes, or regions. We developed a statistical approach for testing null hypotheses that observed partitions of species richness or diversity indices differed from those expected by chance, and we illustrate these tests using data from a hierarchical study of forest-canopy beetles. Two null hypotheses were implemented using individual- and sample-based randomization tests to generate null distributions for alpha and beta components of diversity at multiple sampling scales. The two tests differed in their null distributions and power to detect statistically significant diversity components. Individual-based randomization was more powerful at all hierarchical levels and was sensitive to departures between observed and null partitions due to intraspecific aggregation of individuals. Sample-based randomization had less power but still may be useful for determining whether different habitats show a higher degree of differentiation in species diversity compared with random samples from the landscape. Null hypothesis tests provide a basis for inferences on partitions of species richness or diversity indices at multiple sampling levels, thereby increasing our understanding of how a and beta diversity change across spatial scales.