How to determine the distribution of data using r

I have data as shown below and I need to determine the distribution of data. Pls help.

x <- c(37.50,46.79,48.30,46.04,43.40,39.25,38.49,49.51,40.38,36.98,40.00,38.49,37.74,47.92,44.53,44.91,44.91,40.00,41.51,47.92,36.98,43.40) 
+6
source share
2 answers

The best approach is to use the fitdistrplus package, which provides tools for installing distribution. For example, your data.

 library(fitdistrplus) descdist(x, discrete = FALSE) 

enter image description here

Now you can try to install different distributions. For instance:

 normal_dist <- fitdist(x, "norm") 

abs subsequently checks for compliance:

 plot(normal_dist) 

Installation


As a general point, I would suggest that you watch this discussion in Cross Validated, where the topic is discussed in length. You can also take a look at Delignette-Muller and Dutang paper - fitdistrplus: R package for distributions , available here if you are interested in a more detailed explanation of how to use Cullen and Frey graphs.

+19
source

First, you can do this to plot a histogram and impose a density

 hist(x, freq = FALSE) lines(density(x)) 

Then you see that the distribution is bimodal, and it can be a mixture of two distributions or any other.

Once you have determined the distribution of candidates, qqplot can help you visually compare quantiles.

+4
source

All Articles