edu.ucla.stat.SOCR.distributions
Class Convolution

java.lang.Object
  extended by edu.ucla.stat.SOCR.core.SOCRValueSettable
      extended by edu.ucla.stat.SOCR.core.Distribution
          extended by edu.ucla.stat.SOCR.distributions.Convolution
All Implemented Interfaces:
IValueSettable, Pluginable, java.util.Observer

public class Convolution
extends Distribution

This class creates the n-fold convolution of a given distribution


Field Summary
 
Fields inherited from class edu.ucla.stat.SOCR.core.Distribution
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name
 
Constructor Summary
Convolution()
          This defalut constructor creates a new convolution distribution corrrepsonding to the uniform distribution on (0,1), with convolution power 5.
Convolution(Distribution d, int n)
          This general constructor: creates a new convolution distribution corresponding to a specified distribution and convolution power
 
Method Summary
 double getDensity(double x)
          Density function
 Distribution getDistribution()
          This method returns the distribution.
 double getMean()
          Mean
 int getPower()
          This method returns the convolution power.
 double getVariance()
          Variance
 void setDistribution(Distribution d)
          This method sets the distribution.
 void setParameters(Distribution d, int n)
          This method sets the parameters: the distribution and convolution power.
 void setPower(int n)
          This method sets the convolution power.
 double simulate()
          Simulate a value from the distribution
 
Methods inherited from class edu.ucla.stat.SOCR.core.Distribution
addObserver, betaCDF, comb, factorial, findGFRoot, findRoot, gamma, gammaCDF, getCDF, getDisplayPane, getDomain, getFailureRate, getGFDerivative, getGFSecondDerivative, getInstance, getLocalHelp, getMaxDensity, getMean, getMedian, getMGF, getMgfDomain, getName, getOnlineDescription, getPGF, getPGFDomain, getQuantile, getSampleMoment, getSD, getSOCRDistributionFunctors, getSOCRDistributions, getType, getVariance, initialize, inverseCDF, logGamma, paramEstimate, perm, sampleMean, sampleVar, setApplet, setDomain, setDomain, setMGFDomain, setMGFDomain, setMGFParameters, setMGFParameters, setMGFParameters, setMGFParameters, setParameters, setPGFDomain, setPGFDomain, setPGFParameters, setPGFParameters, setPGFParameters, setPGFParameters, update, valueChanged, valueChanged
 
Methods inherited from class edu.ucla.stat.SOCR.core.SOCRValueSettable
createComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Convolution

public Convolution(Distribution d,
                   int n)
This general constructor: creates a new convolution distribution corresponding to a specified distribution and convolution power


Convolution

public Convolution()
This defalut constructor creates a new convolution distribution corrrepsonding to the uniform distribution on (0,1), with convolution power 5.

Method Detail

setParameters

public void setParameters(Distribution d,
                          int n)
This method sets the parameters: the distribution and convolution power. The method computes and store pdf values


getDensity

public double getDensity(double x)
Density function

Specified by:
getDensity in class Distribution

getMean

public double getMean()
Mean

Overrides:
getMean in class Distribution

getVariance

public double getVariance()
Variance

Overrides:
getVariance in class Distribution

simulate

public double simulate()
Simulate a value from the distribution

Overrides:
simulate in class Distribution

setPower

public void setPower(int n)
This method sets the convolution power.


getPower

public int getPower()
This method returns the convolution power.


setDistribution

public void setDistribution(Distribution d)
This method sets the distribution.


getDistribution

public Distribution getDistribution()
This method returns the distribution.