Matlab/Octave package: Polyatreetest
Two-sample Bayesian nonparametric hypothesis test

Download package

Link to the demo (html)


This Matlab/Octave package implements the Bayesian nonparametric two-sample tests described in (Holmes et al., 2014) and based on a Polya tree model.

The package has been tested on Matlab R2014a (with statistics toolbox) and Octave 3.6.4. (although it runs very slowly on Octave).

C.C. Holmes, F. Caron, J.E. Griffin, D.A. Stephens. Two-sample Bayesian nonparametric hypothesis testing. To appear in Bayesian Analysis, 2014. Download paper.



  1. Download the package
  2. Unzip the zip file in some folder
  3. Add the folder to the Matlab/Octave path with the command addpath

Latest corrections

Last update: 31-07-2014. First version of the package.


(C) Copyright 2014 Fran├žois Caron,University of Oxford

Permission is granted for anyone to copy, use, or modify these programs and accompanying documents for purposes of research or education, provided this copyright notice is retained, and note is made of any changes that have been made.

These programs and documents are distributed without any warranty, express or implied. As the programs were written for research purposes only, they have not been tested to the degree that would be advisable in any important application. All use of these programs is entirely at the user's own risk.