  In this work, we study the large deviation properties of random walk in a
random environment on $\mathbb{Z}^d$ with $d\geq1$.
  We start with the quenched case, take the point of view of the particle, and
prove the large deviation principle (LDP) for the pair empirical measure of the
environment Markov chain. By an appropriate contraction, we deduce the quenched
LDP for the mean velocity of the particle and obtain a variational formula for
the corresponding rate function $I_q$. We propose an Ansatz for the minimizer
of this formula. This Ansatz is easily verified when $d=1$.
  In his 2003 paper, Varadhan proves the averaged LDP for the mean velocity and
gives a variational formula for the corresponding rate function $I_a$. Under
the non-nestling assumption (resp. Kalikow's condition), we show that $I_a$ is
strictly convex and analytic on a non-empty open set $\mathcal{A}$, and that
the true velocity $\xi_o$ is an element (resp. in the closure) of
$\mathcal{A}$. We then identify the minimizer of Varadhan's variational formula
at any $\xi\in\mathcal{A}$.
  For walks in high dimension, we believe that $I_a$ and $I_q$ agree on a set
with non-empty interior. We prove this for space-time walks when the dimension
is at least 3+1. In the latter case, we show that the cheapest way to condition
the asymptotic mean velocity of the particle to be equal to any $\xi$ close to
$\xi_o$ is to tilt the transition kernel of the environment Markov chain via a
Doob $h$-transform.
