# histogram bin size vs. data sampling rate

I have a set of numerical signals that give me a set of zeros calculated based on some numerical procedure. I make a histogram of those zeros.

Here, a following problem arises:

If the histogram resolution is declared greater than sampling rate for signals’ data some oscillation in the histogram starts to appear. A frequency of it equals to the sampling rate for the signal.

• Is this a common effect?
• Is a histogram bin size related in some way to a sampling rate?
• not quite sure what you're referring to. I think it'd help if you clarified what "a set of zeros" is – if I literally interpret it, it's $S=\{0\}$, because that's the only set that exists that contains only zeros. But I'm pretty sure that's not what you mean, because the histogram would be a bit boring. I generally think explaining how you calculate that, and what it signifies to you, will be key to a good answer! – Marcus Müller Mar 8 '19 at 15:40
• Histograms cannot depict oscillations and any change to the sampling frequency would only affect its "amplitude". Are you sure what you see is a histogram? – A_A Mar 8 '19 at 16:23
• A histogram can have as many bins as you want it to. Ideally, you should find the smaller number of bins that can still be instructive to what you are trying to observe. Since the histogram bin size is ultimately determined by the user, there is a chance that whatever software you are using to make some date will do some automatic size if it is not specified by the user, and this could be a function of the number of samples, which in itself will be a function of the sampling rate for a measurement over some time. – Luis Costa Mar 10 '19 at 21:24