Inserting a formula in Pages is not possible
Functions and formulas can only be inserted into table cells. So, you have to insert a table first. If needed, the table can be configured in the Table section of the Inspector to consist of only a single cell: 1 row, 1 column, 0 header. Also, the table can be set to have no border stroke/line. 

If you are in a word processing document and want to position the table/formula freely on the page, you need to set the table to be a floating object (Inspector: Object Placement).

(This answer is based on Pages version 4.3, but might apply in principle to newer versions as well.) 

User manual for Pages 5.5: http://help.apple.com/pages/mac/5.5/#/tana41710df7