|
-
Dec 23rd, 2001, 08:11 AM
#1
Thread Starter
PowerPoster
sampling from a normal distribution
Can anyone help me out with an equation (or algorithm) that I can use in a program I am writing to simulate sampling from a Normal distribution? I also need this for a Lognormal distribution.
I basically need a function:
SampledValue = f(RandomNumber)
Thanks for any help!
-
Dec 23rd, 2001, 09:01 AM
#2
Hyperactive Member
I personally hate the normal distribution - too many nasty questions on Maths papers!
http://www.itl.nist.gov/div898/handb...n3/eda3661.htm
There are 10 types of people in the world - those that understand binary, and those that don't.
-
Dec 23rd, 2001, 09:18 AM
#3
Thread Starter
PowerPoster
Thanks David, but ....
I cannot find an explicit function or equation for the function I need on the page though. Any other references?
If I just had a function that returned the value of a normal cdf, I could probably work out the solution on my own.
Thanks!
-
Dec 23rd, 2001, 01:15 PM
#4
Hyperactive Member
This help?:
http://www.itl.nist.gov/div898/handb...n3/eda3669.htm
To be honest, I don't completely understand what you want
Last edited by DavidHooper; Dec 23rd, 2001 at 01:20 PM.
There are 10 types of people in the world - those that understand binary, and those that don't.
-
Dec 23rd, 2001, 04:24 PM
#5
Fanatic Member
Originally posted by DavidHooper
I personally hate the normal distribution - too many nasty questions on Maths papers!
*Glad to know it's not just me who thinks this
Digital-X-Treme
Contact me on MSN Messenger: [email protected]
[VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
/ (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]
-
Dec 23rd, 2001, 04:26 PM
#6
Frenzied Member
I found a formula which did not enlighten me much, but it might help you. The following is supposed to be the equation for the normal curve.
y = Exp(.5*x^2)/Sqr(2*pi).
A note says that x is measured in standard deviation units from the mean and the area under the curve is exactly one.
I plotted the above and it looks like a normal curve with a mean of zero. I t seem to me that areas under this curve represent probabilities. Thus integrals of the function would be probabilities. For example, the integral from x = - 1 to +1 would be the probability of a given sample value being between one standard deviation below the mean and one above it.
I have no idea how to use the above information for sampling from a normal distribution. Perhaps you can figure out something.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|