unbbayes.prs.hybridbn
Class NormalDistribution

java.lang.Object
  extended by unbbayes.prs.hybridbn.NormalDistribution

public class NormalDistribution
extends Object


Constructor Summary
NormalDistribution()
           
NormalDistribution(double mean, double variance)
           
 
Method Summary
 double getCDF(double x)
          Calculate P(X <= x) using the standard normal distribution P(Z <= z) where z = (x - mean)/(standard variance) and P(Z <= z) = P(X <= x).
 double getCDFUpperBound(double probability)
          Calculate x using the standard normal distribution from the P(Z <= z) where z = (x - mean)/(standard variance) and P(Z <= z) = P(X <= x).
 double getMean()
          Get the normal distribution mean.
 double getProbability(double x)
          Returns the probability of a given value x for this normal distribution.
 double getProbability(double ini, double end)
          Calculate probability for an interval from CDF.
 double getVariance()
          Get the normal distribution variance.
static void main(String[] args)
           
 void setMean(double mean)
          Set the normal distribution mean.
 void setVariance(double variance)
          Set the normal distribution variance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NormalDistribution

public NormalDistribution()

NormalDistribution

public NormalDistribution(double mean,
                          double variance)
Method Detail

getCDFUpperBound

public double getCDFUpperBound(double probability)
Calculate x using the standard normal distribution from the P(Z <= z) where z = (x - mean)/(standard variance) and P(Z <= z) = P(X <= x).

Parameters:
probability - P(X <= x).
Returns:
The CDF upper bound (x).

getCDF

public double getCDF(double x)
Calculate P(X <= x) using the standard normal distribution P(Z <= z) where z = (x - mean)/(standard variance) and P(Z <= z) = P(X <= x).

Parameters:
x - The CDF upper bound.
Returns:
P(X <= x).

getProbability

public double getProbability(double ini,
                             double end)
Calculate probability for an interval from CDF. P(ini <= X <= end) = P(X <= end) - P(X <= ini).

Parameters:
ini - The interval initial value.
end - The interval end value.
Returns:
The probability for the interval from initial to end value.

getProbability

public double getProbability(double x)
Returns the probability of a given value x for this normal distribution.

Parameters:
x - The value we want to know the probability of.
Returns:
The probability of x for this normal distribution.

getMean

public double getMean()
Get the normal distribution mean.

Returns:
The normal distribution mean.

setMean

public void setMean(double mean)
Set the normal distribution mean.

Parameters:
mean - The normal distribution mean.

getVariance

public double getVariance()
Get the normal distribution variance.

Returns:
The normal distribution variance.

setVariance

public void setVariance(double variance)
Set the normal distribution variance.

Parameters:
variance - The normal distribution variance.

main

public static void main(String[] args)


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.