On this page, you will find access to my maximum entropy inversion code. The code can be used to reconstruct a distribution given a finite set of moments. Here is a summary of the maximum entropy method.

You can access my code through the interface below. At the bottom of this page, you will find example moments from known distributions. Use those to experiment with the code.

## Usage:

- Known Moments: The set of all known moments for the unknown distribution. Enter one moment per line in the textarea below. Moments are assumed to be integer moments and are given as m0, m1, m2, etc…
- Number of Moments: Specify how many moments you wish to use (from the set of known moments) to reconstruct the distribution
- Lower Bound: Specify the lower bound on the reconstructed distribution
- Upper Bound: Specify the upper bound on the reconstructed distribution

### Advanced Options:

You can leave all of the following options as is.

- Number of Integration Points: Has to do with the numerical quadrature algorithm. Defaults to 80,000
- Maximum number of Iterations: specifies the number of internal iterations of the nonlinear solver
- Tolerance: Specifies the nonlinear solver tolerance
- Finite Difference Jacobian: Use finite difference to compute the Jacobian matrix
- Discrete Distribution: Use this to invert a discrete distribution! Make sure you change the number of integration points. A great example is to compute the distribution corresponding to a dice (uniform). Use m0 = 1, m1 = 3.49999, lower bound = 1, upper bound = 6, and Number of integration points = 6

# Moments from Example Distributions

Beta |
Gaussian |
Double-Gaussian |

1. 0.5000000000000001 0.3749999991311629 0.3124999999802622 0.2734375000012144 0.2460937499999384 0.2255859375000032 0.2094726562499999 0.1963806152343751 0.1854705810546876 0.1761970520019532 0.1681880950927736 0.1611802577972413 0.1549810171127321 0.1494459807872774 0.1444644480943681 0.1399499340914191 0.1358337595593186 |
0.9999994266968616 0.4999997133483987 0.2599997022692129 0.1399996967296319 0.07779969076094071 0.0444996845777087 0.02613967815494728 0.01573967148018561 0.009699464538987164 0.006108757315957036 0.003927181794536062 0.002574317956911923 0.001719000303903706 0.001168269634829738 0.0008074561849708852 0.0005671371694101525 0.0004045383404992402 0.0002928624454037682 |
0.9999998566741582 0.3750000013364857 0.1587499999757829 0.07312500000061401 0.03556562499996196 0.01790624999999081 0.009223867187493191 0.004829472656245672 0.00256078291019178 0.001372244677732859 0.0007422484748574538 0.000404950919312409 0.0002227301469623323 0.0001234611301583385 0.00006895146275735642 0.00003879070760538685 0.00002197886870045499 0.00001254029029070242 |