Averages for polygons formed by random lines in Euclidean and hyperbolic planes