Home > brede > brede_pdf_binmix.m

brede_pdf_binmix

PURPOSE ^

brede_pdf_binmix - Probability density for binomial mixture

SYNOPSIS ^

function q = brede_pdf_binmix(x, n, p, r)

DESCRIPTION ^

 brede_pdf_binmix     - Probability density for binomial mixture

       q = brede_pdf_binmix(x, n, p, r)

       Input:  X   Data
               n   Total number of outcomes
               p   Probabilities for positive outcomes
               r   Prior for each component

       Probability density function for the finite binomial mixture
       model. 

          p(x|n,p,r) = sum_j r_j * P_bin(x|n,p,j)

       Example:
         N = [ 13560 877 168 66 42 28 23 39 64];
         p = brede_pdf_binmix(N, sum(N), [0.0100 0.6446], [0.9808 0.0192])

         N = [ 5 0 2 2 3 ];
         p2=0:0.01:1;
         for n = 1:length(p2), 
           p(n) = brede_pdf_binmix(N, 12, [ 0 p2(n) ], [0.4154 1-0.4154]);
         end, 
         figure,plot(p2,p)

       See also BREDE, BREDE_PDF_BIN, BREDE_PDE_BINMIX.

 $Id: brede_pdf_binmix.m,v 1.1 2003/10/06 15:38:41 fnielsen Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005