The two figures are different and unlinked.
The single personal tax allowances is currently �5525, or �100.48p per week.
The lower earnings limit for NI is �87 per week.
The tax is calculated over the year, so if you earn less for a period of time, you get the 'credit' later in the year.
The NI is more complicated - it depends if you are paid weekly or monthly - if you exceed the threshold (of �87 on a weekly basis) in any pay period, you pay NI on ALL the income in THAT period. But if you earned less than the threshold in any period, you pay no NI. Except if you are a Director of the company, when different rules apply. This is presumably to prevent directors of their own companies paying themselves little one month and much more the next, and hence avoiding some NI.
Details here
http://www.hmrc.gov.uk/rates/nic.htm
http://www.hmrc.gov.uk/rates/it.htm