I tried to visualize a Power Law p(x)=x^(-2.5) with following R code. When you use an log-scale in the end you get a lot of vibrations what is okay as can be seen here
But know, and this is my Problem, I read an article where the author says I have to use a cumulative distribution function to remove this vibrations at the end. But for me it doesn't work, as can be seen here
library(ggplot2)
chol_r <- read.table("C:\\Users\\me\\Desktop\\1M_just_random_py.txt",
header = FALSE)
chol <- (chol_r)**(-2.5) #this p(x)
chol2 = (1/1.5)*chol_r**(-1.5) # the cumulative distribution function
qplot(chol2,
geom="histogram",
binwidth = 0.001, #0.001 oder 0.38
main = "Histogram",
xlab = "Numbers",
fill=I("blue"),
col=I("red"),
log="xy")
So does anybody know what I am doing wrong? Or how i can get a straight line falling without that vibrations? I really don't know what I am doing wrong