How many roots of polynomial in $\mathbb Z[x]$ and $\mathbb Q[x]$ are integers on average? Given $d,B>0$ the number of polynomials in $\mathbb Z[x]$ of degree $d$ and coefficient size at most $B$ have at least one integer roots should be $B^{O(d)}f(d)$ at some function $f$ (from Random Diophantine polynomials: Percent solvable?). So the probability that a uniformly random polynomial in $\mathbb Z[x]$ of degree $d$ and coefficient size at most $B$ has at least one integer root is $\frac{B^{O(d)}f(d)}{(2B+1)^{d+1}}\asymp\frac{f(d)}{2B+1}$ which is close to $0$.

  
*
  
*Then what is the average number of integer roots for polynomials in $\mathbb Z[x]$ of degree $d$ and coefficient size at most $B$?
  

I think it should be $<1$.
However I am not sure of the exact parameterizations. 
It might be $\frac1{B^{O(d)}}$ on average.


  
*What is the average number of integer roots for polynomials in $\mathbb Q[x]$ of degree $d$ and coefficients with numerator of size at most $B$ and denominator of size at most $C$?
  

 A: $$\mathbb{E}[\text{#|roots of P|}]=\mathbb{E}(\sum_{k\in \mathbb{Z}}1_{k \text{ is a root of P}})=\sum_{k\in\mathbb{Z}}\mathbb{P}(P(k)=0)$$
For $k=0$, $\mathbb{P}(P(0)=0)=\frac{1}{(2B+1)}$.
For $k\neq 0$, because the coefficients are independent (if $B$ and $d$ large) $P(k)$ should behave like a Gaussian if $d$ is large of variance $\sigma^2=\sum_{j=0}^d \big(k^{2j}\times\frac{1}{(2B+1)}\sum_{i=-B}^Bi^2\big)\approx  (d+1)\times \frac{B^2}{3}$ if $|k|=1$ and  $\frac{k^{2d+2} -1}{k^2-1} \times \frac{B^2}{3}$ for $|k|>1$. So $$ \mathbb{P}(P(k)=0)\approx \begin{cases} \frac{1}{B\sqrt{2\pi(d+1)/3}}  \text{ for }k=1 \\  \frac{1}{B\sqrt{2 \pi\frac{k^{2d+2} -1}{k^2-1}/3}} \text{for |k|>1}\end{cases}$$ Note that for large $d$, the probability for $|k|>1$ is very small and then
$$\mathbb{E}[\text{#|roots of P|}]\approx \mathbb{P}(P(0)=0)+\mathbb{P}(P(1)=0)+\mathbb{P}(P(-1)=0)\approx\frac{1}{(2B+1)}(1+2\times \frac{\sqrt{6}}{\pi d})
$$(same result as in Random Diophantine polynomials: Percent solvable?) 
