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

85 questions
Filter by
Sorted by
Tagged with
37k 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 ...
• 1,171
261k 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 ...
• 1,283
41k 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 (...
• 421
18k 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 ...
• 2,163
310k 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? ...
• 3,679
4k 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 ...
• 500
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 ...
• 153
25k 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. ...
• 295
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 ...
• 397
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 ...
• 807
12k 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 ...
• 591
80k 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 ...
• 631
5k 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 ...
• 661
6k 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 ...
• 3,418
65k 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? 27k 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 ...
• 155
7k 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 "...
481 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 ...
1k views

### inferring heavy-tail distribution from finite sample of histogram data

I have some data in the form of bins and counts. Here is one complete non-truncated example: ...
• 41
54k 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%). ...
8k 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 ...
• 143
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 ...
8k 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 ...
• 145
5k views

### How to smear a histogram

I was asked to perform a Gaussian smearing on the bins of an histogram. What does this mean?
• 141
8k 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 ...
• 286
970 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" ... 499 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 ...
• 7,110
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 ...
• 413
24k 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 ...
• 277
2k 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 ...
• 181
3k 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: ...
532 views

### Outlier/anomaly detection on histograms

So, the idea is that I have many histograms, each one representing results for something. So, I have histogram_1 for object_1, histogram_2 for object_2,...,histogram_20 for object_20. How can throw ...
2k views

### Verifying that a random generator outputs a uniform distribution

I asked a student of mine this question: If you have a random number generator that outputs a number between $1$ and $k$, how would you write a test that decides whether the generated ...
• 1,751
8k 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. ...
• 2,524
3k 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 ...
• 203
21k 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 ...
• 43
13k 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 ...
• 43
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 ...
• 591
7k 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 ...
• 275
6k 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? ...
• 351
177 views

### How long is a distribution considered normal?

I have a dataset of metric distances ($n=5800$) and plotted those as a histogram. My initial thought was that this distribution looks normal. But after performing a Shapiro Wilk test and plotting the ...
• 129
4k 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 ...
• 31
21k 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, ...
• 179
2k 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 ...
• 1,161
46k 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 ... 7k 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 ...
• 591
29k views

### How can I determine weibull parameters from data?

I have a histogram of wind speed data which is often represented using a weibull distribution. I would like to calculate the weibull shape and scale factors which give the best fit to the histogram. ...
• 1,227
17k 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 ...
• 21.6k
996 views

### How does one graph the PDF of a variable having a mixed discrete-continuous distribution?

Simple question: how to graph the PDF of a mixed discrete-continuous distribution? Does it require one graph for the continuous portion and a separate graph for the discrete? Also, is such a beast ...
• 28.3k