That's essentially the idea though, but you'll have to do some work on and the like to get something you can work with. In this case it simplifies to .
As written, the summation you have in the denominator is identically zero. If you move the parenthesis inside the summation then you are good to go. Although, looking it over again, the numerator needs to be fixed too. Should read