Some questions on pow and random

joy99 subhakolkata1234 at gmail.com
Sun Mar 27 06:07:36 EDT 2011


Dear Group,

I have two questions one related to pow() and other is related to
random.
My questions are as below:

(i) By standard definition of Likelihood Estimation, we get if x EURO X,
where X is a countable set of types, p is probability and f is
frequency.
L(f;p)=Πp(x)f(x)

My question is python provides two functions,
(a)	pow for power.
(b)	reduce(mul, list)

Now, how to combine them? If any one can suggest any help?
As p(x)f(x), would be huge would pow support it?

(b) Suppose we have two distributions p(x1) and p(x2), of the Model M,
the E of EM algorithm, without going into much technical details is,
P0(x1,x2), P1(x1,x2) ....

Now I am taking random.random() to generate both x1 and x2 and trying
to multiply them, is it fine? Or should I take anything else?

If any one can find time to resolve my query or suggest some better
approaches, I would be grateful.

Thanks in advance,
Best Regards,
Subhabrata.






More information about the Python-list mailing list