class_docstr: Class for Multivariate Normal Distribution
  
  uses Cholesky decomposition of covariance matrix for the transformation
  of the data
class_docstr_tok: ["Class","for","Multivariate","Normal","Distribution","uses","Cholesky","decomposition","of","covariance","matrix","for","the","transformation","of","the","data"]
docstr: return conditional distribution
  
  indices are the variables to keep, the complement is the conditioning
  set
  values are the values of the conditioning variables
  
  \bar{\mu} = \mu_1 + \Sigma_{12} \Sigma_{22}^{-1} \left( a - \mu_2 \right)
  
  and covariance matrix
  
  \overline{\Sigma} = \Sigma_{11} - \Sigma_{12} \Sigma_{22}^{-1} \Sigma_{21}.T
  
  Parameters
  ----------
  indices : array_like, int
      list of indices of variables in the marginal distribution
  given : array_like
      values of the conditioning variables
  
  Returns
  -------
  mvn : instance of MVNormal
      new instance of the MVNormal class that contains the conditional
      distribution of the variables given in indices for given
       values of the excluded variables.
code: def conditional(self, indices, values):
      r"""return conditional distribution
  
      indices are the variables to keep, the complement is the conditioning
      set
      values are the values of the conditioning variables
  
      \bar{\mu} = \mu_1 + \Sigma_{12} \Sigma_{22}^{-1} \left( a - \mu_2 \right)
  
      and covariance matrix
  
      \overline{\Sigma} = \Sigma_{11} - \Sigma_{12} \Sigma_{22}^{-1} \Sigma_{21}.T
  
      Parameters
      ----------
      indices : array_like, int
          list of indices of variables in the marginal distribution
      given : array_like
          values of the conditioning variables
  
      Returns
      -------
      mvn : instance of MVNormal
          new instance of the MVNormal class that contains the conditional
          distribution of the variables given in indices for given
           values of the excluded variables.
  
  
      """
      # indices need to be nd arrays for broadcasting
      keep = np.asarray(indices)
      given = np.asarray(
          [i for i in range(self.nvars) if i not in keep]
      )
      sigmakk = self.sigma[keep[:, None], keep]
      sigmagg = self.sigma[given[:, None], given]
      sigmakg = self.sigma[keep[:, None], given]
      sigmagk = self.sigma[given[:, None], keep]
  
      sigma_new = sigmakk - np.dot(
          sigmakg, np.linalg.solve(sigmagg, sigmagk)
      )
      mean_new = self.mean[keep] + np.dot(
          sigmakg, np.linalg.solve(sigmagg, values - self.mean[given])
      )
  
      #        #or
      #        sig = np.linalg.solve(sigmagg, sigmagk).T
      #        mean_new = self.mean[keep] + np.dot(sigmakg, values-self.mean[given])
      #        sigma_new = sigmakk - np.dot(sigmakg, sig)
      return MVNormal(mean_new, sigma_new)
  
imports: import numpy
  from scipy import special
  from statsmodels.sandbox.distributions.multivariate import mvstdtprob
  from .extras import mvnormcdf
label_desc: Use image node_id 6 for calling the MVNormal obj's underlying member method code with example usage: obj.conditional(indices, values) and returns: MVNormal