In a position, the piece density is equal to the total number of pieces on the board (Whites pieces + Black pieces) divided by the total number of squares (64).
At the beginning of every game, the piece density is equal to 32/64=0.5, and at any point of the game the piece density is always smaller or equal to 0.5
The piece density can only decrease during a game. It decreases by 1/64=0.015625 at each capture.
I would like to know what's the average piece density.
I'd need a decent precision on the result, so you can't just use a small sample of 5 games. You'll need to take a large sample of at least 500 games, the more the better.
It should be fairly easy. To make the program that will calculate this average piece density, use the facts that at the beginning of each game the piece density is equal to 0.5, then at each capture it decreases by 0.015625, and the program will be able to detect each capture easily since captures are indicated by a "x" symbol in the PGN. So the program won't have to represent every positions of every games, it will be able to quickly calculate the average piece density just by scanning the PGN.
But take only OTB games, played at a classical (long) time control of at least 2 hours per player, and where both players were at least 2000 Elo. No correspondence games, no engines games, no internet games, no rapid games, no blitz games.