Using Monte Carlo Methods to find the "volume" of a 4-dimensional "sphere".

What the hell is a 4-dimensional "sphere", you might ask? I don't know, except to say that is is the locus of a point in 4D space such that it remains a fixed distance from an origin.

Using this property combined with Monte Carlo methods, I hope to find a formula for this "volume".

Introduction

Monte Carlo methods are problems solved using random numbers. This article uses Monte Carlo methods to carry out integration.

To demonstrate how this works, imagine an arbitrary shape constrained inside a square:

Generate a random set of points inside this square. Some of these "shots" will fall inside the shape ("hit").

The area (A) of this shape can then be estimated by the following:

Next: Estimating pi >>