Expectation of the number of successes in Bernoulli trial

In summary, this person is trying to find a proof that the expected number of steps in one node in a random walk converges to a certain value. They are trying to calculate the expected number of steps in one node in a random walk, and by deduction they have a possible solution in terms of the number of steps and the probability of remaining in a node. They suspect this is not a proof and if not is there another way?.
  • #1
Mentz114
5,432
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
  • #2
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)?
 
  • #3
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: 412
  • #4
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 Mentz114
  • #5
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.
 
  • #6
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.
 
  • #7
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 Mentz114
  • #8
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:

What is a Bernoulli trial?

A Bernoulli trial is a statistical experiment with only two possible outcomes, success or failure. It is named after Swiss mathematician Jacob Bernoulli and is often used to model simple random events.

What is the expectation of the number of successes in a Bernoulli trial?

The expectation, also known as the expected value, of the number of successes in a Bernoulli trial is the average number of successes that can be expected over a large number of trials. It is calculated by multiplying the probability of success by the total number of trials.

How is the expectation of the number of successes calculated?

The expectation of the number of successes is calculated by multiplying the probability of success by the total number of trials. For example, if the probability of success is 0.5 and the total number of trials is 10, the expectation of the number of successes would be 0.5 x 10 = 5.

What is the relationship between the probability of success and the expectation of the number of successes?

The probability of success and the expectation of the number of successes are directly proportional. This means that as the probability of success increases, the expectation of the number of successes also increases. Conversely, as the probability of success decreases, the expectation of the number of successes also decreases.

Can the expectation of the number of successes be greater than the total number of trials?

Yes, the expectation of the number of successes can be greater than the total number of trials. This is because the expectation is an average value and can take on any value between 0 and the total number of trials, depending on the probability of success.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
894
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
774
  • Advanced Physics Homework Help
Replies
0
Views
123
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
782
  • Quantum Physics
Replies
6
Views
994
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
Back
Top