Consider a group of n>=4 people, numbered from 1 to n. For each pair (i,j) with i!=j, person i and person j are friends, with probability p. Friendships are independent for different pairs. These n people are seated around a round table. For convenience, assume that the chairs are numbered from 1 to n, clockwise, with n located next to 1, and that person i seated in chair i. In particular, person 1 and person n are seated next to each other.

If a person is friends with both people sitting next to him/her, we say this person is happy. Let H be the total number of happy people.
1.Let Ii be a random variable indicating whether the person seated in chair i is happy or not (i.e., Ii=1 if person i is happy and Ii=0 otherwise). Find E[Ii] for i=1,2,..,n.
2.Find E[H]
3.Find E[Ik^2] for any k={1,2,...,n}
4.E[Ii.Ii+1] forany i {1,2,...,n}
5.Suppose that i!=j and that persons i and j are not seated next to each other. Find E[Ii.Ij]
6.Var(H) in terms of a=E[H],b=E[Ik^2],c=E[Ii.Ii+1], d=E[Ii.Ij] and n.

nobody cares to answer? :(

To answer these questions, we need to work with the concept of expected values and independence of events.

1. Finding E[Ii] for i = 1, 2, ..., n:
The probability that a person seated in chair i is happy depends on whether they are friends with the person on their left (chair i-1) and the person on their right (chair i+1). Since friendships are independent, the probability of being happy equals the product of the probabilities of being friends with both neighbors.
Therefore, E[Ii] = P(person i is happy) = P(person i is friends with person i-1) * P(person i is friends with person i+1)

2. Finding E[H]:
To find the expected value of H, we need to consider each person individually and calculate their expected happiness. We sum up the expected values of Ii for i = 1 to n.
E[H] = E[I1] + E[I2] + ... + E[In]

3. Finding E[Ik^2] for any k = 1, 2, ..., n:
Since Ik^2 is an indicator variable that takes values 0 or 1, we can simply calculate the probability that person k is happy. E[Ik^2] = P(person k is happy).

4. Finding E[Ii.Ii+1] for any i = 1, 2, ..., n:
The indicator variable Ii.Ii+1 equals 1 only if both person i and person i+1 are happy. We can calculate the probability of this event occurring. E[Ii.Ii+1] = P(person i and person i+1 are both happy).

5. Finding E[Ii.Ij] for i, j not seated next to each other:
If persons i and j are not seated next to each other, the happiness of person i is independent of the happiness of person j. So, E[Ii.Ij] = E[Ii] * E[Ij].

6. Calculating Var(H) in terms of a = E[H], b = E[Ik^2], c = E[Ii.Ii+1], d = E[Ii.Ij], and n:
Var(H) = E[H^2] - (E[H])^2
To find E[H^2], we need to consider all pairs of people (i, j) and calculate the probability that both person i and person j are happy. E[H^2] = E[I1.I2] + E[I1.I3] + ... + E[In-1.In] + 2 * [E[I1.I3] + E[I1.I4] + ... + E[In-2.In]]
In terms of the given variables, E[H^2] = c + c + ... + c + 2d + 2d + ... + 2d (n-2 times)
E[H^2] = n * c + (n-2) * 2d

Finally, Var(H) = E[H^2] - a^2 = n * c + (n-2) * 2d - a^2