Here is an simple replacement:
Log[x[k]] /. Log[a_] -> a*xbar
I get the answer in my mind:
Similarly, I use another replacement:
Should the answer be
x[k]*xbar ? However, the replacement is disappointing:
I remain puzzled after much pondering. It seems the function Product at it also is deceptive.
What is the particularity of Sum/Product in replacement? Why is that?