What's the general mathematical method to go about solving a substitution cipher? Here's a question from a professor's page:

Decipher the following simple-substitution cryptogram, in which every
  letter of the message is represented by a number. 

8 23 9 26 4 16 24 26 25    8 18    22 24 13 22 7 13 22 8    8 18 19 7

Hint: The most frequent letters in English in descending order are:
  ETAOINSHRDLU

I solved it by brute force, just guessing letters, 

 "this sentence is backwards", written backwards

but I'm curious to know if there's a mathematical way to go about solving it on paper? 

Judging by the hint, you need to compute the frequencies of various number-codes and try using the frequent-list-letters instead of them, checking yourself on small words to make sure they are ok... No formal way of doing it, I think
