# Questions tagged [histogram]

A histogram is a graphical representation of the frequencies of a continuous variable. The variable is divided into bins and a bar is drawn for each bin, proportional to its frequency in the data.

78 questions
Filter by
Sorted by
Tagged with
4answers
33k views

### Assessing approximate distribution of data based on a histogram

Suppose I want to see whether my data is exponential based on a histogram (i.e. skewed to the right). Depending on how I group or bin the data, I can get wildly different histograms. One set of ...
8answers
205k views

### Calculating optimal number of bins in a histogram

I'm interested in finding as optimal of a method as I can for determining how many bins I should use in a histogram. My data should range from 30 to 350 objects at most, and in particular I'm trying ...
5answers
33k views

### How to test if my distribution is multimodal?

When I plot a histogram of my data, it has two peaks: Does that mean a potential multi-modal distribution? I ran the dip.test in R (...
2answers
16k views

### QQ plot does not match histogram

I have a histogram, kernel density and a fitted normal distribution of financial log returns, which are transformed into losses (signs are changed), and a normal QQ plot of these data: The QQ plot ...
2answers
20k views

### If my histogram shows a bell-shaped curve, can I say my data is normally distributed?

I created a histogram for Respondent Age and managed to get a very nice bell-shaped curve, from which I concluded that the distribution is normal. Then I ran the normality test in SPSS, with n = 169. ...
3answers
2k views

### Benefits of using QQ-plots over histograms

In this comment, Nick Cox wrote: Binning into classes is an ancient method. While histograms can be useful, modern statistical software makes it easy as well as advisable to fit distributions to ...
3answers
4k views

### Need help identifying a distribution by its histogram

I have the sample population of a certain signal's registered amplitude maxima. Population is about 15 million samples. I produced a histogram of the population, but cannot guess the distribution with ...
2answers
11k views

### Normalizing a 2D-histogram and getting the marginals

I have a 2D-histogram for two vectors, s1 and s2, generated using the hist3 function in Matlab: [hist2D, binC] = hist3([s1' s2']); I am normalizing it by making ...
2answers
2k views

### How do you find a cutting point / strong slope within one-dimensional data

I have one-dimensional data. I want to find possible natural cutting points (strong slopes) within the data. For instance, if the data is ...
5answers
61k views

### How to assess the similarity of two histograms?

Given two histograms, how do we assess whether they are similar or not? Is it sufficient to simply look at the two histograms? The simple one to one mapping has the problem that if a histogram is ...
5answers
282k views

### R - QQPlot: how to see whether data are normally distributed

I have plotted this after I did a Shapiro-Wilk normality test. The test showed that it is likely that the population is normally distributed. However, how to see this "behaviour" on this plot? ...
2answers
2k views

### How to estimate the third quartile of binned data?

Is there any technical trick to determine the third quartile if it belongs to an open interval which contains more that one fourth of the population (so I can't close the interval and use the standard ...
2answers
4k views

### Should the predictor variables be normally distributed for Poisson glm?

This is probably a really basic question, but it's the first time I've created a model that defines Poisson as its error family. In setting up my variables to make the model, should I be concerned ...
1answer
5k views

### Goodness of fit for 2D histograms

I have two sets of data representing stars parameters: an observed one and a modeled one. With these sets I create what is called a two-color-diagram (TCD). A sample can be seen here: A being the ...
3answers
25k views

### My distribution is normal; Kolmogorov-Smirnov test doesn't agree

I have a problem with the normality of some data I have: I've done a Kolmogorov test which says it isn't normal with p=.0000, I don't understand: the skewness of my distribution =-.497, and the ...
2answers
6k 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 "...
1answer
7k views

### I log transformed my dependent variable, can I use GLM normal distribution with LOG link function?

I have a question concerning Generalized Linear Models (GLM).My dependent variable (DV) is continuous and not normal. So I log transformed it (still not normal but improved it). I want to relate the ...
4answers
43k views

### Comparing two histograms using Chi-Square distance

I want to compare two images of faces. I calculated their LBP-histograms. So now I need to compare these two histograms and get something that will tell how much these histograms are equal (0 - 100%). ...
4answers
7k views

### Is it appropriate to plot the mean in a histogram?

Is it "okay" to add a vertical line to a histogram to visualize the mean value? It seems okay to me, but I've never seen this in textbooks and the likes, so I'm wondering if there's some sort of ...
3answers
5k views

### Clustering distributions

I have several distributions (10 distributions in the figure below). In fact these are histograms: there are 70 values on the x-axis which are the sizes of some particles in a solution and for each ...
2answers
326 views

### What is this “phenomenon” called?

Below is a histogram of some data, the bins are integers the other parameters are irrelevant. As you can see there seems to be two separate but overlapping normal distributions for odd and even ...
2answers
4k views

### How to smear a histogram

I was asked to perform a Gaussian smearing on the bins of an histogram. What does this mean?
2answers
6k views

### Confidence interval for the height of a histogram bar

Let $X_1, X_2, \dotsc, X_k$ be an i.i.d. sample of a random variable $X$. I plot these in a histogram and would like to include a confidence interval for the height of each histogram bar. Do you know ...
4answers
55k views

### Difference between histogram and pdf?

If we want to visibly see the distribution of a continuous data, which one among histogram and pdf should be used? What are the differences, not formula wise, between histogram and pdf?
5answers
19k views

### Separating the populations in a bimodal distribution

I have a data set which displays a bimodal distribution. This was determined by plotting a histogram of the frequency vs number. I now need to separate the two original populations and therefore ...
1answer
2k views

### Comparing and visualising highly skewed distributions

The data I'm working with are highly skewed, with the vast majority of data concentrated at 0. It seems really hard to highlight the differences between these kind of distributions: ...
2answers
3k views

### Visualizing multiple “histograms” (bar-charts)

I am having difficulties to select the right way to visualize data. Let's say we have bookstores that sells books, and every book has at least one category. For a bookstore, if we count all the ...
2answers
446 views

### Is visualization sufficient rationale for transforming data?

Problem I would like to plot the variance explained by each of 30 parameters, for example as a barplot with a different bar for each parameter, and variance on the y axis: However, the variances are ...
1answer
5k views

### Why is my density plot just a line on the bottom?

Basically, I'm just trying to plot a curve over my histogram for the weight of a few students. lines(density(weight), lwd = 2, col = "red") However, what I get ...
2answers
19k views

### Calculating the variance of the histogram of a grayscale image

I am doing image processing and I want to calculate the variance of a histogram of pixel intensities. The first method I have tried: The images store the pixels values using double precision numbers, ...
3answers
1k views

### Can the 'bin size' in a histogram be thought of as a regularity constraint?

When thinking about a histogram as an estimate of the density function, is it reasonable to think of the bin size as a parameter that constrains the local structure of that function? Also, is there a ...
2answers
7k views

### How to calculate skewness of data from histogram in R?

In R, the function skewness from package moments allows one to calculate the skewness of the distribution from a given sample. ...
2answers
2k views

### Is there a better way than side-by-side barplots to compare binned data from different series

I have a number histogram from a data source. I want to compare their distribution. For example series 2 is more to the right than series 1. Is there any good way to contrast besides plotting the ...
1answer
19k views

### how to determine skewness from histogram with outliers?

I have the following histogram created in Minitab. I am wondering whether this histogram is actually positively skewed, negatively skewed, or symmetric. By observing the graph itself, it seems that ...
1answer
10k views

### Calculating uncertainties for histogram bins of experimental data with known measurement errors

I have a set of experimental data (with each data-point having its own measured uncertainty), and I wish to produce a histogram of it. The x values of the edges of each bin are already defined. The ...
1answer
693 views

### How to compute values of a histogram for a given density function?

If I know the distributional parameter of a distribution (lognormal, in this case) I can plot the density function. If I want to convert the density into a histogram, I should calculate the "height" ...
1answer
3k views

### How can I perform a chi-square test for independence on signal samples?

Let's say I have two signals $x$ and $y$, sampled $N$ times, i.e. $$x = [ x_{1}, x_{2}, ..., x_{N} ]$$ $$y = [ y_{1}, y_{2}, ..., y_{N} ]$$ I would like to check whether $x$ and $y$ are ...
2answers
3k views

### Does this histogram of residuals indicate that the residuals are effectively random?

I am studying a univariate and discrete time series. I know that residuals should be effectively random and have a good fit, and should have a bell shape. Does the plot below suggest that the ...
1answer
5k views

### Calculating Mean and Standard Deviation From Frequency Chart

I have only a frequency table like that below. How can I get the mean and standard deviation? ...
2answers
6k views

### Calculating the mutual information between two histograms

I've been set a sample exercise by my supervisor, and I'm totally lost as to where I should be heading. What I've been tasked with is to generate two histograms that approximate Gaussian PDFs. Then, ...
4answers
34k views

### What information does a Box Plot provide that a Histogram does not?

Histograms give a good sense of the distribution of a variable. Box plots attempt to do the same thing however, don't give as good of a picture of the distribution of this variable. I don't ...
1answer
12k views

### Optimal number of bins in histogram by the Freedman–Diaconis rule: difference between theoretical rate and actual number

Wikipedia reports that under the Freedman and Diaconis rule, the optimal number of bins in an histogram, $k$ should grow as $$k\sim n^{1/3}$$ where $n$ is the sample size. However, If you look at ...
3answers
7k views

### How to perform a non-equi-spaced histogram in R?

From the R docs for hist: R's default with equi-spaced breaks (also the default) is to plot the counts in the cells defined by breaks. Thus the height of a rectangle is proportional to the ...
2answers
6k views

### Sample from distribution given by histogram

Given a histogram obtained using given data points, how do I randomly sample from the distribution predicted by the histogram? Any conceptual comment / R code would be welcome.
1answer
1k views

### How the Pearson's Chi Squared Test works

Following a recent down vote I have been trying to check my understanding of the Pearson Chi Squared test. I usually use the chi squared statistic (or reduced chi squared statistic) for fitting or ...
3answers
5k views

### Comparing two histograms

I would like to know what are the common techniques to compare two histograms? I have histogram of two images and I want to see are they similar or not meaning that is there any correlation between ...
3answers
6k views

### How to compare joint distribution to product of marginal distributions?

I have two finite-sampled signals, $x_1$ and $x_2$, and I want to check for statistical independence. I know that for two statistically independent signals, their joint probability distribution is a ...
3answers
706 views

### How to build an “equilibrated histogram”?

I would like to create an "equilibrated histogram" with roughly the same number of data points in each bin. The second restriction I have is that I should have only 4 bins. Given the following list of ...
1answer
3k views

### how to scale the density plot for my histogram

I have the histogram plot and I'd like to overlap it with density line for the same data. Importantly, I don't want to turn histogram into density values, but want to keep N (numbers) on y axis. Is ...
2answers
2k views

### Histogram/distribution fitting for this dataset with unequal and open-ended intervals?

I have this income distribution data for various groups: https://docs.google.com/spreadsheet/ccc?key=0Akwg3n_e05cCdEdtT0VZYU5keW5DVkNoNmpBWmdzeUE As you can see, I have intervals/bins with varying ...