From what I've experienced "first hand," and from what I've seen in pix and vids, there simply is no reliable correlation at all. Some guys have dicks and balls that are completely out of whack (in both directions) in terms of relative size. But who are we fooling? There's always that other delightful statistical probability, the lucky guys with the big dicks AND big balls. And of such material is dreamy porn made.

I think that there is some correlation but not 100%. I have tiny balls/scrotum but am average size when erect, small when flaccid.
I made this post on another thread but I will repeat it here. The craziest thing I ever saw was in a locker room at my gym years ago. I saw this big guy, almost as big as a football player with a huge scrotum and the tiniest cock I ever saw. I had to turn my head away fast or I would have made a face. It had to be an inch or so flaccid.

I have small balls but my cock is 6+ flaccid and 7.5 erect. If I'm at a nude beach my balls suck almost entirely into my body but my flaccid cock maintiains its size. If you really want to see what size your balls are, go to a nude beach and walk around in the fresh sea air.

I had a JO buddy that was over 8 inches and had really small balls. It was always a big issue for him as one of his ex GFs used to joke about his tiny nuts. He even went to the effort of trying to stretch his ball sack to make him look bigger. He eventually found a GF that didn't care about his nuts and just liked getting pounded by his 8 incher.