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.

Filter by
Sorted by
Tagged with
114
votes
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 ...
101
votes
8answers
200k 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 ...
50
votes
5answers
278k 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? ...
38
votes
5answers
59k 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 ...
34
votes
4answers
63k views

How is Poisson distribution different to normal distribution?

I have generated a vector which has a Poisson distribution, as follows: x = rpois(1000,10) If I make a histogram using hist(x)...
24
votes
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 (...
22
votes
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 ...
20
votes
4answers
42k 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%). ...
19
votes
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?
19
votes
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 ...
18
votes
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 ...
15
votes
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 ...
14
votes
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 ...
14
votes
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 ...
14
votes
3answers
5k 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, ...
13
votes
4answers
33k 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 ...
13
votes
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 ...
13
votes
2answers
440 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 ...
12
votes
2answers
19k 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. ...
12
votes
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 ...
12
votes
3answers
3k views

How to normalize data of unknown distribution

I am trying to find the most appropriate characteristic distribution of repeated measurements data of a certain type. Essentially, in my branch of geology, we often use radiometric dating of minerals ...
11
votes
2answers
10k views

How to 'intelligently' bin a collection of sorted data?

I am trying to intelligently bin a sorted collection. I have a collection of $n$ pieces of data. But I know that this data fits into $m$ unequally sized bins. I don't know how to intelligently choose ...
10
votes
2answers
27k 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. ...
10
votes
3answers
4k 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 ...
10
votes
3answers
5k views

How to compute the Kullback-Leibler divergence when the PMF contains 0s?

I have the following timeseries obtained using the data posted below. For a sliding window size of 10, I am trying to compute the KL-divergence between the PMF of values within the current sliding ...
10
votes
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 "...
10
votes
3answers
1k views

Is there an upper limit on the number of intervals in a histogram?

I've read several articles and excerpts from books that explain how to choose a good number of intervals (bins) for histogram of a data set, but I'm wondering if there's a hard maximum number of ...
10
votes
2answers
1k views

Measuring goodness-of-fit in a model that combines two distributions

I have data with a double peak that I'm trying to model, and there's enough overlap between the peaks that I can't treat them independently. A histogram of the data might look something like this: I'...
10
votes
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 ...
10
votes
1answer
6k 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 ...
9
votes
4answers
2k views

Why doesn't the fact that 1 median is lower than another median, mean that most in group 1 are less than most in group 2?

I believed that the boxplots below could be interpreted as "most men are faster than most women" (in this dataset), primarily because the median men's time was lower than the median women's time. But ...
9
votes
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 ...
9
votes
2answers
4k views

Optimal bin width for two dimensional histogram

There are lots of rules for selecting an optimal bin width in a 1D histogram (see for example) I'm looking for a rule that applies the selection of optimal equal-bin widths on two-dimensional ...
9
votes
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 ...
8
votes
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 ...
8
votes
5answers
18k 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 ...
8
votes
2answers
2k views

Density estimation with a truncated distribution?

I have some data which is clearly truncated on the left. I wish to fit it with a density estimation that will handle it in some way instead of trying to smooth it down. What known methods (as usual, ...
8
votes
1answer
11k 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 ...
8
votes
3answers
946 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 ...
8
votes
2answers
307 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 ...
7
votes
2answers
1k views

Why doesn't my gamma density plot match my histogram of samples?

I'm confused as to why plot is showing such a steep curve for the gamma PDF. I thought that plotting the draws from an inverse-gamma should approximate the PDF, however it doesn't match the plotted ...
7
votes
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?
7
votes
3answers
5k views

Rounding when making a histogram

Suppose that when making a histogram, one encounters a datum at a bin boundary. Is there a convention on how to round it? For example, suppose my data are integer percentages, running from 0% to 100%...
7
votes
2answers
1k views

How to describe a bin in a histogram?

What is common in the literature to refer to a certain bin in a histogram? For example, say I have a histogram with 4 bins. The first bin has all values between 1 to 2, second bin 2 to 3, and so on. ...
7
votes
2answers
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, ...
7
votes
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 ...
7
votes
1answer
6k views

Recreating R's hist function's bin counting

I have some data that I've built histograms out of in R. Now I want to play around with the data, but first I want to summarise it in the same way the histogram does. That is, I want to take my data ...
7
votes
2answers
5k views

Histogram of uncertain data

I have a set of values, each of these values has its own mean and variance. I want to be able to account for this variance when I plot the histogram of the means. Something like an error bar on the ...
7
votes
2answers
1k views

How to differentiate two subgroups from a histogram?

I have a set of samples in which I assume there are 2 definite subsets in it. I plotted their values in a histogram and found that there are two distinct modes as shown in the figure below. My ...
7
votes
1answer
2k views

Using a histogram to estimate class label densities in a tree learner

In a sequential (on-line) tree algorithm, I'm trying to estimate class label densities using a histogram. The algorithm grows a tree by generating test functions at each decision node, which ...

1
2 3 4 5
10