  In this paper, we consider the problem of testing properties of joint
distributions under the Conditional Sampling framework. In the standard
sampling model, the sample complexity of testing properties of joint
distributions is exponential in the dimension, resulting in inefficient
algorithms for practical use. While recent results achieve efficient algorithms
for product distributions with significantly smaller sample complexity, no
efficient algorithm is expected when the marginals are not independent.
  We initialize the study of conditional sampling in the multidimensional
setting. We propose a subcube conditional sampling model where the tester can
condition on an (adaptively) chosen subcube of the domain. Due to its
simplicity, this model is potentially implementable in many practical
applications, particularly when the distribution is a joint distribution over
$\Sigma^n$ for some set $\Sigma$.
  We present algorithms for various fundamental properties of distributions in
the subcube-conditioning model and prove that the sample complexity is
polynomial in the dimension $n$ (and not exponential as in the traditional
model). We present an algorithm for testing identity to a known distribution
using $\tilde{\mathcal{O}}(n^2)$-subcube-conditional samples, an algorithm for
testing identity between two unknown distributions using
$\tilde{\mathcal{O}}(n^5)$-subcube-conditional samples and an algorithm for
testing identity to a product distribution using
$tilde{\mathcal{O}}(n^5)$-subcube-conditional samples.
  The central concept of our technique involves an elegant chain rule which can
be proved using basic techniques of probability theory yet powerful enough to
avoid the curse of dimensionality.
