I recently watched some Minecraft youtubers make videos on how diamonds spawn more frequently at y = 5, 6 rather than y = 11, 12 as of the JE 1.17 update. So, I wanted to test this on my survival world. However, whenever I go down to y = 5, I seem to find a lot of lava, with the lava sources being at y = 8, 9 mostly. It is quite the hassle to clear out the lava. So, I had a second thought about making diamond mining efficient at y = 5. My main question goes like this: Is there any stat on the lava concentration at y = 5 (or at any y value in general). I would have made stats myself if I knew the use of coding to experiment with the world, but unfortunately I don't. Knowing the stats can help in actually determine the superiority of y = 5 or y = 11 mathematically. Thanks in advance.
Generally in caves starting with y=10 and below, all cave air is replaced by lava source blocks. There are exceptions - mineshafts, dungeons, certain types of caves can generate free of lava below that level, but finding a cave that goes below y=11 with air instead of lava is more of an exception than a rule. As result the "stat" you're asking for is approaching 50% of all cave volume. If you want the exact data, it can be extracted from the resource distribution table. For more approximate, the graph from the Altitude article on the wiki gives a rough estimate.
This is why most seasoned players recommend digging at between y=11 to y=13. The rationales between the exact choice of the height vary and are subject to a never-ending argument and personal preference, but the general consensus is lava is frequent enough and disruptive enough below that level, that any loss in frequency of diamonds is offset by ability to streamline the mining process without incessant disruptions by lava spilling into your corridor, and you needing to dig around it or struggle through it.