def MakeMixture(metapmf, label='mix'):
 mix = Pmf(label=label)
 for (pmf, p1) in metapmf.Items():
  for (x, p2) in pmf.Items():
   mix.Incr(x, (p1 * p2))
 return mix

def MakeMixture ( metapmf , label = 'mix' ) : mix = Pmf ( label = label ) for ( pmf , p1 ) in metapmf . Items ( ) : for ( x , p2 ) in pmf . Items ( ) : mix . Incr ( x , ( p1 * p2 ) ) return mix
make a mixture distribution .