Interparticle forces in granular media form an inhomogeneous distribution of filamentary force chains. Understanding such forces and their spatial correlations, specifically in response to forces at the system boundaries, represents a fundamental goal of granular mechanics. The problem is of relevance to civil engineering, geophysics and physics, being important for the understanding of jamming, shear-induced yielding and mechanical response. Here we report measurements of the normal and tangential grain-scale forces inside a two-dimensional system of photoelastic disks that are subject to pure shear and isotropic compression. Various statistical measures show the underlying differences between these two stress states. These differences appear in the distributions of normal forces (which are more rounded for compression than shear), although not in the distributions of tangential forces (which are exponential in both cases). Sheared systems show anisotropy in the distributions of both the contact network and the contact forces. Anisotropy also occurs in the spatial correlations of forces, which provide a quantitative replacement for the idea of force chains. Sheared systems have long-range correlations in the direction of force chains, whereas isotropically compressed systems have short-range correlations regardless of the direction.