\name{compIndep}
\alias{compIndep}
\title{This function determines probability distribution independence
  between two bi-partite graph incidence matrices.}
\description{
  This function calculates the probability that a protein is in Cluster
  C-i and the probability that a protein is in cluster K-j and then
  the joint probability that the protein is in both C-i and K-j. The
  function compares the joint distributions with the marginals.
}
\usage{
compIndep(TSNMat, erMat, intersectMat)
}
\arguments{
  \item{TSNMat}{The first bi-partite graph matrix; usually a
    representation of the true state of nature.}
  \item{erMat}{The second bi-partite graph mattrix; usually an estimate
    of the true state of nature based on some error model.}
  \item{intersectMat}{A matrix of of integers. The (i,j)th entry is the
    cardinality of the intersection between the i-th complex of TSNMat
    and the j-th complex of erMat.}
}
\details{

}
\value{
  Matrix of real numbers:

  The return value is a matrix of real numbers that account for how
  independent the marginals are from the joint distribution of protein
  membership to complexes.
}
\author{ Tony Chiang }
\examples{
data(simEX)
data(APComEX)
CC = runCompareComplex(simEX, APComEX)
compIndep(simEX, APComEX, CC[[1]])
}
\keyword{datagen}