edu.ucla.stat.SOCR.distributions
Class LocationScaleDistribution

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.LocationScaleDistribution
All Implemented Interfaces:
IValueSettable, Pluginable, java.util.Observer

public class LocationScaleDistribution
extends Distribution

This class applies a location-scale tranformation to a given distribution. In terms of the corresponding random variable X, the transformation is Y = a + bX


Field Summary
 
Fields inherited from class edu.ucla.stat.SOCR.core.Distribution
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name
 
Constructor Summary
LocationScaleDistribution(Distribution d, double a, double b)
          This general constructor creates a new location-scale transformation on a given distribuiton with given location and scale parameters
 
Method Summary
 double getCDF(double x)
          This method returns the cumulative distribution function
 double getDensity(double x)
          This method defines the getDensity function
 double getMaxDensity()
          This method returns the maximum value of the getDensity function
 double getMean()
          This mtehod returns the mean
 double getQuantile(double p)
          This method returns the getQuantile function
 double getVariance()
          This method returns the variance
 void setParameters(Distribution d, double a, double b)
          This method sets the parameters: the distribution and the location and scale parameters
 double simulate()
          This method returns a simulated value from the distribution
 
Methods inherited from class edu.ucla.stat.SOCR.core.Distribution
addObserver, betaCDF, comb, factorial, findGFRoot, findRoot, gamma, gammaCDF, getDisplayPane, getDomain, getFailureRate, getGFDerivative, getGFSecondDerivative, getInstance, getLocalHelp, getMean, getMedian, getMGF, getMgfDomain, getName, getOnlineDescription, getPGF, getPGFDomain, 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

LocationScaleDistribution

public LocationScaleDistribution(Distribution d,
                                 double a,
                                 double b)
This general constructor creates a new location-scale transformation on a given distribuiton with given location and scale parameters

Method Detail

setParameters

public void setParameters(Distribution d,
                          double a,
                          double b)
This method sets the parameters: the distribution and the location and scale parameters


getDensity

public double getDensity(double x)
This method defines the getDensity function

Specified by:
getDensity in class Distribution

getMaxDensity

public double getMaxDensity()
This method returns the maximum value of the getDensity function

Overrides:
getMaxDensity in class Distribution

getMean

public double getMean()
This mtehod returns the mean

Overrides:
getMean in class Distribution

getVariance

public double getVariance()
This method returns the variance

Overrides:
getVariance in class Distribution

simulate

public double simulate()
This method returns a simulated value from the distribution

Overrides:
simulate in class Distribution

getCDF

public double getCDF(double x)
This method returns the cumulative distribution function

Overrides:
getCDF in class Distribution

getQuantile

public double getQuantile(double p)
This method returns the getQuantile function

Overrides:
getQuantile in class Distribution