edu.uah.math.distributions
Class WalkMaxDistribution

java.lang.Object
  extended by edu.uah.math.distributions.Distribution
      extended by edu.uah.math.distributions.WalkMaxDistribution
All Implemented Interfaces:
java.io.Serializable

public class WalkMaxDistribution
extends Distribution
implements java.io.Serializable

This class models the distribution of the maximum value of a symmetric random walk on the interval [0, n].

Version:
August, 2003
Author:
Kyle Siegrist, Dawn Duehring
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.uah.math.distributions.Distribution
CONTINUOUS, DISCRETE, MIXED
 
Constructor Summary
WalkMaxDistribution()
          This default constructor creates a new walk max distribution with time parameter 10.
WalkMaxDistribution(int n)
          This general constructor creates a new max walk distribution with a specified time parameter.
 
Method Summary
 double getDensity(double x)
          This method defines the density function.
 double getMaxDensity()
          This method returns the maximum value of the density function.
 double getSteps()
          This method returns the time parameter.
 void setSteps(int n)
          This method sets the time parameter.
 double simulate()
          This method simulates a value from the distribution.
 java.lang.String toString()
          This method returns a string that gives the name of the distribution and the values of the parameters.
 
Methods inherited from class edu.uah.math.distributions.Distribution
getCDF, getDomain, getFailureRate, getMean, getMedian, getMGF, getMoment, getMoment, getPGF, getQuantile, getSD, getType, getVariance, setDomain, setDomain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WalkMaxDistribution

public WalkMaxDistribution(int n)
This general constructor creates a new max walk distribution with a specified time parameter.

Parameters:
n - the number of steps

WalkMaxDistribution

public WalkMaxDistribution()
This default constructor creates a new walk max distribution with time parameter 10.

Method Detail

setSteps

public void setSteps(int n)
This method sets the time parameter.

Parameters:
n - the number of steps

getDensity

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

Specified by:
getDensity in class Distribution
Parameters:
x - a number in the domain of the distribution
Returns:
the probability density at x

getMaxDensity

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

Overrides:
getMaxDensity in class Distribution
Returns:
the maximum value of the density function

getSteps

public double getSteps()
This method returns the time parameter.

Returns:
the number of steps

simulate

public double simulate()
This method simulates a value from the distribution.

Overrides:
simulate in class Distribution
Returns:
a simulated value from the distribution

toString

public java.lang.String toString()
This method returns a string that gives the name of the distribution and the values of the parameters.

Overrides:
toString in class Distribution
Returns:
a string giving the name of the distribution and the values of the parameters