Consider a rectangle (black one) in the following image. Lets take four random points uniformly on each border then connecting the points one after another (red lines) to get a foursquare inside the rectangle.
If we put a set of random points ($n$ points) uniformly inside the rectangle , I would like to know what is the mathematical expectation of the number of points that are inside the red area?
Since the position of red points are random, I really can't solve this problem.
The probability that each point falls in the red area, is the area of red_line divided by area of rectangle. Since the area it self is a random process, so we need to calculate the expectation of the area of the red line.
Thanks in advance.

WLOG, I am solving for a unit square.
Let the four vertices be at coordinates $x,x',y,y'$ on the respective sides. The area of the quadrilateral is $1$ minus the areas of the four corners,
$$A=1-\frac{xy+(1-x)y'+x'(1-y)+(1-x')(1-y')}2=\frac{1-(x-x')(y-y')}2.$$
As $x,x',y,y'$ are uniform independent random variables, their pairwise differences follow independent triangular distributions centered on $0$, and the expectation of the product is the product of the expectations.
Hence, $$E(A)=\frac12.$$