2k views

### Defining bin sizes for plotting histograms [duplicate]

Perhaps a basic question, but is there a method or definition of how to choose the optimum bin size for some data with the intent to plot as a histogram? At present the best option I can think of is ...
• 328
848 views

### Histogram bin size to show deviation from uniform distribution [duplicate]

Simple question: Is there a rule of thumb for number of bins in a histogram with a uniform distribution? Details: I have a stochastic computer simulation that produces, as a test, $n$ values that ...
• 193
14k views

### Number of bins when computing mutual information

I want to quantify the relationship between two variables, A and B, using mutual information. The way to compute it is by binning the observations (see example Python code below). However, what ...
• 5,126
8k views

### Doane's formula for histogram binning

I'm implementing various algorithms to estimated the best number of bins to use for histograms. Most of the ones I am implementing are described on the Wikipedia "Histogram" page in the section "...
8k views

### Best way to put two histograms on same scale?

Let's say I have two distributions I want to compare in detail, i.e. in a way that makes shape, scale and shift easily visible. One good way to do this is to plot a histogram for each distribution, ...
• 8,809
8k views

### Histogram with uniform vs non-uniform Bins

This question describes the basic difference between a uniform and a nonuniform histogram. And this question discusses the rule of thumb for picking the number of bins of a uniform histogram that ...
• 233
7k views

### When to use Equal-Frequency-Histograms

... instead of e.g. the popular Equal-Width-Histograms. Additional question: What is a good/robust rule of the thumb to calculate the number of bins for equal frequency histograms (like the ...
• 10.5k
3k views

### Determining an optimal discretization of data from a continuous distribution

Suppose you have a data set $Y_{1}, ..., Y_{n}$ from a continuous distribution with density $p(y)$ supported on $[0,1]$ that is not known, but $n$ is pretty large so a kernel density (for example) ...
• 45.4k
899 views

### Information loss by histograms

Recently I became curious about what I imagine to be an old problem: the fidelity of histograms to an underlying data set. CrossValidated has a number of questions on the subject of "optimal ...
• 161
1 vote
268 views

### Frequency Distribution

I have a question that is very important to me related to the book Basic Statistics for Business and Economics for organizing data into a frequency distribution: Step 1: Decide on the number of ...
• 11
486 views

### Stratified shuffle for normally distributed target variable

When splitting data for a classification problem one is advised to use stratified shuffling in case the target variable is skewed toward a certain class. Indeed, Sklearn has a function for that. ...
• 53
1 vote