We generalize the concept of the autocorrelation function to arbitrary physical variables and show how it can be used to define a local autocorrelation function. Using the local autocorrelation function we develop a new method to generate densities for arbitrary physical quantities. In addition, we show that the generalized autocorrelation function can be used to characterize functions with respect to a physical property.