Understanding large deviation theory/principle From WIkipedia

Given a Polish space $\mathcal{X}$, let $\{ \mathbb{P}_N\}$ be a
  sequence of Borel probability measures on $\mathcal{X}$, let $\{a_N\}$
  be a sequence of positive real numbers such that $\lim_N a_N=+\infty$,
  and finally let $I:\mathcal{X}\to [0,+\infty]$ be a lower
  semicontinuous functional on $\mathcal{X}$. The sequence $\{
 \mathbb{P}_N\}$ is said to satisfy a large deviation principle with
  speed $\{a_n\}$ and rate $I$ if, and only if, for each Borel
  measurable set $E \subset \mathcal{X}$, $$
    -\inf_{x \in E^\circ} I(x) \le \varliminf_N a_N^{-1} \log\big(\mathbb{P}_N(E)\big) \le \varlimsup_N a_N^{-1}
 \log\big(\mathbb{P}_N(E)\big) \le -\inf_{x \in \bar{E}} I(x) , $$
  where $\bar{E}$ and $E^\circ$ denote respectively the closure and
  interior of $E$.

I was wondering how the above formal definition corresponds to the following informal interpretation:

the theory of large deviations concerns the asymptotic behaviour of
  remote tails of sequences of probability distributions. ... Roughly speaking, large deviations theory concerns itself with the
  exponential decay of the probability measures of certain kinds of extreme or tail events, as the number of observations grows
  arbitrarily large.

In particular,


*

*what are the certain kinds of extreme or tail events in the
formal definition?  $E \subset \mathcal{X}$  is any Borel measurable
set, not necessarily tail or extreme events.

*How is the "exponential decay" represented in the formal definition?
Is it represented as $a_n$ being a exponential function of $n$?

*What are the interpretations for $a_n$ and $I$ in the formal
definition?


Thanks!
 A: Think of the inequalities as follows: for every Borel $E$ essentially
$P_N(E)   =  \exp[-a_N \ (\inf_{x\in E}I(x) + o(1)  )]$    (*)
Think of $a_N= N$ and $I(x)=\frac 12 x^2$ as simple example, which is the LDP for gaussian $P_N$ with variance $\frac 1N$.
The rare events are those such that $\inf_{x\in E}I(x)>0$. They are rare because their probability is exponentialy small as $N\to \infty$.
EDIT after comments below: (1) you can see the LDP as a refinement of the LLN (Law of large numbers). The latter tells you what is typical, i.e. only that I(x)=0 for some x. So strictly speaking the LDP is about rare events AND typical events. But usually one stresses that it is about rare events, because it is what it distinguishes it from a LLN. 
(2) The equivalence between $(*)$ your inequalities should be clear (but check it!) for  $E$  such that $\inf_{x\in \mathring{E}}    I(x) = \inf_{x\in \bar{E}}I(x)$. For general $E$ $(*) $ is stronger. ($*$) is  better to understand the idea, but it's bit too strong in general for having good theorems. You can compare this with weak convergence of measures: the idea is $P_N(E) \to P(E)$, but the formal definition  is bit more complicated.  
Maybe this is a better point to explain why one does not use $(*)$ in general: in many interesting situations $\{x\}$ is measurable and $P_n(\{x\})=0$ for every $x\in \mathcal X$ (this is so already for the Gaussian case). Then $(*)$ can hold only for $I\equiv \infty$.      
A: Some of the things I say will probably be a repeat of the answer by Hans. However, they will be framed in the setting of one of the most classical Large Deviation Principles / results: Sanov's Theorem. This is an essential example of an LDP and will answer your question 3.
Let $X^i$, with $i=1,\ldots,N$, be iid Brownian Particles, with $X^i(0)=x^i\in \mathbb{R}^d$. Denote by $\rho^N(t)=\frac{1}{N}\sum_{i=1}^N \delta_{X^i(t)}$ their empirical measure. If $\rho^N(0)\overset{weakly}{\longrightarrow} \rho_0 $ for some probability measure $\rho_0$ on $\mathbb{R}^d$, then paraphrasing Savons Theorem,
$$
\mathbb{P}(\rho^N(t)\approx \mu) \approx e^{-N I_t(\mu|\rho_0)},~~~\text{for large $N$.}
$$
Where the rate functional $I_t(\cdot|\rho_0)$ is a relative entropy. $I_t(\cdot|\rho_0)$ is minimised (in fact equal to zero) at $\rho_t$ the solution of the heat equation.
$$ \partial_t \rho=\Delta \rho,~\rho(0)=\rho_0.~~~~~~~~~(1)$$
It is well known that this is the macroscopic limit of the system of particles $X^i$ - i.e we have the Law of Law Numbers (LLN) result that $\rho^N(t)\longrightarrow \rho(t)$ the solution of $(1)$.
Therefore the LLN tells us that the empirical measure is converging to the solution of $(1)$, and the LDP (Sanovs Theorem) is a refinement of the LLN - telling us at what exponential rate we have this convergence. Where it is an "exponential rate" in the sense that it can be written as $e^{-N ~\text{something}}$, where the something is the rate function controlling this. LDPs are really about "all events", however we frame it in terms of rare events because those are the ones whos probability exponentially converges to zero, i.e they do not include a zero of the rate function.
