Monte Carlo simulation of algebraic models

Launch the application Tutorial


This program is designed to repeatedly simulate an algebraic equation model of an "experiment" a user-given number (N) of times, where the "variables" in the experiment have a random outcome, as in most "real" experiments. It provides a statistical summary of the results of this simulated set of N experiments, and thereby gives a predictive statistical measure of real experimental outcomes

Random outcomes are represented in the model by "random variables" (RV's) generated in the computer by simulation. The algebraic system model has the form: y = f( x1, x2, x3, . ). The dependent RV "y" is the simulated outcome, and f() is a linear or nonlinear function of the several independent RV's: x1, x2, ., xN, each assumed to be statistically independent of the others. Please note that there is no need to explicitly state the result variable y in the system equation; it is prepended with every submission and thus, implied. The model and the probability distributions of x1, x2, etc. must be specified by the user.

The model is given in the first window by first filling in the algebraic equation in the box. Random variables must adhere to the common identifier naming convention (i.e. a single or multiple letters followed by numbers). A simple convention to follow is the following: x1, x2, etc, i.e. x followed by an integer. Numerical constants in the equation may be single or double precision number type.

The choice of distributions for x1, x2, etc. is limited to three common types: normal (gaussian), log-normal, and uniform. The user must choose one for each of the x1, x2, etc., and then specify two statistics for each: its mean and its standard deviation (SD), or its interval [a,b] for uniform distribution.

Results for outcome y are given as: (sample) mean, median, standard deviation and 95% confidence limit. A graphical histogram for y is also given.

How to run

Click on the link "Launch the application". A small setup file (JNLP-file) will be downloaded shortly. Once downloaded, open it (Java Runtime is required). Now, the actual application is being downloaded from UCLA server. When you see a security warning, just allow running this application.

How to use

Enter your algebraic expression using the following operators:
  • Addition: '2 + 2'
  • Subtraction: '2 - 2'
  • Multiplication: '2 * 2'
  • Division: '2 / 2'
  • Exponentation: '2 ^ 2'
  • Unary Minus,Plus (Sign Operators): '+2 - (-2)'
  • Modulo: '2 % 2'
The following functions are supported:
  • abs: absolute value
  • acos: arc cosine
  • asin: arc sine
  • atan: arc tangent
  • cbrt: cubic root
  • ceil: nearest upper integer
  • cos: cosine
  • cosh: hyperbolic cosine
  • exp: euler's number raised to the power (e^x)
  • floor: nearest lower integer
  • log: logarithmus naturalis (base e)
  • sin: sine
  • sinh: hyperbolic sine
  • sqrt: square root
  • tan: tangent
  • tanh: hyperbolic tangent


  • Ilya Moiseenko
  • Professor Joseph DiStefano III