4  statistical tests Pion B64

N<-1000
df<- data.frame(
  "x"= runif(N),
  "err"=rep(0,N),
  "np"=rep(0,N)
        )

for(i in c(1:N)){
  df$np[i]<-N-i+1
  df$err[i] <- sd(df$x[c(i:N)])/sqrt(df$np[i])
}
gg<-ggplot(df)+geom_point(aes(x=1/sqrt(np), y=err))+theme_bw()
fig<-myplotly(gg,"","1/sqrt(N)","err",to_print = TRUE)

<r >