# Cullen and Frey graph can't recognize exponential distribution

I am trying to familiarize myself with the Cullen and Frey plot. So, I generated 1000 exponentially distributed numbers using the command:

x <- rexp(1000, 2)


Then, with the fitdistrplus package, I created the Cullen and Frey plot.

install.packages("fitdistrplus")
library(fitdistrplus)
descdist(x, discrete = FALSE, boot = 200)


The problem is that it does not recognize the numbers in the x vector as exponentially distributed.

Why does this happen?

• What is being shown on the graph? One sample gives one sample skewness and one sample kurtosis, so why are there many points on the graph? Commented Jul 25, 2023 at 8:29
• The blue point is the sample, the yellow points are by bootstrapping. Note the argument in OPs code boot=200 . The exponential distribution lies on the extreme margins of the bootstrapped cloud. Commented Jul 25, 2023 at 21:08
• Your result is irreproducible because it's random and you didn't specify a seed. Do it again and look at the difference. You just happened to get unlucky with this particular sample. (That's an indication that the Cullen-Frey method isn't terribly reliable.)
– whuber
Commented Jul 25, 2023 at 22:00
• @whuber , I get the same results if I set set.seed(50). I suspect that what jbowman said is happening. Commented Jul 26, 2023 at 5:44
• Yes -- that's exactly what I said. When you repeat your study with different seeds (or a random seed), sometimes the results fall where expected on the graph and other times they don't. The problem is that you have only looked at a single dataset, whereas to understand what's going on you need to look at many datasets.
– whuber
Commented Jul 26, 2023 at 14:28

It so happens that skewness and kurtosis are not very accurately estimated for an exponential distribution, even with 1000 observations:

sk <- rep(10,10000)
for (i in seq_along(sk)) {
x <- rexp(1000,2)
sk[i] <- skewness(x)
}
quantile(sk^2, c(0.1,0.25,0.5,0.75,0.9))

10%      25%      50%      75%      90%
2.893270 3.270011 3.786337 4.452599 5.262877


We expect to see skewnesses less than 3.27 roughly 25% of the time.

Kurtosis is, as one might expect, no better; the code revision is straightforward so I don't present it here.

> quantile(ku, c(0.1,0.25,0.5,0.75,0.9))
10%       25%       50%       75%       90%
6.426070  7.162297  8.187794  9.640750 11.569109


Let's put this together and show, in a heuristic way, how unusual your results were for a sample size of 1000:

dt <- data.table(sk2 = rep(0, 1000), ku = rep(0, 1000))
for (i in 1:1000) {
x <- rexp(1000,2)
dt$$sk2[i] <- skewness(x)^2 dt$$ku[i] <- kurtosis(x)
}
x <- densCols(dt$$sk2, dt$$ku, colramp=colorRampPalette(c("black", "white")))
dt$dens <- col2rgb(x)[1,] + 1L ## Map densities to colors cols <- colorRampPalette(c("#FF3100", "#FF9400", "#FCFF00", "#45FE4F", "#00FEFF", "#000099"))(6) dt$$col <- ifelse(dt$$dens >= 250, cols[1], ifelse(dt$$dens >= 200, cols[2], ifelse(dt$$dens >= 150, cols[3], ifelse(dt$$dens >= 100, cols[4], ifelse(dt$$dens >= 50, cols[5], cols[6]))))) ## Plot it, reordering rows so that densest points are plotted on top plot(ku~sk2, data=dt[order(dt$dens),], pch=20, col=col, cex=1, ylim=c(5,15), xlim=c(2,7))

biv_kde <- MASS::kde2d(x1, x2)