Artificial intelligent assistant

Random sequence of $0$'s and $1$'s - what is the average 'in a row' succession Let's say we create a sequence from coin tossing. Heads will be signified as $0$ and tails as $1$ Let's define $R$ as a successive elements(in the given sequence) of the same value. for example we have the sequence: $0,0,1,0,0,0,0,1,0,1,1,0$ In the given sequence there are total of $7$ different $R$'s My question is simple: Let's say we have infinite sequence - what is the average length of $R$ (length = how many elements are in $R$). in the above case is $12/7$ equivalent question would be how may times there is element switch in the sequence(also = how many different $R$'s - 1)'s.for example in a sequence in the length of $100$ , if there are $24$ elements switch that means we have $25$ $R$'s - so the average length is $4$. I would be also interested in the entire distribution of $R$'s length. probably I am short of the appropriate terminology to get answer in the internet.

Each element has a fifty percent chance of starting a new R, so half of them will start new Rs. The first one certainly will, so the average number will be $(N+1)/2$
The distribution of $R$ will be one more than a binomial random variable, R-1~B(N-1,1/2)

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f508ba1cb2a090e9a54de17833bb23b6