Let's assume we have random pixel generator which has 10X10 resolution (100 pixels in total) and each pixels can have 3 different colors. I'm trying to calculate probability of having at least one 2X2 same color square block on that screen.
Here is my logic for such calculation:
1) Odds of all pixels having same color in 2X2 square block is 1/27 (3/3^4)
2) Odds of there is at least two different colors in 2X2 square block is 26/27 (1-1/27), which is complement probability of (1)
3) There are 81 different group of 2X2 square blocks on 10X10 grid.
4) Probability of that one 2X2 square block at least having two different colors is (26/27)^81, based on complement probability.
5) Therefore probability of at least one 2X2 square block having same color is
-4 pixels on 10X10 grid which are located at the corners (top left,top right,bottom left & bottom right) can be only in one 2X2 square block each
-All pixels located in outermost parts except these 4, can be in two different 2X2 square blocks each
-All remaining pixels inside outermost lines can be in four different 2X2 square blocks each.
As I treated all pixels equally I didn't reflect the condition above in my calculation. How can I reflect the condition above in my calculation and have the correct probability? Is this mathematically possible to demonstrate via calculations?
Thanks a lot!