you have done 1 simulation of a random walk with 1000 steps in the walk.

To empirically calculate the two metrics you want, you will have to simulate *many such* walks, and analyse the results.

The first thing I note is that your for loop to create *a* random walk, does not need a for loop and can be simpler:

```
X<-100*exp(cumsum(rnorm(1:n,mu,sigma)))
```

I don't like to write for loops, and will normally use functional programming approach when possible. the tidyverse includes the useful sub-library `purrr`

to make this easy. it has various `map*`

functions that let your repeat an operation many times.

In the below I reuse n to be not just steps per walk, but also walks to simulate. I also only care to keep the last value (x_1000) I can then make a vector of all the x_1000 values , I call this `x_1000s`

```
library(tidyverse)
x_1000s <- map_dbl(1:n,
~{
X<- 100*exp(cumsum(rnorm(1:n,mu,sigma)))
X_1000 <- X[1000]
})
(expected_from_average_of_bootstrap_sampling <- mean(x_1000s))
# p(x_1000) > 200
#from n what is the split seen in the bootstrap sampling ?
table(x_1000s>200)
#so as a single number
(prob_x_1000_gt_200 <-scales::percent(sum(x_1000s>200) / length(x_1000s)))
```

you can alter the above to test whether there are values below 75 in each walk, and return the true/false in a vector, and then see the proportion of those that did and those that didn't. I'll leave that as an exercise for you so you have a chance to learn by doing.