niter = 1e5
proba = rep(0,niter)
for (i in 1:niter)
{
r = rnorm(1,.1,.2)
logPrice = log(100)+r
proba[i] = as.numeric(logPrice>= log(110))
}
mean(proba)
## [1] 0.51212
P(x>=110) = 1-P(x<110) = 1-cdf(110) As the log returns is normal IID, log return = log(P/P0) = log(110/100) = .09531018 now, i can use pnorm(log(110/100),.1,.2) This gives cdf(110). but we want P(x>=110) therefore 1-pnorm(log(110/100),.1,.2). Observe the following with the earlier mean(proba)
1-pnorm(log(110/100),.1,.2)
## [1] 0.509354