Probability & Random Variables

Answer & solution
Official answer: C
Our answer: C under independent-edge model
For each of C(8, 3)=56 vertex triples, its triangle indicator has mean(1/2)3=1/8 under the standard independent-edge random-graph model. By linearity of expectation the expected count is 56/8=7, C. Equal individual edge probabilities alone would not establish independence: choosing either the complete or empty graph with probability 1/2 would instead give mean 28. The usual random-graph model is therefore a necessary convention.
Use one indicator variable for each unordered three-vertex subset, not for each ordered traversal of a triangle. There are 8·7·6/6=56 such subsets. Its three edges must all occur, with probability(1/2)³ under independence. The expected sum is the sum of expectations, so 56/8=7. Distinct triangle indicators can share edges and need not be independent; linearity of expectation does not require their independence. The independence needed is within the three edges of one triangle.