There are 10 houses in row. Each is colored randomly either orange, green, or blue.
What is the expected number of houses which have two orange neighbors?
As an example: in the image below are two such houses (marked with an X).
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The trick is to use indicator variables . Let a i = 1 if the i t h house has two orange neighbors and a i = 0 if it doesn't. We are looking for: E ( a 2 + a 3 + ⋯ + a 8 + a 9 ) We know E ( a i ) = 3 1 × 3 1 , because there is 1 in 3 chance that the left house is orange and a 1 in 3 chance that the right house is orange. Because expected values are additive (even if they are correlated), we have: E ( a 2 + a 3 + ⋯ + a 8 + a 9 ) = E ( a 2 ) + E ( a 3 ) + ⋯ + E ( a 8 ) + E ( a 9 ) = 8 × 3 1 × 3 1 = 9 8 ≈ 0 . 8 8 9