I\'m trying to get a vector of cumulative sums, that is, I have:
# 500 Samples from the U(0,1) Distribution U<-runif(500,0,1) # Empty Vector of leng
Please correct me if I'm misunderstanding, but I believe you simply want this:
I <- cumsum(sqrt(1 - U^2))
It is unclear why you want to use for loops.
for