# How can I make a Kolmogorov-Smirnov test to check if my data distribution is exponential?

I made a histogram of my data, and the fitting line, but from some reason the fitting line doesn't fit to my graph. How can I make it fit to it?

How can I check if my data distribution is exponential?

I ran this code in R:

 x<-tazpits\$time_b_arraival_m
summary(x)
Min. 0.0000
1st Qu. 0.2200
Median  0.5550
Mean 0.9802
3rd Qu. 1.2400
Max. 6.2500

h<-hist(x,breaks=104,main="hisogram of time between arrival",
ylab = "frenqency of arriving", xlab = "time in min",
col = "yellow")
xfit<-seq(0,6.25,length=104)
yfit<-dexp(xfit,1/0.9802)
lines(xfit,yfit)


• the second is that you're comparing counts with density. You need your histogram to be scaled to integrate to 1 as well (use freq=FALSE)