Expectation of the number of successes in Bernoulli trial

Click For Summary

Discussion Overview

The discussion centers around calculating the expected number of steps in a one-dimensional random walk, particularly focusing on the expected length of stay at a specific node given a probability of remaining there. Participants explore various mathematical approaches and formulations related to this expectation.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Technical explanation

Main Points Raised

  • One participant proposes a formula for the expected number of steps in a random walk, suggesting that for rational probabilities, the expected value can be expressed as ##\bar{s}=\langle s\rangle= nm/(m-n)^2##.
  • Another participant questions the clarity of the initial problem statement, asking for specifics about the dimensionality of the walk and the nature of the steps.
  • Several participants discuss the probability of remaining at a node for ##n## steps, with one stating that the expected length of stay follows from the probability ##p^n##.
  • There are multiple suggestions for calculating the expected sojourn time, including using the sum ##\Sigma _{s=0}(s+1)p^s## and integrating with respect to ##p##.
  • One participant proposes an equation for the expected sojourn time, leading to a conjectured average length of stay expressed as ##\langle s\rangle = \frac{p}{1-p}##.
  • Another participant mentions a method involving the differentiation of series to derive moments, leading to further conjectures about the expected values.
  • There is a reference to a brute force calculation yielding a result for the second moment, but it is noted as still being guesswork.

Areas of Agreement / Disagreement

Participants express various approaches and conjectures regarding the expected number of steps and the expected length of stay, but there is no consensus on a single method or solution. Multiple competing views and methods remain present in the discussion.

Contextual Notes

Some calculations and assumptions are not fully resolved, and there are references to normalization constants and the need for further validation of conjectured results.

Mentz114
Messages
5,429
Reaction score
292
I'm trying calculate the expected number of steps in one node in a random walk , ##\langle s\rangle=\sum sp^s##. By deduction I have a possible solution (for rational probabilities ##p=n/m,\ n< m##) in ##\bar{s}=\langle s\rangle= nm/(m-n)^2##, which looks pretty weird but I have not found a counterexample.

I thought I might prove it by calculating ##\Delta_k = \sum_k sp^s - \bar{s}## and showing that this tends to 0 as ##k\rightarrow \infty##. The general term is ##\Delta_k = \frac{n^{k+1}\left((k+1)n-km\right)}{m^k(m-n)^2}## and using ##k\approx k+1## this gives ##\frac{n}{n-m}kp^k##.

I suspect this is not a proof and if not is there another way ?
 
Physics news on Phys.org
Mentz114 said:
the expected number of steps in one node in a random walk
It's not clear to me what you mean by this.
Is it 1 dimensional?
Are you asking (on average) how many out of n steps land at a particular node (at a given offset from the start point)?
 
Yes, a 1 dimensional walk with a node that has probability ##p## of remaining there. Given that the walk is in that node it will remain there for n steps with probability ##p^n##. So the expected length of the stay follows.

(@haruspex I used the reply button but there is no sign of your post)
 

Attachments

  • loopnode.png
    loopnode.png
    480 bytes · Views: 493
Mentz114 said:
Yes, a 1 dimensional walk with a node that has probability ##p## of remaining there. Given that the walk is in that node it will remain there for n steps with probability ##p^n##. So the expected length of the stay follows.

(@haruspex I used the reply button but there is no sign of your post)
If you include the initial arrival, I think you want ##\Sigma _{s=0}(s+1)p^s##. Usual way to solve that is to integrate wrt p.
Another approach is to let the expected sojourn be x. Having arrived, we either leave immediately or we don't. If we don't we expect to stay another x: x=1+px.
But you seem to have got ##x=\frac p{(1-p)^2}##
 
  • Like
Likes   Reactions: Mentz114
haruspex said:
If you include the initial arrival, I think you want ##\Sigma _{s=0}(s+1)p^s##. Usual way to solve that is to integrate wrt p.
Another approach is to let the expected sojourn be x. Having arrived, we either leave immediately or we don't. If we don't we expect to stay another x: x=1+px.
But you seem to have got ##x=\frac p{(1-p)^2}##
Thanks. I don't understand your approach so I'll think about it.
 
haruspex said:
If you include the initial arrival, I think you want ##\Sigma _{s=0}(s+1)p^s##. Usual way to solve that is to integrate wrt p.
Another approach is to let the expected sojourn be x. Having arrived, we either leave immediately or we don't. If we don't we expect to stay another x: x=1+px.
But you seem to have got ##x=\frac p{(1-p)^2}##
This was helpful and I now propose as the average length of the sojourn
\begin{align*}
\langle s\rangle = {\sum\limits_{s=0}^{\infty}sp^s}/{\sum\limits_{s=0}^{\infty}p^s}=\frac{p}{1-p}
\end{align*}
My attempted proof of convergence to this value is unchanged.
 
Mentz114 said:
I'm trying calculate the expected number of steps in one node in a random walk , ##\langle s\rangle=\sum sp^s##. By deduction I have a possible solution (for rational probabilities ##p=n/m,\ n< m##) in ##\bar{s}=\langle s\rangle= nm/(m-n)^2##, which looks pretty weird but I have not found a counterexample.

I thought I might prove it by calculating ##\Delta_k = \sum_k sp^s - \bar{s}## and showing that this tends to 0 as ##k\rightarrow \infty##. The general term is ##\Delta_k = \frac{n^{k+1}\left((k+1)n-km\right)}{m^k(m-n)^2}## and using ##k\approx k+1## this gives ##\frac{n}{n-m}kp^k##.

I suspect this is not a proof and if not is there another way ?
$$\sum_{s=0}^\infty s p^s = p \frac{d}{dp} \sum_{s=0}^\infty p^s = p \frac{d}{dp} \frac{1}{1-p}$$
 
  • Like
Likes   Reactions: Mentz114
Ray Vickson said:
$$\sum_{s=0}^\infty s p^s = p \frac{d}{dp} \sum_{s=0}^\infty p^s = p \frac{d}{dp} \frac{1}{1-p}$$
Many thanks. That gives ##p/(1-p)^2## and normalising with ##\sum p^s = 1/(1-p)## gives my conjectured sum. Accord ?

I found by brute force that $$\sum_{s=0}^\infty s^2 p^s/N =\frac{p\,\left( p+1\right) }{{\left( 1-p\right) }^{2}}$$ (##N## is the normalisation constant as in post#6) but this is still guesswork.

[edit]
Using ##1/(1-x)=1+x+{x}^{2}+{x}^{3}+{x}^{4}+{x}^{5}+{x}^{6}+...## it is clear that
##\sum s^2p^s = p\left[d_x (p d_x (1/1-p))\right]=\frac{p(p+1)}{{\left( p-1\right) }^{3}}## and after normalisation we get my conjecture.

Applyng the operator ##p\tfrac{d}{dp}## n times to ##1/(1-p)## gives the n'th moment.

Thanks again for the pointer, Ray.
 
Last edited:

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 24 ·
Replies
24
Views
2K
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K