Question: finit sum of variables

I just started using maple I want to count such thing: ( sum {from j=1 to k} ( x_j - b ) - sum{ from i=1 to n}( y_i - b) )^2 It's a part of longer equation. As a result I need a formula not a value. It is possible to count it with a build-in maple command? I have problems with writing the sum. If not could someone give me a tip how to write a program?
Please Wait...