Let be the probability that a randomly chosen point has many friends, . Let be a random variable such that for , the probability . Then the value of is

The given square is divided into equal strips in both directions, so the grid contains vertical and horizontal lines.
Hence the number of intersection points is . These are the points .
Two points are called friends when they are directly adjacent in the same row or in the same column, that is, when they share a unit-length edge of the grid.
For a randomly chosen point let the random variable count its number of friends. We have to find .
Instead of evaluating each probability separately, we count the total number of “point-friend” incidences in the whole grid and then divide by the number of points.
An unordered adjacent pair contributes friend to each of the two points that form it; thus every such pair contributes to the total
Counting adjacent pairs
Horizontal pairs: every one of the rows has adjacent pairs, giving
Vertical pairs: every one of the columns has adjacent pairs, again
Total adjacent pairs
Therefore the total number of friends counted over all points is
The expectation is the average per point:
Finally,
Thus the required value is .
Tagged Random variables, mean and variance. Machine-assigned, so read it as a strong shortlist rather than a verdict.