Timeline for Rejection sampling from a normal distribution
Current License: CC BY-SA 3.0
39 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 19, 2014 at 22:40 | vote | accept | user131983 | ||
Mar 19, 2014 at 22:30 | comment | added | Glen_b | An outline of the calculation (corrected) is in my answer. | |
Mar 19, 2014 at 22:29 | answer | added | Glen_b | timeline score: 2 | |
Mar 19, 2014 at 9:41 | comment | added | user131983 | @Glen_b Thanks a lot. I'm sorry for being daft, but how did you calculate the means for those sigma? | |
Mar 19, 2014 at 8:22 | comment | added | Glen_b | No, it's simple. In fact, you can choose $\sigma$ (as long as it's not too big relative to the distance between the bounds, probably some value smaller than 1, like .5 or .7 or something of that order) and then derive $\mu$ in simple fashion. Or slightly less simply, choose $\mu$ as long as it's not too far above $3$ and derive $\sigma$. So there's a collection of possibilities. | |
Mar 19, 2014 at 8:02 | comment | added | user131983 | @Glen_b I think you have just made my code for generating the above figure much easier. Thanks again. With choosing $\mu$ and $\sigma$, in order to ensure that I have 70% of the data within the tail 'distributions', would it just be a trial and error process? | |
Mar 18, 2014 at 23:31 | comment | added | Glen_b | If I take, say a normal with mean $10$ and standard deviation $1$, its pdf is a hill centered at $10$. If I multiply draws from it by a randomly chosen (50-50) value that's either $-1$ or $+1$ (which half the time makes it a N(-10,1) instead), then I get two hills of probability, one around 10 and one around -10, each half as "high" as the original. This is a mixture of two normals. By carefully choosing $\mu$ and $\sigma$, so that it has about a 70% chance of being above 3 and about a 30% chance of being below 3 (as long as $\sigma$ also isn't too big), then we can do the same thing with it. | |
Mar 18, 2014 at 23:26 | comment | added | user131983 | I see. Thank you very much for all your time and patience. One last question I have is, what does "normal with a random sign attached" mean? | |
Mar 18, 2014 at 23:12 | comment | added | Glen_b | The sort of thing yo have in your diagram is a mixture of two normals (or, in effect, a normal with a random sign attached). If you can do that, you can get the probabilities you ask for. | |
Mar 18, 2014 at 23:10 | comment | added | user131983 | @Glen_b Unfortunately, I need to sample from Normal Distributions as the various parameters which I eventually substitute into an equation and run a Monte Carlo on, are each Normally Distributed. | |
Mar 18, 2014 at 22:29 | comment | added | Glen_b | You can't really do it with a normal (you can make it higher by changing $\sigma$, but not that high) - but in any case why would it make more sense to sample from a normal in that case? (Incidentally, your picture isn't sampling from a normal) | |
Mar 18, 2014 at 22:13 | comment | added | user131983 | @Glen_b So, you're suggesting sampling from Uniform Distribution instead of Normal Distribution? If so, is there still a way by which I can hope to do this by continuing to sample from Normal Distributions? | |
Mar 18, 2014 at 22:09 | comment | added | Glen_b | The easiest way to do that is with a mixture of uniform distributions. | |
Mar 18, 2014 at 21:45 | comment | added | user131983 | @Glen_b I don't have a particular shape in mind. I just need the percentages of occurrence associated with those ranges to be satisfied. | |
Mar 18, 2014 at 19:37 | comment | added | Glen_b | Well, your additional information certainly helps, but there's still many ways that might be done. Do you need the resulting distribution to have any particular shape within those ranges? | |
Mar 18, 2014 at 11:45 | comment | added | user131983 | @Glen_b I fear I haven't provided enough information. I'm pretty much a novice in Statistics and I was just wondering what you meant by narrow it down? Thanks a lot. | |
Mar 17, 2014 at 15:04 | comment | added | user131983 | I would want to increase the probability of selecting a number from the tails to 70% so $[-5\sigma,-3\sigma]$ would have a probability of occurrence of 35% and so would $[3\sigma,5\sigma]$. And $[-3\sigma,3\sigma]$ would have a probability of occurrence of 30%. I don't know how to narrow it down any further, so I hope this is enough information. | |
Mar 17, 2014 at 14:41 | comment | added | Glen_b | Do what in particular? I just pointed out there's an infinite number of things that would seem to fit what you're describing; can you narrow it down? | |
Mar 17, 2014 at 14:36 | comment | added | user131983 | @Glen_b Sorry for pestering you, but how would I actually do this? Could I look to scale the integral of the tail portions to 0.5? How would this effect the rest of the distribution? Thanks again. | |
Mar 17, 2014 at 14:28 | comment | added | Glen_b | Then you could sample from literally any distribution with more probability out there in the tails of the original distribution. | |
Mar 17, 2014 at 14:26 | comment | added | user131983 | @Glen_b Thanks for your response. I actually don't know what to expect from this method and therefore don't have anything in particular that I want to achieve. I just want to compare this particular sampling method to a random sampling method that I previously used. | |
Mar 17, 2014 at 14:09 | comment | added | Glen_b | That does clarify somewhat. There's an infinite number of ways to sample from the tails 'with more probability'. What do you need to achieve? | |
Mar 17, 2014 at 13:47 | comment | added | user131983 | @Glen_b I am very sorry. The code is definitely off and doesn't do what I want it to do. I just want to choose samples from the tails at a higher probability than I would choose those from $(-3\sigma, 3\sigma)$. My overall procedure involves sampling randomly from 65 Normal Distributions for each MC Iteration, inputting these values into an equation and getting a result I want to explore the effects of data samples from the tails now. Shall I just increase the variance as you suggested? Thanks a lot for your patience. | |
Mar 17, 2014 at 13:32 | comment | added | Glen_b | It seems like not enough detail is in the framing of your question. I would not have guessed from the way your question was asked that this was the kind of thing you were after. It feels like something relevant is missing. | |
Mar 17, 2014 at 11:33 | comment | added | user131983 |
@Glen_b The diagram was obtained from a code which was meant to increase the probability of drawing a sample from the tails of a distribution. The code in Matlab is as follows: x=0:0.01:1; y=icdf(x); icdf=@(uni)interp1(x,y,uni); %plot some example data hist(icdf(rand(10000000,1)),1000); Another method I was told to consider was given that the cdf of the distribution is known, the parts of the normcdf between [-5sigma,-3sigma] and [3sigma,5sigma] could be normalized to a integral of 1 to increase probability of drawing samples from the tails.
|
|
Mar 17, 2014 at 10:37 | comment | added | Glen_b | $\mu_i$ is the mean of the individual normals. You generate a normal-mean mixture of normals by simulating the mean from its normal distribution, then simulating the observation from it's own normal distribution with the mean just generated (this is the conditional formulation). Or you could simulate the data directly from the normal distribution with the larger spread (an unconditional formulation). $\quad$ By the way, what does your diagram represent, exactly? | |
Mar 17, 2014 at 10:32 | comment | added | user131983 | @Glen_b Thank you very much! This is probably a silly question, but may I ask why $\mu_i$ and $X_i|mu_i$ are different? I'm sorry I'm not able to use equations. | |
Mar 17, 2014 at 10:05 | comment | added | Glen_b | I simply mean that's what it is: If your $\mu_i\sim N(\mu_0,\tau_0^2)$ and your $X_i|\mu_i\sim N(\mu_i,\sigma^2)$, then unconditionally, $X_i\sim N(\mu_0,\tau_0^2+\sigma^2)$. But perhaps you're supposed to be simulating to see that. (Is this for some subject?) | |
Mar 17, 2014 at 9:54 | comment | added | user131983 | @Glen_b Yes, it is a normal location-mixture of normals. May I know why increasing the variance would help? I was wondering if I could do something like the picture I've added to the original question, except with a slight hump in the middle as well. | |
Mar 17, 2014 at 9:51 | history | edited | user131983 | CC BY-SA 3.0 |
added 92 characters in body
|
Mar 17, 2014 at 9:20 | comment | added | Glen_b | Not certain I correctly understood your meaning, but if you're simulating a normal location-mixture of normals, that would be a normal with a larger variance. | |
Mar 17, 2014 at 9:00 | comment | added | user131983 | @Glen_b Thanks. It isn't importance sampling really. I am essentially keen on obtaining a larger percentage of values from the tails as I want to see how these will effect the final output of my Monte-Carlo Simulation. However, the samples I am obtaining are from parameters which have their variabilities modelled through Normal Distributions | |
Mar 16, 2014 at 23:37 | comment | added | Glen_b | As it stands your question is unclear. If you arbitrarily increase the probability of selecting from the tails compared to the center, you're no longer sampling from a normal with variance $\sigma$ (and if that's okay, it's easy - sample from something with higher probability in the tails -- like a normal with large variance). What are you trying to achieve, exactly? Are you trying to do some kind of importance sampling? | |
Mar 16, 2014 at 19:29 | comment | added | user131983 | @gung Could you give me any insights? Thanks. | |
Mar 16, 2014 at 19:24 | history | edited | gung - Reinstate Monica | CC BY-SA 3.0 |
formatted; removed thanks
|
Mar 16, 2014 at 19:24 | history | edited | Andy |
edited tags
|
|
Mar 16, 2014 at 19:22 | history | edited | user131983 | CC BY-SA 3.0 |
edited title
|
Mar 16, 2014 at 19:22 | review | First posts | |||
Mar 16, 2014 at 19:24 | |||||
Mar 16, 2014 at 19:06 | history | asked | user131983 | CC BY-SA 3.0 |