1

As seen in the code below, I am currently generating random numbers from a Normal Distribution and am selecting the ones within the -3*sigma and 3*sigma interval.
However, I now want to generate numbers such that there is a higher probability that I select numbers from outside the -3*sigma and 3*sigma interval. E.g. a number from [-4*sigma -3*sigma) should have 35% probability of being chosen and same for [3*sigma 4*sigma).
Basically, I'll be calling this function several times and am wondering if there is a way for me to select a higher proportion of random numbers from the "tails" of the normal distribution, without actually altering the shape of the normal distribution.
I have been told to use a "Rejection sampling algorithm" or the "Metropolis-Hastings algorithm" for this problem. I am struggling to understand how to implement either. Could someone provide a slight push in the right direction? I'm using

N = pdf('Normal',136e9-(3*9.067e9):1e8:136e9+(3*9.067e9),136e9,9.067e9)  

to first generate a pdf to draw from. However, I am then unsure which I should take as my "target distribution" and which I should take as the "proposed distribution".

function [new_E11, new_E22] = elasticmodulusrng()

new_E11 = normrnd(136e9,9.067e9,[1 1]);

new_E22 = normrnd(8.9e9,2.373e9,[1 1]);

while new_E11<=-3*9.067e9 && new_E11>=3*9.067e9
        new_E11 = normrnd(136e9,9.067e9,[1 1]);
end

while new_E11<=-3*2.373e9 && new_E11>=3*2.373e9
        new_E22 = normrnd(8.9e9,2.373e9,[1 1]);
end

Thanks

Schorsch
  • 7,761
  • 6
  • 39
  • 65
Jojo
  • 1,117
  • 2
  • 15
  • 28
  • Could you use another distribution with a mean at -3*sigma and use this dsitribution to select your samples? Like a window. Then the tails would be selected more often. – kkuilla Feb 26 '14 at 08:54
  • @kkuilla So, would you suggest using the "previous" Normal Distributions sigma as equivalent to 4* Sigma this time? But, my only worry is that I would then get points that wouldn't actually appear on the "previous" Distribution. Or are you suggesting using the Rejection Sampling algo, where I could take the previous Distribution as the proposed distribution and the tail normal as the target distribution, such that I would get the samples common to them (Is this possible?) – Jojo Feb 26 '14 at 09:02
  • 1
    My understanding is that you want the tails to be drawn more often than the mean. My suggestion would be to generate a second distribution with a mean of 4*sigma of the first one. Draw the value from the second distribution (x-coordinate if you wo wish) but the probablility from the fist one (y-coordinate). Sort of a Mixture of Gaussians. I don't know enough about your application to say whether you would get points that wouldn't appear on the previous distribution. – kkuilla Feb 26 '14 at 09:23
  • 1
    It might be because of your application but I do wonder though why you would use normal distribution if you want to select the tails more often than the mean.... – kkuilla Feb 26 '14 at 09:26
  • @kkuilla Thanks. Well, its because I am looking at a parameter which has a variability that can be depicted via a Normal Distribution. But, I want to see what effects I will get by choosing a larger number of values from the tails of this distribution and inputting it into an Equation which is dependant on this variable. Do you know how I would obtain the probability from the first-distribution associated with a point sampled from the second distribution? – Jojo Feb 26 '14 at 09:37
  • This question and answer might help you with that: http://stackoverflow.com/q/19809792 – kkuilla Feb 26 '14 at 10:10
  • By which factor do you want to increase the probability to draw a value from those tail sections? – A. Donda Feb 26 '14 at 16:37
  • @A.Donda I want to increase the probability of selection of a number from the tail to about 35% for each tail. – Jojo Feb 26 '14 at 17:57
  • Normally, the probability to get a number from [3 sigma, 4 sigma) is about 0.0013. So do I understand you correctly that you want to increase the probability by a factor ~266? The same for the negative tail, which means that values outside of these intervals would occur with a combined probability of 1 – 0.35 – 0.35 = 0.3, instead of 0.997? – Can I ask why you want to do this? The resulting distribution doesn't even look remotely like a normal distribution anymore... – A. Donda Feb 26 '14 at 18:07
  • @A.Donda Thanks! Would it then be possible to use [Rejection Sampling](http://en.wikipedia.org/wiki/Rejection_sampling). I would choose points from the tails with 0.0013 probability of occurrence, but could then use this method to reject most of the points that do not fall within the tails? Is this feasible? – Jojo Feb 26 '14 at 20:24
  • Yes, you can do this with a form of rejection sampling. I'm still curious: Why do you want to do this? What purpose is it intended to serve? – A. Donda Feb 26 '14 at 21:10
  • @A.Donda I am essentially looking at the variability in several parameters that make up an equation and how their variability effects the outcome. The reason I am looking at the tails is because I want to see the effects of points with a big Standard Deviation on the outcome, rather than looking at points close to the mean. Also, using the Rejection Sampling method, do you know how I could possibly form a function of the "proposed distribution", which in this case are the tails? – Jojo Feb 26 '14 at 21:21
  • I'm not familiar with the term, sorry. If you want a distribution with fat tails, I'd recommend to look at the [t distribution](https://en.wikipedia.org/wiki/Student%27s_t-distribution) – A. Donda Feb 26 '14 at 23:19

0 Answers0