1. Hello, I need some help with an assignment. I have very minimal programming experience, and I'm lost on an assignment for one of my math classes. I need to generate sample paths of Brownian Motion. I'll be using a recursive formula based on Gaussian variables x1 ,x2, ..., xn. Now, can someone tell me how to generate, or direct me to a reference for generating Gaussian variables? Additionally, any discussion on whether or not its possible in Excel, and if so how to, convert uniform random variables to Gaussian variables would be very helpful!  2.

3. I will give you an algorithm, which I am getting from memory, but it may be completely wrong, so verify it.

The basic idea is to generate standard Gaussian variables in pairs - the two variables will be independent.

The density function is exp(-(x²+y²)/2)/2π. Convert to polar coordinates and the density function is exp(-r²/2)r/2π.

With a little manipulation, r=√(-2lnA) and θ = 2πB, where A and B are random variables, uniform between 0 and 1.

Finally X = rcosθ and Y = rsinθ are independent standard Gaussian variables.  gaussian, programming, statistics, variables 