  In this paper, we prove a function field-analogue of Poonen-Rains heuristics
on the average size of $p$-Selmer group. Let $E$ be an elliptic curve defined
over $\mathbb{Z}[t]$. Then $E$ is also defined over $\mathbb{F}_q$ for any $q$
of prime power. We show that for large enough $q$, the average size of the
$p$-Selmer groups over the family of quadratic twists of $E$ over
$\mathbb{F}_q[t]$ is equal to $p+1$ for all but finitely many primes $p$.
Namely, if we twist the curve in $\mathbb{F}_q[t]$ by polynomials of fixed
degree $n$ and let both $n$ and $q$ approach to infinity, then the average rank
of $p$-Selmer group converges to $p+1$.
