Class implements Normal Distribution. More...

#include <normalDistribution.hpp>

Inheritance diagram for julian::NormalDistribution:
julian::ScaleLocationDistribution julian::ProbabilityDistribution

Public Member Functions

 NormalDistribution (double m, double s)
 Constructor. More...
 
NormalDistributionclone () const
 virtual copy constructor More...
 
 ~NormalDistribution ()
 destructor More...
 
Probability Distribution Interface
double CDF (double)
 calculates value of Probability Distribution Function More...
 
double PDF (double)
 calculates value of Probability Distribution Function More...
 
double invCDF (double)
 calculates quantile More...
 
double mean ()
 returns mean of distribution More...
 
double variance ()
 returns variance of distribution More...
 
void estimate (std::vector< double >)
 estimates mean and standard deviation using Moment Matching Estimation More...
 
Scale Location Interface
double getLocation ()
 returns location parameter More...
 
double getScale ()
 returns scale More...
 
double getShape ()
 returns shape More...
 
void setLocation (double)
 sets mean (location parameter) More...
 
void setScale (double)
 sets standard deviation More...
 
void setShape (double)
 This method does nothing. More...
 
- Public Member Functions inherited from julian::ScaleLocationDistribution
virtual ~ScaleLocationDistribution ()
 destructor More...
 
- Public Member Functions inherited from julian::ProbabilityDistribution
virtual ~ProbabilityDistribution ()
 destructor More...
 

Private Attributes

double m_
 Mean (location parameter) More...
 
double s_
 Standard deviation (scale parameter) More...
 

Detailed Description

Class implements Normal Distribution.

Normal distribution is defined by:

1) Cumulative distribution function of normal random variable X

\[CDF_{X}(t) = \int^{t}_{-\infty} \frac{1}{\sqrt{2\pi \sigma^{2}}}e^{-\frac{(x-\mu )^{2}}{2\sigma ^{2}}} dx \]

2) Probability distribution function of normal random variable X

\[PDF_{X}(t) = \frac{1}{\sqrt{2\pi \sigma^{2}}}e^{-\frac{(x-\mu )^{2}}{2\sigma ^{2}}} \]

3) Parameters

Location

Mean or expectation of the distribution

Scale

Standard deviation of the distribution

Examples:
interpolationExample.cpp.

Constructor & Destructor Documentation

julian::NormalDistribution::NormalDistribution ( double  m,
double  s 
)

Constructor.

Constructor requires parametrization of random variables

julian::NormalDistribution::~NormalDistribution ( )

destructor

Member Function Documentation

double julian::NormalDistribution::CDF ( double  x)
virtual

calculates value of Probability Distribution Function

Implements julian::ProbabilityDistribution.

NormalDistribution * julian::NormalDistribution::clone ( ) const
virtual

virtual copy constructor

Reimplemented from julian::ScaleLocationDistribution.

void julian::NormalDistribution::estimate ( std::vector< double >  data)
virtual

estimates mean and standard deviation using Moment Matching Estimation

Implements julian::ProbabilityDistribution.

double julian::NormalDistribution::getLocation ( )
virtual

returns location parameter

Implements julian::ScaleLocationDistribution.

double julian::NormalDistribution::getScale ( )
virtual

returns scale

Implements julian::ScaleLocationDistribution.

double julian::NormalDistribution::getShape ( )
virtual

returns shape

Method returns nan as the normal distribution is not parametrized with shape parameter

Implements julian::ScaleLocationDistribution.

double julian::NormalDistribution::invCDF ( double  x)
virtual

calculates quantile

Implements julian::ProbabilityDistribution.

double julian::NormalDistribution::mean ( )
virtual

returns mean of distribution

Implements julian::ProbabilityDistribution.

double julian::NormalDistribution::PDF ( double  x)
virtual

calculates value of Probability Distribution Function

Implements julian::ProbabilityDistribution.

Examples:
interpolationExample.cpp.
void julian::NormalDistribution::setLocation ( double  input)
virtual

sets mean (location parameter)

Implements julian::ScaleLocationDistribution.

void julian::NormalDistribution::setScale ( double  input)
virtual

sets standard deviation

Implements julian::ScaleLocationDistribution.

void julian::NormalDistribution::setShape ( double  )
virtual

This method does nothing.

normal distribution is not parametrized by shape parameter

Implements julian::ScaleLocationDistribution.

double julian::NormalDistribution::variance ( )
virtual

returns variance of distribution

Implements julian::ProbabilityDistribution.

Member Data Documentation

double julian::NormalDistribution::m_
private

Mean (location parameter)

double julian::NormalDistribution::s_
private

Standard deviation (scale parameter)


The documentation for this class was generated from the following files:
  • C:/Unix/home/OEM/jULIAN/src/mathematics/distributions/normalDistribution.hpp
  • C:/Unix/home/OEM/jULIAN/src/mathematics/distributions/normalDistribution.cpp