The quality or precision of stimulus representations in visual working memory can be characterized by a power law, which states that precision decreases as a power of the number of items in memory, with an exponent whose magnitude typically varies in the range 0.5 to 0.75. The authors show that the magnitude of the exponent is an index of the attentional demands of memory formation. They report 5 visual working memory experiments with tasks using noisy, backward-masked stimuli that varied in their attentional demands and show that the magnitude of the exponent increases systematically with the attentional demands of the task. Recall accuracy in the experiments was well described by an attention-weighted sample-size model that views visual working memory as a resource comprised of noisy evidence samples that are recruited during stimulus exposure and which can be allocated flexibly under attentional control. The magnitude of the exponent indexes the degree to which attention allocates resources to items in memory unequally rather than equally.