def MakeJoint(pmf1, pmf2):
 joint = Joint()
 for (v1, p1) in pmf1.Items():
  for (v2, p2) in pmf2.Items():
   joint.Set((v1, v2), (p1 * p2))
 return joint

def MakeJoint ( pmf1 , pmf2 ) : joint = Joint ( ) for ( v1 , p1 ) in pmf1 . Items ( ) : for ( v2 , p2 ) in pmf2 . Items ( ) : joint . Set ( ( v1 , v2 ) , ( p1 * p2 ) ) return joint
joint distribution of values from pmf1 and pmf2 .