# This script creates a plot of a cdf which is continuous but not absolutely # continuous. # The cdf increases only on the Cantor set. cdfinv<-function(x,k=32){ y<-matrix(0,length(x),k) for(i in 1:k){ x<-2*x y[,i]<-floor(x) x<-x-y[,i] } 2*as.numeric(y%*%3^(-(1:k))) } y<-seq(0,1,length=1e6+1)[-(1e6+1)] x<-cdfinv(y) plot(x,y,type="l",main="CDF which is continuous but NOT absolutely continuous")