In general, a sample is a part of the total, such as one individual or a set of individuals from a population (of people or things), a small piece or amount of something larger, a number of function values of a function, or part of a song. Sampling, then, is the selection of a subset from a larger whole.
It has distinct meanings in:
- probability theory and statistics: sampling (statistics), statistical sample
- digital signal processing: a sample refers to the value attained by an analog signal acquired at regular intervals when digitising it. The Nyquist-Shannon sampling theorem dictates that this should occur at not less than twice the highest frequency in the sampled waveform. Typically, an analog anti-aliasing filter is applied before sampling to ensure that this is the case. If frequencies higher than half the sampling frequency remain, aliasing will occur, with these frequencies being wrapped around into frequencies within the sampled frequency range.
- music: a sample refers to any sound played back from a digital sampler device based on the principle referred to above.