Extreme Optimization™: Complexity made simple.

Math and Statistics
Libraries for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Blog
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Partners
    • Contact us
Introduction
Deployment Guide
Nuget packages
Configuration
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Data Analysis Library User's GuideData Analysis Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand Data Access Library User's GuideData Access Library User's Guide
Expand ReferenceReference
  • Extreme Optimization
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Nuget packages
    • Configuration
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Data Access Library User's Guide
    • Reference
  • Reference
    • Extreme
    • Extreme.Collections
    • Extreme.Data
    • Extreme.Data.Json
    • Extreme.Data.Matlab
    • Extreme.Data.R
    • Extreme.Data.Stata
    • Extreme.Data.Text
    • Extreme.DataAnalysis
    • Extreme.DataAnalysis.Linq
    • Extreme.DataAnalysis.Models
    • Extreme.Mathematics
    • Extreme.Mathematics.Algorithms
    • Extreme.Mathematics.Calculus
    • Extreme.Mathematics.Calculus.OrdinaryDifferentialEquations
    • Extreme.Mathematics.Curves
    • Extreme.Mathematics.Curves.Nonlinear
    • Extreme.Mathematics.Distributed
    • Extreme.Mathematics.EquationSolvers
    • Extreme.Mathematics.Generic
    • Extreme.Mathematics.LinearAlgebra
    • Extreme.Mathematics.LinearAlgebra.Implementation
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers.Preconditioners
    • Extreme.Mathematics.Optimization
    • Extreme.Mathematics.Optimization.LineSearches
    • Extreme.Mathematics.Random
    • Extreme.Mathematics.SignalProcessing
    • Extreme.Providers
    • Extreme.Providers.InteropServices
    • Extreme.Statistics
    • Extreme.Statistics.Distributions
    • Extreme.Statistics.Multivariate
    • Extreme.Statistics.Tests
    • Extreme.Statistics.TimeSeriesAnalysis
  • Extreme.Statistics
    • AnovaModel Class
    • AnovaModelRow Class
    • AnovaRow Class
    • AnovaRowType Enumeration
    • AnovaTable Class
    • Cell Structure
    • ContingencyTable Class
    • ContingencyTableCell Structure
    • DateTimeInterval Structure
    • Descriptives(T) Class
    • Filter Class
    • GeneralizedLinearModel Class
    • HypothesisTests Class
    • Kernel Class
    • KernelDensity Class
    • KernelDensityBandwidthEstimator Enumeration
    • LinearRegressionModel Class
    • LinkFunction Class
    • LogisticRegressionMethod Enumeration
    • LogisticRegressionModel Class
    • ModelFamily Class
    • NearestCorrelationMatrixAlgorithm Enumeration
    • NonlinearRegressionModel Class
    • OneWayAnovaModel Class
    • OneWayRAnovaModel Class
    • PolynomialRegressionModel Class
    • RegularizedRegressionModel Class
    • ScaleFittingMethod Enumeration
    • SimpleRegressionKind Enumeration
    • SimpleRegressionModel Class
    • Stats Class
    • StepwiseCriterion Enumeration
    • StepwiseOptions Class
    • StepwiseRegressionMethod Enumeration
    • SumsOfSquaresType Enumeration
    • TestOfHomogeneityOfVariances Enumeration
    • TestOfNormality Enumeration
    • TwoWayAnovaModel Class
    • WindowFilter Class
  • ContingencyTable Class
    • ContingencyTable Constructors
    • Properties
    • Methods

ContingencyTable Class

Extreme Optimization Numerical Libraries for .NET Professional
Represents a table that cross-tabulates totals from two categorical variables.
Inheritance Hierarchy

SystemObject
  Extreme.StatisticsContingencyTable

Namespace:  Extreme.Statistics
Assembly:  Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
Syntax

C#
VB
C++
F#
Copy
public class ContingencyTable
Public Class ContingencyTable
public ref class ContingencyTable
type ContingencyTable =  class end

The ContingencyTable type exposes the following members.

Constructors

  NameDescription
Public methodContingencyTable(MatrixDouble)
Constructs a new contingency table object from counts stored in a matrix.
Public methodContingencyTable(ICategoricalVector, ICategoricalVector)
Constructs a new contingency table for the specified variables.
Public methodContingencyTable(ICategoricalVector, ICategoricalVector, VectorDouble)
Constructs a new contingency table for the specified variables.
Public methodContingencyTable(MatrixDouble, IIndex, IIndex)
Constructs a new contingency table object from counts stored in a matrix.
Top
Properties

  NameDescription
Public propertyChiSquare
Returns the chi-square value for the contingency table.
Public propertyCoefficientOfContingency
Returns the coefficient of contingency of the contingency table.
Public propertyColumnCount
Gets the number of columns in the contingency table.
Public propertyColumnScale
Gets the categorical scale that contains the categories corresponding to the columns in the contingency table.
Public propertyCramerV
Returns the Cramer V statistic for the contingency table.
Public propertyItemInt32, Int32
Gets the cell at the specified position in the contingency table.
Public propertyItemObject, Object
Gets the cell for the specified values of the categories in the contingency table.
Public propertyPhi
Returns the Phi coefficient for the contingency table.
Public propertyRowCount
Gets the number of rows in the contingency table.
Public propertyRowScale
Gets the categorical scale that contains the categories corresponding to the rows in the contingency table.
Public propertyTotalCount
Gets the total of all counts in the contingency table.
Top
Methods

  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetChiSquareTest
Returns the Chi-Square test for the contingency table.
Public methodGetFisherExactProbability(Boolean, Double)
Gets the probability of Fisher's exact test for the contingency table.
Public methodGetFisherExactProbability(HypothesisType, Boolean)
Gets the probability of Fisher's exact test for the contingency table.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLikelihoodRatioTest
Returns the likelihood ratio test for the contingency table.
Public methodGetMantelHaenszelTest
Returns the Mantel-Haenszel Chi-Square test for the contingency table.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetYatesCorrectedChiSquareTest
Returns the Yates-corrected Chi-Square test for the contingency table.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Use the ContingencyTable class to represent a 2x2 or RxC contingency table and make inferences about the relative frequencies of the tabulated data.

Individual cells are indexed through the indexed ItemObject, Object property.

Once the Compute method is called, various properties are available, including the Chi-square value, the coefficient of contingency, and the Cramer V.

See Also

Reference

Extreme.Statistics Namespace

Copyright (c) 2004-2021 ExoAnalytics Inc.

Send comments on this topic to support@extremeoptimization.com

Copyright © 2004-2021, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.