2
votes

Consider a Normal distribution with mean 0 and standard deviation 1. I would like to divide this distribution into 9 regions of equal probability and take a random sample from each region.

1
What does it mean to divide a distribution in samples? And take a rand number from each sample? Please clarify your question - Luis Mendo
The normal distribution extends to infinity, one cannot divide it into equal ranges. - Ratbert
Thanks Ryan for your response. - user2456984
Thanks Ryan for your response. Yes you are correct the distribution extends to infinity. What I like to have is nine regions inside the distribution. For example, the first say from -infinity to a, second a-b, c-d, d-e, e-f (this one include the mean), and other four to +infinity. Then I would like to select rand number from each interval. - user2456984

1 Answers

3
votes

It sounds like you want to find the values that divide the area under the probability distribution function into segments of equal probability. This can be done in matlab by applying the norminv function.

In your particular case:

segmentBounds = norminv(linspace(0,1,10),0,1)

Any two adjacent values of segmentBounds now describe the boundaries of segments of the Normal probability distribution function such that each segment contains one ninth of the total probability.

I'm not sure exactly what you mean by taking random numbers from each sample. One approach is to sample from each region by performing rejection sampling. In short, for each region bounded by x0 and x1, draw a sample from y = normrnd(0,1). If x0 < y < x1, keep it. Else discard it and repeat.

It's also possible that you intend to sample from these regions uniformly. To do this you can try rand(1)*(x1-x0) + x0. This will produce problems for the extreme quantiles, however, since the regions extend to +/- infinity.