Random numbers within a specific range

Hi,
I would like to know how is possible to generate random draws from a normal distribution , where the rv has a specific range.
say within a closed interval [-5, 5].
Thanks

2 Kommentare

Brendan Hamm
Brendan Hamm am 26 Apr. 2015
Well this would no longer be statistically normally distributed as the support is infinite.
msh
msh am 26 Apr. 2015
True, I modified my question to be more precise.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Star Strider
Star Strider am 26 Apr. 2015

0 Stimmen

Considering that:
p = normpdf([-5, 5], 0, 1)
produces:
p =
1.4867e-006 1.4867e-006
so the randn function will produce normally-distributed random variables on the interval (-5,+5) with a probability of about 0.999997 or so.

Weitere Antworten (0)

Kategorien

Mehr zu Random Number Generation finden Sie in Hilfe-Center und File Exchange

Gefragt:

msh
am 26 Apr. 2015

Bearbeitet:

msh
am 27 Apr. 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by