Laurent is right, a polygon is not just the vertices, but the whole region. The arithmetic mean of the vertices would give the centroid if the (equal) masses were concentrated at the vertices. While that answers your question, perhaps for the future, the below might be useful.
In case of a mass distributed over a region (not just a polygon), Green's Theorem might be helpful in calculating the area and the centroid:

In your case,
If $\displaystyle D$ is the region of the polygon, then the x-coordinate of the center of mass is given by the area of the polygon times
$\displaystyle \iint_{D} x dxdy$ which by Green's theorem is same as
$\displaystyle \oint_{C} \frac{x^2}{2} dy$, where the line integral is taken over the perimeter of the polygon.
For centroid we choose $\displaystyle M(x,y) = \frac{x^2}{2}$ and $\displaystyle L(x,y) = 0$
The area of the polygon is given by
$\displaystyle \iint_{D} 1 dxdy$ and can be written as a line integral.
For area we choose $\displaystyle M(x,y) = \frac{x}{2}$ and $\displaystyle L(x,y) = \frac{-y}{2}$