ITK  5.4.0 Insight Toolkit
itk::Statistics::ChiSquareDistribution Class Reference

#include <itkChiSquareDistribution.h>

Inheritance diagram for itk::Statistics::ChiSquareDistribution:
Collaboration diagram for itk::Statistics::ChiSquareDistribution:

## Public Types

using ConstPointer = SmartPointer< const Self >

using Pointer = SmartPointer< Self >

using Self = ChiSquareDistribution

using Superclass = ProbabilityDistribution

Public Types inherited from itk::Statistics::ProbabilityDistribution
using ConstPointer = SmartPointer< const Self >

using ParametersType = Array< double >

using Pointer = SmartPointer< Self >

using Self = ProbabilityDistribution

using Superclass = Object

Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >

using Pointer = SmartPointer< Self >

using Self = Object

using Superclass = LightObject

Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >

using Pointer = SmartPointer< Self >

using Self = LightObject

## Public Member Functions

double EvaluateCDF (double x) const override

double EvaluateCDF (double x, const ParametersType &) const override

virtual double EvaluateCDF (double x, SizeValueType degreesOfFreedom) const

double EvaluateInverseCDF (double p) const override

double EvaluateInverseCDF (double p, const ParametersType &) const override

virtual double EvaluateInverseCDF (double p, SizeValueType degreesOfFreedom) const

double EvaluatePDF (double x) const override

double EvaluatePDF (double x, const ParametersType &) const override

virtual double EvaluatePDF (double x, SizeValueType degreesOfFreedom) const

virtual SizeValueType GetDegreesOfFreedom () const

double GetMean () const override

virtual const char * GetNameOfClass () const

SizeValueType GetNumberOfParameters () const override

double GetVariance () const override

bool HasMean () const override

bool HasVariance () const override

virtual void SetDegreesOfFreedom (SizeValueType)

Public Member Functions inherited from itk::Statistics::ProbabilityDistribution
virtual const ParametersTypeGetParameters () const

virtual void SetParameters (const ParametersType &params)

Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)

unsigned long AddObserver (const EventObject &event, Command *) const

unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const

LightObject::Pointer CreateAnother () const override

virtual void DebugOff () const

virtual void DebugOn () const

CommandGetCommand (unsigned long tag)

bool GetDebug () const

virtual ModifiedTimeType GetMTime () const

virtual const TimeStampGetTimeStamp () const

bool HasObserver (const EventObject &event) const

void InvokeEvent (const EventObject &)

void InvokeEvent (const EventObject &) const

virtual void Modified () const

void Register () const override

void RemoveAllObservers ()

void RemoveObserver (unsigned long tag)

void SetDebug (bool debugFlag) const

void SetReferenceCount (int) override

void UnRegister () const noexcept override

virtual void SetObjectName (std::string _arg)

virtual const std::string & GetObjectName () const

Public Member Functions inherited from itk::LightObject
Pointer Clone () const

virtual void Delete ()

virtual int GetReferenceCount () const

void Print (std::ostream &os, Indent indent=0) const

## Static Public Member Functions

static double CDF (double x, const ParametersType &)

static double CDF (double x, SizeValueType degreesOfFreedom)

static double InverseCDF (double p, const ParametersType &)

static double InverseCDF (double p, SizeValueType degreesOfFreedom)

static Pointer New ()

static double PDF (double x, const ParametersType &)

static double PDF (double x, SizeValueType degreesOfFreedom)

Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()

static void GlobalWarningDisplayOff ()

static void GlobalWarningDisplayOn ()

static Pointer New ()

static void SetGlobalWarningDisplay (bool val)

Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()

static Pointer New ()

## Protected Member Functions

ChiSquareDistribution ()

void PrintSelf (std::ostream &os, Indent indent) const override

~ChiSquareDistribution () override=default

Protected Member Functions inherited from itk::Statistics::ProbabilityDistribution
void PrintSelf (std::ostream &os, Indent indent) const override

ProbabilityDistribution ()

~ProbabilityDistribution () override

Protected Member Functions inherited from itk::Object
Object ()

bool PrintObservers (std::ostream &os, Indent indent) const

virtual void SetTimeStamp (const TimeStamp &timeStamp)

~Object () override

Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const

LightObject ()

virtual void PrintHeader (std::ostream &os, Indent indent) const

virtual void PrintTrailer (std::ostream &os, Indent indent) const

virtual ~LightObject ()

Protected Attributes inherited from itk::Statistics::ProbabilityDistribution
ParametersType m_Parameters

Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount

## Detailed Description

ChiSquareDistribution class defines the interface for a univariate Chi-Square distribution (pdfs, cdfs, etc.).

ChiSquareDistribution provides access to the probability density function (pdf), the cumulative distribution function (cdf), and the inverse cumulative distribution function for a Chi-Square distribution.

The EvaluatePDF(), EvaluateCDF, EvaluateInverseCDF() methods are all virtual, allowing algorithms to be written with an abstract interface to a distribution (with said distribution provided to the algorithm at run-time). Static methods, not requiring an instance of the distribution, are also provided. The static methods allow for optimized access to distributions when the distribution is known a priori to the algorithm.

ChiSquareDistributions are univariate. Multivariate versions may be provided under a separate superclass (since the parameters to the pdf and cdf would have to be vectors not scalars).

ChiSquareDistributions can be used for Chi-Square tests.

Note
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on the National Centers for Biomedical Computing can be obtained from http://commonfund.nih.gov/bioinformatics.

Definition at line 58 of file itkChiSquareDistribution.h.

## ◆ ConstPointer

 using itk::Statistics::ChiSquareDistribution::ConstPointer = SmartPointer

Definition at line 67 of file itkChiSquareDistribution.h.

## ◆ Pointer

Definition at line 66 of file itkChiSquareDistribution.h.

## ◆ Self

Standard class type aliases

Definition at line 64 of file itkChiSquareDistribution.h.

## ◆ Superclass

Definition at line 65 of file itkChiSquareDistribution.h.

## ◆ ChiSquareDistribution()

 itk::Statistics::ChiSquareDistribution::ChiSquareDistribution ( )
protected

## ◆ ~ChiSquareDistribution()

 itk::Statistics::ChiSquareDistribution::~ChiSquareDistribution ( )
overrideprotecteddefault

## ◆ CDF() [1/2]

 static double itk::Statistics::ChiSquareDistribution::CDF ( double x, const ParametersType & )
static

Static method to evaluate the cumulative distribution function (cdf) of a Chi-Square with a specified number of degrees of freedom. The static method provides optimized access without requiring an instance of the class. The degrees of freedom are passed as a parameters vector.

This is based on Abramowitz and Stegun 26.7.1. Accuracy is approximately 10^-14.

## ◆ CDF() [2/2]

 static double itk::Statistics::ChiSquareDistribution::CDF ( double x, SizeValueType degreesOfFreedom )
static

Static method to evaluate the cumulative distribution function (cdf) of a Chi-Square with a specified number of degrees of freedom. The static method provides optimized access without requiring an instance of the class.

This is based on Abramowitz and Stegun 26.7.1. Accuracy is approximately 10^-14.

## ◆ EvaluateCDF() [1/3]

 double itk::Statistics::ChiSquareDistribution::EvaluateCDF ( double x ) const
overridevirtual

Evaluate the cumulative distribution function (cdf). The parameters of the distribution are assigned via SetParameters().

Implements itk::Statistics::ProbabilityDistribution.

## ◆ EvaluateCDF() [2/3]

 double itk::Statistics::ChiSquareDistribution::EvaluateCDF ( double x, const ParametersType & ) const
overridevirtual

Evaluate the cumulative distribution function (cdf). The parameters for the distribution are passed as a parameters vector. The ordering of the parameters is (degreesOfFreedom).

Implements itk::Statistics::ProbabilityDistribution.

## ◆ EvaluateCDF() [3/3]

 virtual double itk::Statistics::ChiSquareDistribution::EvaluateCDF ( double x, SizeValueType degreesOfFreedom ) const
virtual

Evaluate the cumulative distribution function (cdf). The parameters of the distribution are passed as separate parameters.

## ◆ EvaluateInverseCDF() [1/3]

 double itk::Statistics::ChiSquareDistribution::EvaluateInverseCDF ( double p ) const
overridevirtual

Evaluate the inverse cumulative distribution function (inverse cdf). Parameter p must be between 0.0 and 1.0. The parameters of the distribution are assigned via SetParameters().

Implements itk::Statistics::ProbabilityDistribution.

## ◆ EvaluateInverseCDF() [2/3]

 double itk::Statistics::ChiSquareDistribution::EvaluateInverseCDF ( double p, const ParametersType & ) const
overridevirtual

Evaluate the inverse cumulative distribution function (inverse cdf). Parameter p must be between 0.0 and 1.0. The parameters for the distribution are passed as a parameters vector. The ordering of the parameters is (degrees of freedom).

Implements itk::Statistics::ProbabilityDistribution.

## ◆ EvaluateInverseCDF() [3/3]

 virtual double itk::Statistics::ChiSquareDistribution::EvaluateInverseCDF ( double p, SizeValueType degreesOfFreedom ) const
virtual

Evaluate the inverse cumulative distribution function (inverse cdf). Parameter p must be between 0.0 and 1.0. The parameters of the distribution are passed as separate parameters.

## ◆ EvaluatePDF() [1/3]

 double itk::Statistics::ChiSquareDistribution::EvaluatePDF ( double x ) const
overridevirtual

Evaluate the probability density function (pdf). The parameters of the distribution are assigned via SetParameters().

Implements itk::Statistics::ProbabilityDistribution.

## ◆ EvaluatePDF() [2/3]

 double itk::Statistics::ChiSquareDistribution::EvaluatePDF ( double x, const ParametersType & ) const
overridevirtual

Evaluate the probability density function (pdf). The parameters for the distribution are passed as a parameters vector. The ordering of the parameters is (degrees of freedom).

Implements itk::Statistics::ProbabilityDistribution.

## ◆ EvaluatePDF() [3/3]

 virtual double itk::Statistics::ChiSquareDistribution::EvaluatePDF ( double x, SizeValueType degreesOfFreedom ) const
virtual

Evaluate the probability density function (pdf). The parameters of the distribution are passed as separate parameters.

## ◆ GetDegreesOfFreedom()

 virtual SizeValueType itk::Statistics::ChiSquareDistribution::GetDegreesOfFreedom ( ) const
virtual

Get the number of degrees of freedom in the t distribution. Defaults to 1

## ◆ GetMean()

 double itk::Statistics::ChiSquareDistribution::GetMean ( ) const
overridevirtual

Get the mean of the distribution.

Implements itk::Statistics::ProbabilityDistribution.

## ◆ GetNameOfClass()

 virtual const char* itk::Statistics::ChiSquareDistribution::GetNameOfClass ( ) const
virtual

Strandard macros

Reimplemented from itk::Statistics::ProbabilityDistribution.

## ◆ GetNumberOfParameters()

 SizeValueType itk::Statistics::ChiSquareDistribution::GetNumberOfParameters ( ) const
inlineoverridevirtual

Return the number of parameters. For a Chi-Square distribution, the number of parameters is 1 (degrees of freedom)

Implements itk::Statistics::ProbabilityDistribution.

Definition at line 78 of file itkChiSquareDistribution.h.

## ◆ GetVariance()

 double itk::Statistics::ChiSquareDistribution::GetVariance ( ) const
overridevirtual

Get the variance of the distribution.

Implements itk::Statistics::ProbabilityDistribution.

## ◆ HasMean()

 bool itk::Statistics::ChiSquareDistribution::HasMean ( ) const
inlineoverridevirtual

Does the Chi-Square distribution have a mean?

Implements itk::Statistics::ProbabilityDistribution.

Definition at line 145 of file itkChiSquareDistribution.h.

## ◆ HasVariance()

 bool itk::Statistics::ChiSquareDistribution::HasVariance ( ) const
inlineoverridevirtual

Does the Chi-Square distribution have a variance?

Implements itk::Statistics::ProbabilityDistribution.

Definition at line 156 of file itkChiSquareDistribution.h.

## ◆ InverseCDF() [1/2]

 static double itk::Statistics::ChiSquareDistribution::InverseCDF ( double p, const ParametersType & )
static

Static method to evaluate the inverse cumulative distribution function of a Chi-Square with a specified number of degrees of freedom. The static method provides optimized access without requiring an instance of the class. Parameter p must be between 0.0 and 1.0. The degrees of freedom are passed as a parameters vector.

This is based on Abramowitz and Stegun 26.7.5 followed by a few Newton iterations to improve the precision at low degrees of freedom. Accuracy is approximately 10^-10.

## ◆ InverseCDF() [2/2]

 static double itk::Statistics::ChiSquareDistribution::InverseCDF ( double p, SizeValueType degreesOfFreedom )
static

Static method to evaluate the inverse cumulative distribution function of a Chi-Square with a specified number of degrees of freedom. The static method provides optimized access without requiring an instance of the class. Parameter p must be between 0.0 and 1.0.

This is based on Abramowitz and Stegun 26.7.5 followed by a few Newton iterations to improve the precision at low degrees of freedom. Accuracy is approximately 10^-10.

## ◆ New()

 static Pointer itk::Statistics::ChiSquareDistribution::New ( )
static

Method for creation through the object factory.

## ◆ PDF() [1/2]

 static double itk::Statistics::ChiSquareDistribution::PDF ( double x, const ParametersType & )
static

Static method to evaluate the probability density function (pdf) of a Chi-Square with a specified number of degrees of freedom. The static method provides optimized access without requiring an instance of the class. The degrees of freedom for the distribution are passed in a parameters vector.

## ◆ PDF() [2/2]

 static double itk::Statistics::ChiSquareDistribution::PDF ( double x, SizeValueType degreesOfFreedom )
static

Static method to evaluate the probability density function (pdf) of a Chi-Square with a specified number of degrees of freedom. The static method provides optimized access without requiring an instance of the class.

## ◆ PrintSelf()

 void itk::Statistics::ChiSquareDistribution::PrintSelf ( std::ostream & os, Indent indent ) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Object.

## ◆ SetDegreesOfFreedom()

 virtual void itk::Statistics::ChiSquareDistribution::SetDegreesOfFreedom ( SizeValueType )
virtual

Set the number of degrees of freedom in the Chi-Square distribution. Defaults to 1

The documentation for this class was generated from the following file: