Subject: log of a product(...) to be sum(...) of a log
From: ross kyprianou
Date: Tue, 18 May 2010 00:01:22 +0930
Hi people
Ive spent about 6 hours reading thru the ref manual and an hour
googling but the closest Ive got to trying to simplify a (ratio of a)
product of (independent) normal distributed (variance==1) random
variables i.e.
p(x,m) := (2*%pi)^(-1/2) * exp((-1/2)*(x-m)^2)
log( product( p(x[k],m[1]), k,1,n ) ) ) - log( product(
p(x[k],m[0]),k,1,n ) ) );
(call this equation (A) )
is the following
(%i16) defrule(rule1, log(product(z,k,1,n)), sum(log(z),k,1,n) );
(%o16) rule1 : log(product(z, k, 1, n)) -> sum(log(z), k, 1, n)
(%i17) disprule(all);
(%t17) rule1 : log(product(z, k, 1, n)) -> sum(log(z), k, 1, n)
(%o17) [%t17]
(%i18) rule1 (log(product(z,k,1,n)));
(%o18) false
Ive tried declaring log and/or product to be a noun, Ive tried quoting
them too. I know this "Equation A" simplifies to something simple in
terms of m[0] and m[1] and sum(x[k]) but just cant get maxima to
consider log of a product to be sum of a log (i.e. cant create a
working "rule1")
Please help?