# 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.

72 questions
Filter by
Sorted by
Tagged with
31k 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 ...
171k 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 ...
28k 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 (...
15k 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 ...
17k 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. ...
3k 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 ...
10k 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 ...
49k 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 ...
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 ...
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 ...
255k 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? ...
3k 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 ...
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 ...
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 ...
5k 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 "...
6k 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 ...
1k 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 ...
6k 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 ...
5k 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 ...
3k views

### How to smear a histogram

I was asked to perform a Gaussian smearing on the bins of an histogram. What does this mean?
49k 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?
16k 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 ...
35k 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%). ...
169 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 ...
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 ...
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: ...
390 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 ...
16k 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,...
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. ...
4k 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 ...
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 ...
2k 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 ...
4k 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? ...
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 ...
5k 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, ...
6k 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 ...
5k 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.
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 ...
24k 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 ...
9k 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 ...
668 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 ...
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 ...
2k views

### What is the proper way to compute the r-squared between a binned distribution of observed values and a continuous probability density function?

I have circular data -- observations each of which falls between -180 degrees and +180 degrees -- divided into a 15-bin histogram. I'd like to see how well a continuous PDF -- specifically a mixture ...
3k views

### Why does the area of a bar in a histogram represent the frequency of that particular class

In a bar-graph, the height of the bars represent the frequency of a particular category but it is counter-intuitive that in a histogram, instead of the height of the bar(which represents the frequency ...
5k 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 ...
1k views

### What PDF should be fit to a rank histogram? [closed]

A Rank Histogram (or Talagrand Diagram) is a neat way of measuring whether your numerical model is giving appropriate variance. It's used for weather and climate forcasting, where you only have one ...
5k 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 ...
329 views

### How can I identify probability mass functions with known proportions of contribution in a series of histograms?

Suppose I have two real-valued PMFs $f(i)$ and $g(i)$ with $1\le i\le N$ and $N$ is about 1 billion. The functions $f$ and $g$ can be assumed to be continuous on the positive integers, one-sidedly so ...
How does one go about averaging multiple histograms of a quantity $x,$ if the individual histograms do not have the same range, that is, $R_i=\text{max}(x_i)-\text{min}(x_i)$ will be different for two ...