public class MultiNomialDistribution extends Distribution implements java.awt.event.ActionListener
| Modifier and Type | Field and Description |
|---|---|
protected int |
k |
protected int |
n |
protected double[] |
p |
int |
type |
protected int[] |
x |
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name| Constructor and Description |
|---|
MultiNomialDistribution()
This default constructor creates a new MultiNomialDistribution(2, {0.5, 0.5})
|
MultiNomialDistribution(int n,
double[] p,
int[] x)
This general constructor creates a new MultiNomialDistribution with specified parameters:
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
This method handles the events associated with the changing the Multinomial probabilities
or x-values.
|
double |
getCDF(int[] x) |
static double |
getCDF(int n,
double[] p,
int[] x)
http://controls.engin.umich.edu/wiki/index.php/Multinomial_distributions
|
double[][] |
getCorrelation() |
static double[][] |
getCorrelation(int n,
double[] p) |
double[][] |
getCovariance()
This method returns the variance-covariance matrix of the Multinomail distribution, which is
defined as sigma(i,j) = E[(Xi - mu(i))(Xj - mu(j))].
|
static double[][] |
getCovariance(int n,
double[] p) |
double |
getDensity(double x)
Define the Multinomial getDensity function
|
double |
getDensity(int[] x)
This method computes the density function of the Multinomail distribution
|
static double[] |
getMean(int n,
double[] p) |
static double[] |
getMLE(int[][] x,
int m,
int d,
int n)
This method returns the array of MLE estimates for the Mulinomial Probabilities.
|
java.lang.String |
getMultiNomialTestResults()
This method returns a Text Array with All cumulative Multinomial results
|
int |
getN() |
java.lang.String |
getOnlineDescription()
This method returns an online description of this distribution.
|
double[] |
getP() |
double[] |
getProbabilities()
This method gets the array of Multinomail parameters (probabilities[]).
|
double |
getProbability(int[] x) |
static double |
getProbability(int n,
double[] p,
int[] x)
This method computes the density function of the Multinomail distribution
|
int[] |
getXvalues()
This method gets the array of Multinomail parameters (x-Values[]).
|
int |
getXvaluesSum()
This method gets the array of Multinomail parameters (x-Values[]).
|
void |
initialize()
used for some subclass to initialize before being used
|
void |
setParameters(int n,
double[] p,
int[] x) |
void |
valueChanged() |
addObserver, betaCDF, comb, factorial, findGFRoot, findRoot, gamma, gammaCDF, getCDF, getDisplayPane, getDomain, getFailureRate, getGFDerivative, getGFSecondDerivative, getInstance, getLocalHelp, getMaxDensity, getMean, getMean, getMedian, getMGF, getMgfDomain, getName, getPGF, getPGFDomain, getQuantile, getSampleMoment, getSD, getSOCRDistributionFunctors, getSOCRDistributions, getType, getVariance, getVariance, inverseCDF, logGamma, paramEstimate, perm, sampleMean, sampleVar, setApplet, setDomain, setDomain, setMGFDomain, setMGFDomain, setMGFParameters, setMGFParameters, setMGFParameters, setMGFParameters, setParameters, setPGFDomain, setPGFDomain, setPGFParameters, setPGFParameters, setPGFParameters, setPGFParameters, simulate, update, valueChangedcreateComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSettersprotected int k
protected int n
protected double[] p
protected int[] x
public int type
public MultiNomialDistribution(int n,
double[] p,
int[] x)
n - Total Sum of X-values (Frequencies)p - array of Probabilities/likelihoods of all outcomespublic MultiNomialDistribution()
public void initialize()
Distributioninitialize in class Distributionpublic void valueChanged()
valueChanged in class Distributionpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenere - the action eventpublic double[] getProbabilities()
probabilities - the array of the probailities of the Multinomial Distributionspublic int[] getXvalues()
public int getXvaluesSum()
public double getProbability(int[] x)
public double getDensity(double x)
getDensity in class Distributionpublic int getN()
public double[] getP()
public double getCDF(int[] x)
public double[][] getCovariance()
public double[][] getCorrelation()
public double getDensity(int[] x)
x - a vector of outcomes ipublic static double getProbability(int n,
double[] p,
int[] x)
n - Total sum ov x-values vector (total frequenciesp - multinomial probabilitiesx - X-values (frequency) vectorpublic static double getCDF(int n,
double[] p,
int[] x)
n - total sum of the x-value (frequency) vectorp - Multinomial Probabilitiesx - X-values (frequencies)public static double[] getMean(int n,
double[] p)
public static double[][] getCovariance(int n,
double[] p)
public static double[][] getCorrelation(int n,
double[] p)
public java.lang.String getMultiNomialTestResults()
public static double[] getMLE(int[][] x,
int m,
int d,
int n)
x - double array of X-values -- list of observations used to evaluate prob-parametersm - the number of observations used to evaluate parametersd - the dimension of each observationn - the number of independent trials for each seriespublic void setParameters(int n,
double[] p,
int[] x)
public java.lang.String getOnlineDescription()
getOnlineDescription in class Distribution