powered by
KS_distance calculates the Kolmogorov-Smirnov distance between two pdfs.
KS_distance
KS_distance(theta, p_theta, q_theta)
a vector of numerics containing values of the RV \(\theta\)
a vector of numerics containing values of the pdf p at locations theta
a vector of numerics containing values of the pdf q at locations theta
The Kolmogorov-Smirnov distance between p and q
# NOT RUN { theta=seq(from=-5,to=5,by=0.1) p_theta = dnorm(theta,mean = 0.2,sd = 1) q_theta = dnorm(theta,mean = 0.25,sd = 0.5) # }
Run the code above in your browser using DataLab