Infinite row of squares, some of them white with probability $p$. What is the average width of a white rectangle?

$\begingroup$

Suppose that you have an infinite horizontal row of squares, each square of size $1\times1$ (like a row of squares in a grid of infinite size). The probability of square being white is $p$. Some white rectangles will be next to each other forming a white rectangle. What is the average width of white rectangles?

I mean, I can easily do some simulations assuming that the row has some big number of squares (on the order of millions) and come up with pretty good estimations with respect to $p$. And if all else fails, I'll certainly do that. But is it possibly to calculate the average width of white rectangles analytically?

$\endgroup$ 1

1 Answer

$\begingroup$

Start at the first square of a white rectangle. The expected length of the rectangles is the expected number of squares until a black square turns up. We can think of this as a series of Bernoulli trials with probability of success $1-p$ The expected waiting time until the first success is $$\boxed{{1\over1-p}}$$

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like