TITLE: Comparing cohomology over ${\mathbb C}$ and over ${\mathbb F}_q$
QUESTION [22 upvotes]: I have the following (probably well-known) question: let $X$ be a regular scheme over 
$\mathbb Z$. Let $p$ be a prime and  Let us denote the reduction of $X$ mod $p$ by $X_p$.
Let also $X_{\mathbb C}$ be the corresponding complex variety. Suppose that I know everything
about cohomology of $X_{\mathbb C}$ (i.e. I know the mixed Hodge structure). Is there a situation where I can use that to describe the
$\ell$-adic cohomology of $X_p$ with the action of Frobenius? More precisely, are there
conditions that would guarantee that all the eigen-values of Frobenius are powers of $q$
and that those powers are exactly those predicted by the Hodge structure on the cohomology
of $X_{\mathbb C}$?
UPDATE: I would like to emphasize that the scheme $X$ I am talking about is not proper
and its cohomology is not pure.
However, it is not very bad either: roughly
speaking nothing worse than ${\mathbb G}_m$ can appear there. In my specific situation conjecturally
(I don't know how to prove this) there is a ${\mathbb G}_m$-action on $X$ which
contracts it to a subscheme $Y$ (i.e. there exists a morphism ${\mathbb A}^1\times X\to X$ extending the ${\mathbb G}_m$-action such that
$\{ 0 \} \times X$ goes to $Y$) where $Y$ is a disjoint union of locally closed subschemes of the 
form ${\mathbb A}^k\times {\mathbb G}_m^l$. Note that in this case 
the cohomology of $X$ is the same as cohomology of $Y$, so this should give you an idea
how complicated the cohomology of $X$ is.

REPLY [13 votes]: You have to be a little careful because of the following sort of phenomenon: the pair of conjugate points $x^2 + 1 = 0$ has Frobenius eigenvalues equal to $1$ if $p$ is 1 mod 4,
but equal to $1$ and $-1$ if $p$ is $-1$ mod 4.  But its Hodge structure is no different
to the pair of rational points $x^2 - 1$, for which the Frobenius eigenvalues are always 1.  (If you want an example where the scheme is a variety, rather than geometrically disconnected, instead consider the plane blown up at
these two points.)
The condition you want is that the cohomology over $\mathbb C$ be generated by Hodge classes
(i.e. that the cohomology be all in even degree, and that in degree $2i$ it all be of type
$(i,i)$).  This will give that the Frobenius eigenvalues are powers of $q$ for almost all $p$,
up to multiplication by a root of unity.  (This is the Artin--Tate statement of Bhargav's answer.)  The above example shows that these roots of unity can appear.
A paper which discusses this kind of question pretty comprehensively, and where the preceding statement is proved, is the
linked paper of Kisin and Lehrer.
(See Corollary 2.3.)  See also this paper of Kisin and Wortmann, which provides key results for the argument of Kisin and Lehrer.  
The basic technique that you can use to connect the Hodge theory at infinity to the Frobenius elements mod primes is $p$-adic Hodge theory, and this is what Kisin--Lehrer
and Kisin--Wortmann use.