For X∼N(μ,σ2)X \sim \mathcal{N}(\mu, \sigma^2)X∼N(μ,σ2), return P(a≤X≤b)P(a \leq X \leq b)P(a≤X≤b).
Standardise both ends and difference the CDF, which you can write with the error function:
Input
mu = 0.0 sigma = 1.0 a = -1.0 b = 1.0
Output
0.6826894921370859
This one's part of Premium. Unlock the full Probability track plus every other premium problem on the site.
solve(...)