Why you should be wary of relying on a single histogram of a data set
stats.stackexchange.com
Why you should be wary of relying on a single histogram of a data set
1–10 of 21 posts
Re: Why you should be wary of relying on a single histogram of a data set
#2Re: Why you should be wary of relying on a single histogram of a data set
#3In R, one can simply do:
library("ggplot2")
library("datasets")
ggplot(faithful, aes(x=eruptions)) + geom_density() + geom_rug()
which gives a chart like this (http://jean-francois.im/temp/eruptions-kde.png). Contrast with: ggplot(faithful, aes(x=eruptions)) + geom_histogram(binwidth=1)
which gives a chart like this (http://jean-francois.im/temp/eruptions-histogram.png).Edit: Other plots mentioned in this discussion:
ggplot(faithful, aes(x = eruptions)) + stat_ecdf(geom = "step")
Cumulative distribution, as suggested by leot (http://jean-francois.im/temp/eruptions-ecdf.png) qqnorm (faithful$eruptions)
Q-Q plot, as suggested by christopheraden (http://jean-francois.im/temp/eruptions-qq.png)Re: Why you should be wary of relying on a single histogram of a data set
#4Re: Why you should be wary of relying on a single histogram of a data set
#5Re: Why you should be wary of relying on a single histogram of a data set
#6Interesting paradox. I haven't seen that many statisticians using just a histogram when determining whether a certain distribution fits data reasonably. Kernel Density Estimators are a much better choice (for continuous data, like the data in the post), but they are also affected by your choice of bandwidth. When it comes down to it, like going to the doctor, sometimes the best choice is to get a second (or third!) o…
Re: Why you should be wary of relying on a single histogram of a data set
#7As mentioned, one should really be using a kernel density plot instead of a histogram, except when there are already classes in the data. In R, one can simply do: library("ggplot2") library("datasets") ggplot(faithful, aes(x=eruptions)) + geom_density() + geom_rug() which gives a chart like this ( http://jean-francois.im/temp/eruptions-kde.png ). Contrast with: ggplot(faithful, aes(x=eruptions)) + geom_histogram(binw…
Re: Why you should be wary of relying on a single histogram of a data set
#8As mentioned, one should really be using a kernel density plot instead of a histogram, except when there are already classes in the data. In R, one can simply do: library("ggplot2") library("datasets") ggplot(faithful, aes(x=eruptions)) + geom_density() + geom_rug() which gives a chart like this ( http://jean-francois.im/temp/eruptions-kde.png ). Contrast with: ggplot(faithful, aes(x=eruptions)) + geom_histogram(binw…
But then you would have to choose a certain kernel and assume the data conforms to that distribution which isn't always true.
Re: Why you should be wary of relying on a single histogram of a data set
#9 plot(density(Annie), col="red")
lines(density(Brian), col="blue")
lines(density(Chris), col="green")
lines(density(Zoe), col="cyan")
This is the plot you get: http://i.imgur.com/sY2awX7.pngRe: Why you should be wary of relying on a single histogram of a data set
#10Reminds me of http://en.wikipedia.org/wiki/Simpsons_paradox