Imagine i have a predicate $friends(p_1, p_2)$ and I know that $p(friends(p_1, p_2)) = p_1$. If I generate a world of $n$ people, I expect there to be $\binom{n}{2}p_1$ friends. Now imagine I count the number of times that 3 people are all friends of each other in this world: $\binom{n}{3} p_3$. I expect the probability of three random people being friends to be $p_3$.

I'm trying to calculate the probability that any 4 people in my world are all friends with each other. Without knowing $p_3$ I would estimate the probability to be $p_2^6$. But obviously knowing $p_3$ influences the probability. For example if $\frac{p_3}{p_2}$ increases, I expect the friendships to be denser and thus more 4 people will form groups. I have trouble however finding a formula to express this probability, because the probabilities that the different subgroups of 3 people are friends are not independent. And if I take four random people the probability that at least 3 subgroups of three people are friends is the same as that at least 4 subgroups of three people are friends.

Could you provide any advice on how one typically calculates such a problem or what to search for? By what factor does $\frac{p_3}{p_2}$ increase the probability of a third connecting edge in presence of two edges? I would assume one would somehow express this using conditional probabilities, although I can't seem to figure out exactly how.